Result
- the type of the resultpublic interface PatternModelAcceptor<Result>
PatternModel
elements during the transformation of a PatternBody
.
It has the responsibility to maintain an internal representation of the Variable
s
both present in the PatternBody
and additional Variable
s needed for the Constraint
s in the PatternBody
.
The methods use variable names which identify these internal variables.
WARNING! Implementations of this interface are typically stateful, so don't reuse instances of them!
Modifier and Type | Method and Description |
---|---|
void |
acceptBinaryTransitiveClosure(java.util.List<java.lang.String> argumentVariableNames,
Pattern calledPattern)
Accepts a
BinaryTransitiveClosure . |
void |
acceptConstraint(Constraint constraint)
Accepts a general
Constraint . |
void |
acceptEquality(java.lang.String leftOperandVariableName,
java.lang.String rightOperandVariableName)
Accepts an
Equality . |
void |
acceptExportedParameters(java.util.List<Variable> parameters)
Accepts the given parameters as exported parameter constraints.
|
void |
acceptExpressionEvaluation(org.eclipse.xtext.xbase.XExpression expression,
java.lang.String outputVariableName)
Accepts an
ExpressionEvaluation . |
void |
acceptInequality(java.lang.String leftOperandVariableName,
java.lang.String rightOperandVariableName)
Accepts an
Inequality . |
void |
acceptNegativePatternCall(java.util.List<java.lang.String> argumentVariableNames,
Pattern calledPattern)
Accepts a
NegativePatternCall . |
void |
acceptPatternMatchCounter(java.util.List<java.lang.String> argumentVariableNames,
Pattern calledPattern,
java.lang.String resultVariableName)
Accepts a
PatternMatchCounter . |
void |
acceptPositivePatternCall(java.util.List<java.lang.String> argumentVariableNames,
Pattern calledPattern)
Accepts a
PositivePatternCall . |
void |
acceptTypeConstraint(java.util.List<java.lang.String> variableNames,
IInputKey inputKey)
Accepts a
TypeConstraint . |
java.lang.String |
acceptVariable(Variable variable)
Registers a
Variable and returns the name of the internal variable. |
java.lang.String |
createConstantVariable(java.lang.Object value)
Creates an internal virtual variable, a constant constraint which binds it to the given value, and returns its name.
|
java.lang.String |
createVirtualVariable()
Creates an internal virtual variable and returns its name.
|
Result |
getResult()
Returns the constructed object after traversing a
PatternBody . |
Result getResult()
PatternBody
.java.lang.String acceptVariable(Variable variable)
Variable
and returns the name of the internal variable.java.lang.String createVirtualVariable()
java.lang.String createConstantVariable(java.lang.Object value)
void acceptExportedParameters(java.util.List<Variable> parameters)
void acceptConstraint(Constraint constraint)
Constraint
.
This is called for every Constraint
before the acceptor method depending on the actual runtime type of the Constraint
.void acceptTypeConstraint(java.util.List<java.lang.String> variableNames, IInputKey inputKey)
TypeConstraint
.void acceptPositivePatternCall(java.util.List<java.lang.String> argumentVariableNames, Pattern calledPattern)
PositivePatternCall
.void acceptNegativePatternCall(java.util.List<java.lang.String> argumentVariableNames, Pattern calledPattern)
NegativePatternCall
.void acceptBinaryTransitiveClosure(java.util.List<java.lang.String> argumentVariableNames, Pattern calledPattern)
BinaryTransitiveClosure
.void acceptEquality(java.lang.String leftOperandVariableName, java.lang.String rightOperandVariableName)
Equality
.void acceptInequality(java.lang.String leftOperandVariableName, java.lang.String rightOperandVariableName)
Inequality
.void acceptExpressionEvaluation(org.eclipse.xtext.xbase.XExpression expression, java.lang.String outputVariableName) throws SpecificationBuilderException
ExpressionEvaluation
.SpecificationBuilderException
void acceptPatternMatchCounter(java.util.List<java.lang.String> argumentVariableNames, Pattern calledPattern, java.lang.String resultVariableName)
PatternMatchCounter
.