Package mepk.kernel
Interface Expression.Internal
- Enclosing class:
- Expression
public static interface Expression.Internal
An internal version of an
Expression. Instances are unmodifiable
values. They are equal if (and only if) they have
the same structure.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceAn object that can wrap anExpression.Internalup as anExpression. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddVarNamesTo(Set<String> result) Find all variable names in this expression, and add them to the given set.booleanexpand(Abbreviation abbreviation, StatementAbbrExpState accu, Expression.Internal.Wrapper wrapper) Create a new expression by expanding all instances of the given abbreviation, and collect all conditions in accu.inthashCode()substitute(String varName, Expression.Internal replacement, Expression.Internal.Wrapper wrapper) Create a new internal expression by replacing a variable by an internal expression.
-
Method Details
-
hashCode
int hashCode() -
equals
-
substitute
Expression substitute(String varName, Expression.Internal replacement, Expression.Internal.Wrapper wrapper) Create a new internal expression by replacing a variable by an internal expression.- Parameters:
varName- the variable to replacereplacement- the replacement expressionwrapper- expression wrapper- Returns:
- the new expression
-
expand
Expression expand(Abbreviation abbreviation, StatementAbbrExpState accu, Expression.Internal.Wrapper wrapper) Create a new expression by expanding all instances of the given abbreviation, and collect all conditions in accu.- Parameters:
abbreviation- the abbreviation to expandaccu- the accumulator for the (expanded) conditionswrapper- expression wrapper- Returns:
- the new expression
-
addVarNamesTo
Find all variable names in this expression, and add them to the given set.- Parameters:
result- the accumulating set
-