Class ExtendBinaryTransitiveClosure
java.lang.Object
tools.refinery.interpreter.localsearch.operations.extend.ExtendBinaryTransitiveClosure
- All Implemented Interfaces:
IPatternMatcherOperation,ISearchOperation
- Direct Known Subclasses:
ExtendBinaryTransitiveClosure.Backward,ExtendBinaryTransitiveClosure.Forward
public abstract class ExtendBinaryTransitiveClosure
extends Object
implements ISearchOperation, IPatternMatcherOperation
Checking for a transitive closure expressed as a local search pattern matcher. The matched pattern must have two
parameters of the same model type.
- Since:
- 1.7
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classCalculates the transitive closure of a pattern match in a backward direction (first parameter unbound, second bound)static classCalculates the transitive closure of a pattern match in a forward direction (first parameter bound, second unbound).Nested classes/interfaces inherited from interface tools.refinery.interpreter.localsearch.operations.ISearchOperation
ISearchOperation.ISearchOperationExecutor -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedExtendBinaryTransitiveClosure(CallInformation information, int seedPosition, int targetPosition, boolean reflexive) The source position will be matched in the called pattern to the first parameter; while target to the second. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract Object[]calculateCallFrame(Object seed) Initializes a new operation executor for the given operation.Returns the precomputed call information associated with the current operationprotected abstract ObjecttoString()Creates a string representation of the search operation by replacing the variable numbers according to the parameter function.
-
Constructor Details
-
ExtendBinaryTransitiveClosure
protected ExtendBinaryTransitiveClosure(CallInformation information, int seedPosition, int targetPosition, boolean reflexive) The source position will be matched in the called pattern to the first parameter; while target to the second.- Since:
- 2.0
-
-
Method Details
-
calculateCallFrame
-
getTarget
-
createExecutor
Description copied from interface:ISearchOperationInitializes a new operation executor for the given operation. Repeated calls must return different executor instances.- Specified by:
createExecutorin interfaceISearchOperation
-
toString
-
toString
Description copied from interface:ISearchOperationCreates a string representation of the search operation by replacing the variable numbers according to the parameter function. It is expected that the provided function does return a non-null value for each variable index that is returned byISearchOperation.getVariablePositions(); otherwise aNullPointerExceptionwill be thrown during the calculation of the string.- Specified by:
toStringin interfaceISearchOperation
-
getVariablePositions
- Specified by:
getVariablePositionsin interfaceISearchOperation- Returns:
- the ordered list of the variable numbers that are affected by the search operation
-
getCallInformation
Description copied from interface:IPatternMatcherOperationReturns the precomputed call information associated with the current operation- Specified by:
getCallInformationin interfaceIPatternMatcherOperation
-