[POC] run Elpi code in lambdapi
do not merge this is a POC to be discussed at a seminar on the 18th
TODO (hopefully for the 18th):
- [x] support
Terms.Metain the HOAS encoding using Elpi's unification variables - [ ] from
Terms.term Conversion.tto(Terms.term,Env.t,_) ContextualConversion.t - [ ] bind
Typing.infer(_constr)andEval.eq_modulo
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:
18:39 ~/lambdapi (elpi) make sanity_check
In src/core/ctxt.ml, line 12 more than 78 characters...
In src/core/elpi_lambdapi.ml, line 53 more than 78 characters...
In src/core/elpi_lambdapi.ml, line 95 more than 78 characters...
In src/core/elpi_lambdapi.ml, line 99 more than 78 characters...
In src/core/elpi_lambdapi.ml, line 175 more than 78 characters...
In src/core/elpi_lambdapi.ml, line 259 more than 78 characters...
In src/core/elpi_lambdapi.ml, line 263 more than 78 characters...
Please run tools/git_hook_helper.sh to have the following pre-commit hook:
#!/bin/sh
if [ ! -z "$(make sanity_check)" ]; then
echo "Sanity check failed."
exit 1
fi
I did set it up, but then I could not commit anything. If I run the script locally I get
gares@ollypat:~/work-area/lambdapi$ make sanity_check
In src/cli/lambdapi.ml, line 30 more than 78 characters...
In src/core/basics.ml, line 30 more than 78 characters...
In src/core/builtin.ml, line 10 more than 78 characters...
... many other files, including mine, ....
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 GNU Awk 4.1.4. Could you please give the complete result of make sanity_check too?
Well spotted, I've no idea why my ubuntu has this variant of awk (by default)
gares@ollypat:~/work-area/lambdapi$ dpkg -l | grep awk
ii mawk 1.3.3-17ubuntu3 amd64 a pattern scanning and text processing language
I've installed gawk, it now works
It's not the first time it happens, perhaps we should check the awk version with a awk --version | grep GNU or something of the kind...
Why not simply calling gawk explicitly instead of awk?
tools/git_hook_helper.sh could also check that gawk exists
Fixed in f2c363cc