Open Ekdohibs opened 4 years ago
Thank you for that!
I'll see if this is related to #2 after I fixed it.
I think this is probably a separate problem: I get the same errors in the result, with the same test cases, in case the GC is disabled.
Indeed, I narrowed down the issue to the readback with some minimum examples:
a->(b->b b) (k->a(m->k m)).
has the problem, but not
a->(b->b b) (k->(m->k m)).
Looking at the graphs (option -G
), we see that in the second case, the duplication with the fans labelled 1
is completely done, whereas it is "held back" by the application in the first case. While performing the readback in the first case, the lambda is shared (correctly), not duplicated. When creating the lambda expression, the same name is (wrongly) used for each share. I'll correct that soon!
This would indeed fix the first case, but I don't see how it fixes the second error, where there is a variable that is not bound by a lambda in the readback. Also, both your examples are the same, is it intended?
Copy/paste mistake, sorry about that. I edited the post. You are right, it won't fix the other cases, see my last reply on #2!
With the following input, Eole produces an incorrect result:
The produced result is:
while the correct result is, according to https://crypto.stanford.edu/~blynn/lambda/:
(input with the corresponding syntax:)
Note that Eole produces a
(m48->m48)
subterm near the end of the result, but thatm48
is already bound in the same context. The correct result contains a(λm1.m)
in that place, which is the correct one.Besides, with the following input, Eole produces a result that is not even well-scoped.
The result produced by Eole is:
The variables
c116
andb21
are not bound at their first occurence.