You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is an issue that primarily comes up if you write
#builtin NAT_SUCC s
a :- b X, c (s (s (s X))), c (s (s (s (s X)))).
This gets compiled to
a :-
b X,
s X is X1
s X1 is X2,
s X2 is X3,
c X3,
s X is X4,
s X4 is X5,
s X5 is X6,
s X6 is X7,
c X6.
which should be able to be simplified to
a :-
b X,
s X is X1
s X1 is X2,
s X2 is X3,
c X3,
s X3 is X7,
c X7.
This is basically common subexpression elimination, and it should (probably) be performed during compilation on the flattened program, before binarization.
The text was updated successfully, but these errors were encountered:
This is an issue that primarily comes up if you write
This gets compiled to
which should be able to be simplified to
This is basically common subexpression elimination, and it should (probably) be performed during compilation on the flattened program, before binarization.
The text was updated successfully, but these errors were encountered: