Class PBodyCopier
java.lang.Object
tools.refinery.interpreter.matchers.psystem.rewriters.AbstractRewriterTraceSource
tools.refinery.interpreter.matchers.psystem.rewriters.PBodyCopier
This class can create a new PBody for a PQuery. The result body contains a copy of given variables and constraints.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPBodyCopier(PBody body, IRewriterTraceCollector traceCollector) PBodyCopier(PQuery query) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcopyAggregatorConstraint(AggregatorConstraint constraint) protected voidcopyBinaryReflexiveTransitiveClosureConstraint(BinaryReflexiveTransitiveClosure binaryReflexiveTransitiveClosure) protected voidcopyBinaryTransitiveClosureConstraint(BinaryTransitiveClosure binaryTransitiveClosure) protected voidcopyConstantValueConstraint(ConstantValue constantValue) protected voidcopyConstraint(PConstraint constraint) protected voidcopyEqualityConstraint(Equality equality) protected ExportedParametercopyExportedParameterConstraint(ExportedParameter exportedParameter) protected voidcopyExpressionEvaluationConstraint(ExpressionEvaluation expressionEvaluation) protected voidcopyInequalityConstraint(Inequality inequality) protected voidcopyLeftJoinConstraint(LeftJoinConstraint constraint) protected voidcopyNegativePatternCallConstraint(NegativePatternCall negativePatternCall) protected voidcopyPatternMatchCounterConstraint(PatternMatchCounter patternMatchCounter) protected voidcopyPositivePatternCallConstraint(PositivePatternCall positivePatternCall) protected voidcopyRelationEvaluationConstraint(RelationEvaluation relationEvaluation) protected voidprotected voidcopyTypeConstraint(TypeConstraint typeConstraint) protected voidcopyTypeFilterConstraint(TypeFilterConstraint typeConstraint) protected voidcopyVariable(PVariable variable, String newName) protected PVariable[]extractMappedVariables(EnumerablePConstraint enumerablePConstraint) For positive pattern callsReturns the body with the copied variables and constraints.voidvoidmergeBody(PBody sourceBody, IVariableRenamer namingTool, IConstraintFilter filter) Merge all variables and constraints from a source body to a target body.Methods inherited from class tools.refinery.interpreter.matchers.psystem.rewriters.AbstractRewriterTraceSource
addTrace, derivativeRemoved, getTraceCollector, getTraces, setTraceCollector
-
Field Details
-
body
The created body -
variableMapping
Mapping between the original and the copied variables
-
-
Constructor Details
-
PBodyCopier
- Since:
- 1.6
-
PBodyCopier
- Since:
- 1.6
-
-
Method Details
-
getVariableMapping
-
mergeBody
-
mergeBody
Merge all variables and constraints from a source body to a target body. If multiple bodies are merged into a single one, use the renamer and filter options to avoid collisions. -
copyVariable
-
getCopiedBody
Returns the body with the copied variables and constraints. The returned body is still uninitialized. -
copyConstraint
-
copyExportedParameterConstraint
-
copyEqualityConstraint
-
copyInequalityConstraint
-
copyTypeConstraint
-
copyTypeFilterConstraint
-
copyConstantValueConstraint
-
copyPositivePatternCallConstraint
-
copyNegativePatternCallConstraint
-
copyBinaryTransitiveClosureConstraint
protected void copyBinaryTransitiveClosureConstraint(BinaryTransitiveClosure binaryTransitiveClosure) -
copyRepresentativeElectionConstraint
-
copyRelationEvaluationConstraint
- Since:
- 2.8
-
copyBinaryReflexiveTransitiveClosureConstraint
protected void copyBinaryReflexiveTransitiveClosureConstraint(BinaryReflexiveTransitiveClosure binaryReflexiveTransitiveClosure) - Since:
- 2.0
-
copyPatternMatchCounterConstraint
-
copyAggregatorConstraint
- Since:
- 1.4
-
copyLeftJoinConstraint
-
copyExpressionEvaluationConstraint
-
extractMappedVariables
For positive pattern calls- Parameters:
positivePatternCall-- Returns:
- the mapped variables to the pattern's parameters
-