public class EPMToPBody extends java.lang.Object implements PatternModelAcceptor<PBody>
PatternModelAcceptor implementation that constructs a PBody.| Constructor and Description |
|---|
EPMToPBody(Pattern pattern,
PQuery query,
NameToSpecificationMap patternMap) |
| 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.
|
PBody |
getResult()
Returns the constructed object after traversing a
PatternBody. |
public EPMToPBody(Pattern pattern, PQuery query, NameToSpecificationMap patternMap)
public PBody getResult()
PatternModelAcceptorPatternBody.getResult in interface PatternModelAcceptor<PBody>public java.lang.String acceptVariable(Variable variable)
PatternModelAcceptorVariable and returns the name of the internal variable.acceptVariable in interface PatternModelAcceptor<PBody>public java.lang.String createVirtualVariable()
PatternModelAcceptorcreateVirtualVariable in interface PatternModelAcceptor<PBody>public java.lang.String createConstantVariable(java.lang.Object value)
PatternModelAcceptorcreateConstantVariable in interface PatternModelAcceptor<PBody>public void acceptExportedParameters(java.util.List<Variable> parameters)
PatternModelAcceptoracceptExportedParameters in interface PatternModelAcceptor<PBody>public void acceptConstraint(Constraint constraint)
PatternModelAcceptorConstraint.
This is called for every Constraint before the acceptor method depending on the actual runtime type of the Constraint.acceptConstraint in interface PatternModelAcceptor<PBody>public void acceptTypeConstraint(java.util.List<java.lang.String> variableNames,
IInputKey inputKey)
PatternModelAcceptorTypeConstraint.acceptTypeConstraint in interface PatternModelAcceptor<PBody>public void acceptPositivePatternCall(java.util.List<java.lang.String> argumentVariableNames,
Pattern calledPattern)
PatternModelAcceptorPositivePatternCall.acceptPositivePatternCall in interface PatternModelAcceptor<PBody>public void acceptNegativePatternCall(java.util.List<java.lang.String> argumentVariableNames,
Pattern calledPattern)
PatternModelAcceptorNegativePatternCall.acceptNegativePatternCall in interface PatternModelAcceptor<PBody>public void acceptBinaryTransitiveClosure(java.util.List<java.lang.String> argumentVariableNames,
Pattern calledPattern)
PatternModelAcceptorBinaryTransitiveClosure.acceptBinaryTransitiveClosure in interface PatternModelAcceptor<PBody>public void acceptEquality(java.lang.String leftOperandVariableName,
java.lang.String rightOperandVariableName)
PatternModelAcceptorEquality.acceptEquality in interface PatternModelAcceptor<PBody>public void acceptInequality(java.lang.String leftOperandVariableName,
java.lang.String rightOperandVariableName)
PatternModelAcceptorInequality.acceptInequality in interface PatternModelAcceptor<PBody>public void acceptExpressionEvaluation(org.eclipse.xtext.xbase.XExpression expression,
java.lang.String outputVariableName)
throws SpecificationBuilderException
PatternModelAcceptorExpressionEvaluation.acceptExpressionEvaluation in interface PatternModelAcceptor<PBody>SpecificationBuilderExceptionpublic void acceptPatternMatchCounter(java.util.List<java.lang.String> argumentVariableNames,
Pattern calledPattern,
java.lang.String resultVariableName)
PatternModelAcceptorPatternMatchCounter.acceptPatternMatchCounter in interface PatternModelAcceptor<PBody>