Package mepk.kernel
Class App
java.lang.Object
mepk.kernel.App
- All Implemented Interfaces:
Expression.Internal
A constant-application expression. Instances are obtained through
Expression.asApp(), for expressions which have been created through
Expression.App(String, Expression...) and related methods.-
Nested Class Summary
Nested classes/interfaces inherited from interface mepk.kernel.Expression.Internal
Expression.Internal.Wrapper -
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.Returns the constant name of this constant-application expression.Returns the subexpressions of this constant-application expression.inthashCode()substitute(String varName, Expression.Internal replacement, Expression.Internal.Wrapper wrapper) Create a new internal expression by replacing a variable by an internal expression.toString()
-
Method Details
-
getConstName
Returns the constant name of this constant-application expression.- Returns:
- the constant name of this expression
-
getSubexpressions
Returns the subexpressions of this constant-application expression.- Returns:
- the subexpressions of this expression.
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceExpression.Internal- Overrides:
hashCodein classObject
-
equals
- Specified by:
equalsin interfaceExpression.Internal- Overrides:
equalsin classObject
-
toString
-
addVarNamesTo
Description copied from interface:Expression.InternalFind all variable names in this expression, and add them to the given set.- Specified by:
addVarNamesToin interfaceExpression.Internal- Parameters:
result- the accumulating set
-
substitute
public Expression substitute(String varName, Expression.Internal replacement, Expression.Internal.Wrapper wrapper) Description copied from interface:Expression.InternalCreate a new internal expression by replacing a variable by an internal expression.- Specified by:
substitutein interfaceExpression.Internal- Parameters:
varName- the variable to replacereplacement- the replacement expressionwrapper- expression wrapper- Returns:
- the new expression
-
expand
public Expression expand(Abbreviation abbreviation, StatementAbbrExpState accu, Expression.Internal.Wrapper wrapper) Description copied from interface:Expression.InternalCreate a new expression by expanding all instances of the given abbreviation, and collect all conditions in accu.- Specified by:
expandin interfaceExpression.Internal- Parameters:
abbreviation- the abbreviation to expandaccu- the accumulator for the (expanded) conditionswrapper- expression wrapper- Returns:
- the new expression
-