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
The first argument of the Patt data type is an integer option which was once set to None at scoping if the variable was linear and not used in the right hand side, like in
rule $X $Y --> $Y
the variable $X was transformed to Patt(None, "X", [||]) and $Y to Patt(Some(i), "Y", [||]), where i would probably be 1.
Compilation to decision trees relies on the form of this argument for optimisation (it doesn't impact correctness): if the first argument is set to None, than there is no need to remember the subterm matched by the pattern, and it can hence be discarded.
Nowadays, the first argument of patterns is always of the form Some i after scoping. Therefore decision trees backup more terms than needed.
The text was updated successfully, but these errors were encountered:
fblanqui
changed the title
Rewrite rule pattern data type
Improve scoping of pattern variables not used in the RHS
Dec 15, 2021
The first argument of the
Patt
data type is an integer option which was once set toNone
at scoping if the variable was linear and not used in the right hand side, like inthe variable
$X
was transformed toPatt(None, "X", [||])
and$Y
toPatt(Some(i), "Y", [||])
, wherei
would probably be 1.Compilation to decision trees relies on the form of this argument for optimisation (it doesn't impact correctness): if the first argument is set to
None
, than there is no need to remember the subterm matched by the pattern, and it can hence be discarded.Nowadays, the first argument of patterns is always of the form
Some i
after scoping. Therefore decision trees backup more terms than needed.The text was updated successfully, but these errors were encountered: