Operator Extractor to extract any Expression in a consistent way.
You can match on any Inox Expr, and then get both a Seq[Expr] of
subterms and a builder function that takes a Seq of subterms (of same
length) and rebuild the original node.
Those extractors do not perform any syntactic simplifications. They
rebuild the node using the case class (not the constructor, that performs
simplifications). The rational behind this decision is to have core
tools for performing tree transformations that are very predictable, if
one need to simplify the tree, it is easy to write/call a simplification
function that would simply apply the corresponding constructor for each node.
Operator Extractor to extract any Expression in a consistent way.
You can match on any Inox Expr, and then get both a Seq[Expr] of subterms and a builder function that takes a Seq of subterms (of same length) and rebuild the original node.
Those extractors do not perform any syntactic simplifications. They rebuild the node using the case class (not the constructor, that performs simplifications). The rational behind this decision is to have core tools for performing tree transformations that are very predictable, if one need to simplify the tree, it is easy to write/call a simplification function that would simply apply the corresponding constructor for each node.