-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[POC] run Elpi code in lambdapi #418
base: master
Are you sure you want to change the base?
Conversation
Ouah. That's great @gares . Thank you for digging into the code of Lambdapi ! |
CI seems to be failing because of "sanity_check" but it does not seem to have much to do with my code (locally it prints messages about files I did not touch). Is it expected? |
Yes:
Please run tools/git_hook_helper.sh to have the following pre-commit hook:
|
I did set it up, but then I could not commit anything. If I run the script locally I get
here line 30 of src/cli/lambdapi.ml has 79 chars according to my editor. Anyway, I'll fix my file, I did not spot it in the sea of errors it prints here |
Well, 79>78 indeed ;-) But that's strange we do not get the same files! Do you use gawk? I have |
Well spotted, I've no idea why my ubuntu has this variant of awk (by default)
I've installed gawk, it now works |
It's not the first time it happens, perhaps we should check the awk version with a |
Why not simply calling |
|
Fixed in f2c363c |
c6ef22f
to
88bff84
Compare
@@ -478,12 +478,28 @@ let scope = | |||
a type (defaults to [false]). No {b new} metavariables may appear in | |||
[t], but metavariables in the image of [mok] may be used. The function | |||
[mok] defaults to the function constant to [None] *) | |||
let scope_term : ?typ:bool -> ?mok:(int -> meta option) -> | |||
let scope_term: ?typ:bool -> ?mok:(int -> meta option) -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can remove the diff here.
bool -> sig_state -> env -> p_term -> term = | ||
fun ?(typ=false) ?(mok=fun _ -> None) m_term_prv ss env t -> | ||
let md = M_Term {m_term_meta_of_key=mok; m_term_prv} in | ||
Bindlib.unbox (scope ~typ 0 md ss env t) | ||
|
||
let scope_term_w_pats: ?typ:bool -> ?mok:(int -> meta option) -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing explanation of the function.
@@ -18,6 +18,11 @@ val scope_term : | |||
?mok:(int -> meta option) -> | |||
bool -> sig_state -> env -> p_term -> term | |||
|
|||
val scope_term_w_pats : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing explanation of the function.
- lp.unif branched, but it works only in the empty context - it does not work at all like the one of Coq: x |- ? x x == R x x is post-poned Thus it is quite useless - it requires most symbols in the encoding (e.s. Decode/code/uncode/...) to be defined as injective, even if maybe they are not so Game over in using that?
do not merge this is a POC to be discussed at a seminar on the 18th
TODO (hopefully for the 18th):
Terms.Meta
in the HOAS encoding using Elpi's unification variablesTerms.term Conversion.t
to(Terms.term,Env.t,_) ContextualConversion.t
Typing.infer(_constr)
andEval.eq_modulo