Wrapper around an Expression that provides semantic equality.
Adds each expression to this data structure, grouping them with existing equivalent expressions.
Adds each expression to this data structure, grouping them with existing equivalent expressions. Non-recursive. Returns true if there was already a matching expression.
Adds the expression to this data structure recursively.
Adds the expression to this data structure recursively. Stops if a matching expression
is found. That is, if expr
has already been added, its children are not added.
If ignoreLeaf is true, leaf nodes are ignored.
Returns the state of the data structure as a string.
Returns the state of the data structure as a string. If all
is false, skips sets of
equivalent expressions with cardinality 1.
Returns all the equivalent sets of expressions.
Returns all of the expression trees that are equivalent to e
.
Returns all of the expression trees that are equivalent to e
. Returns
an empty collection if there are none.
This class is used to compute equality of (sub)expression trees. Expressions can be added to this class and they subsequently query for expression equality. Expression trees are considered equal if for the same input(s), the same result is produced.