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 void
copyAggregatorConstraint
(AggregatorConstraint constraint) protected void
copyBinaryReflexiveTransitiveClosureConstraint
(BinaryReflexiveTransitiveClosure binaryReflexiveTransitiveClosure) protected void
copyBinaryTransitiveClosureConstraint
(BinaryTransitiveClosure binaryTransitiveClosure) protected void
copyConstantValueConstraint
(ConstantValue constantValue) protected void
copyConstraint
(PConstraint constraint) protected void
copyEqualityConstraint
(Equality equality) protected ExportedParameter
copyExportedParameterConstraint
(ExportedParameter exportedParameter) protected void
copyExpressionEvaluationConstraint
(ExpressionEvaluation expressionEvaluation) protected void
copyInequalityConstraint
(Inequality inequality) protected void
copyLeftJoinConstraint
(LeftJoinConstraint constraint) protected void
copyNegativePatternCallConstraint
(NegativePatternCall negativePatternCall) protected void
copyPatternMatchCounterConstraint
(PatternMatchCounter patternMatchCounter) protected void
copyPositivePatternCallConstraint
(PositivePatternCall positivePatternCall) protected void
copyRelationEvaluationConstraint
(RelationEvaluation relationEvaluation) protected void
protected void
copyTypeConstraint
(TypeConstraint typeConstraint) protected void
copyTypeFilterConstraint
(TypeFilterConstraint typeConstraint) protected void
copyVariable
(PVariable variable, String newName) protected PVariable[]
extractMappedVariables
(EnumerablePConstraint enumerablePConstraint) For positive pattern callsReturns the body with the copied variables and constraints.void
void
mergeBody
(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
-