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
{{ message }}
Repository navigation
Add Constant Propagation And Folding To Predicates #58
Type expected: (#result_4 < 0)
Refinement found: #result_4 == 3
So, the variables a and b should be propagated with their constant values to 6 / 2 and then this should be folded to 3.
This should also work for booleans, e.g. !true => false.
One point that might influence how you architect this change:
In the future we might want the IDE to be able to expand 3 to 6 / 2 and the 6 and 2 to their variables, respectively. So the IDE should provide either HTML or JSON (json sounds better) that includes all of these contractions, so it can revert them when requested by the user.
In practice, this means that either:
each new AST node contains a reference to the original, or
there is a datastructure with a mapping between the new and original nodes, or
Activity
alcides commentedon Sep 28, 2025
One point that might influence how you architect this change:
In the future we might want the IDE to be able to expand 3 to 6 / 2 and the 6 and 2 to their variables, respectively. So the IDE should provide either HTML or JSON (json sounds better) that includes all of these contractions, so it can revert them when requested by the user.
In practice, this means that either:
rcosta358 commentedon Sep 28, 2025
Noted!