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 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.