prints 4, meaning that the rule was matched. This seems unexpected, to me the rule could only match if the condition was (= (foo) 10).
Strangely, replacing 5 in the condition by (+ 1 4) now gives the expected behavior (i.e. the rule does not match).
It is as if 5 was treated as a free variable in this case, instead of referring to the literal 5 (this might not make any sense, I have 0 knowledge of egglog's internals).
The following program:
prints
4
, meaning that the rule was matched. This seems unexpected, to me the rule could only match if the condition was(= (foo) 10)
.Strangely, replacing
5
in the condition by(+ 1 4)
now gives the expected behavior (i.e. the rule does not match).It is as if
5
was treated as a free variable in this case, instead of referring to the literal5
(this might not make any sense, I have 0 knowledge of egglog's internals).Am I missing something?
Thanks!