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()
PatternModelAcceptor
PatternBody
.getResult
in interface PatternModelAcceptor<PBody>
public java.lang.String acceptVariable(Variable variable)
PatternModelAcceptor
Variable
and returns the name of the internal variable.acceptVariable
in interface PatternModelAcceptor<PBody>
public java.lang.String createVirtualVariable()
PatternModelAcceptor
createVirtualVariable
in interface PatternModelAcceptor<PBody>
public java.lang.String createConstantVariable(java.lang.Object value)
PatternModelAcceptor
createConstantVariable
in interface PatternModelAcceptor<PBody>
public void acceptExportedParameters(java.util.List<Variable> parameters)
PatternModelAcceptor
acceptExportedParameters
in interface PatternModelAcceptor<PBody>
public void acceptConstraint(Constraint constraint)
PatternModelAcceptor
Constraint
.
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)
PatternModelAcceptor
TypeConstraint
.acceptTypeConstraint
in interface PatternModelAcceptor<PBody>
public void acceptPositivePatternCall(java.util.List<java.lang.String> argumentVariableNames, Pattern calledPattern)
PatternModelAcceptor
PositivePatternCall
.acceptPositivePatternCall
in interface PatternModelAcceptor<PBody>
public void acceptNegativePatternCall(java.util.List<java.lang.String> argumentVariableNames, Pattern calledPattern)
PatternModelAcceptor
NegativePatternCall
.acceptNegativePatternCall
in interface PatternModelAcceptor<PBody>
public void acceptBinaryTransitiveClosure(java.util.List<java.lang.String> argumentVariableNames, Pattern calledPattern)
PatternModelAcceptor
BinaryTransitiveClosure
.acceptBinaryTransitiveClosure
in interface PatternModelAcceptor<PBody>
public void acceptEquality(java.lang.String leftOperandVariableName, java.lang.String rightOperandVariableName)
PatternModelAcceptor
Equality
.acceptEquality
in interface PatternModelAcceptor<PBody>
public void acceptInequality(java.lang.String leftOperandVariableName, java.lang.String rightOperandVariableName)
PatternModelAcceptor
Inequality
.acceptInequality
in interface PatternModelAcceptor<PBody>
public void acceptExpressionEvaluation(org.eclipse.xtext.xbase.XExpression expression, java.lang.String outputVariableName) throws SpecificationBuilderException
PatternModelAcceptor
ExpressionEvaluation
.acceptExpressionEvaluation
in interface PatternModelAcceptor<PBody>
SpecificationBuilderException
public void acceptPatternMatchCounter(java.util.List<java.lang.String> argumentVariableNames, Pattern calledPattern, java.lang.String resultVariableName)
PatternModelAcceptor
PatternMatchCounter
.acceptPatternMatchCounter
in interface PatternModelAcceptor<PBody>