Class BinaryTransitiveClosureCheck
java.lang.Object
tools.refinery.interpreter.localsearch.operations.check.BinaryTransitiveClosureCheck
- All Implemented Interfaces:
IPatternMatcherOperation
,ISearchOperation
public class BinaryTransitiveClosureCheck
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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface tools.refinery.interpreter.localsearch.operations.ISearchOperation
ISearchOperation.ISearchOperationExecutor
-
Constructor Summary
ConstructorsConstructorDescriptionBinaryTransitiveClosureCheck
(CallInformation information, int sourcePosition, 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 TypeMethodDescriptionInitializes a new operation executor for the given operation.Returns the precomputed call information associated with the current operationtoString()
Creates a string representation of the search operation by replacing the variable numbers according to the parameter function.
-
Constructor Details
-
BinaryTransitiveClosureCheck
public BinaryTransitiveClosureCheck(CallInformation information, int sourcePosition, int targetPosition, boolean reflexive) The source position will be matched in the called pattern to the first parameter; while target to the second. NOTE: the reflexive check call does not include the parameter type checks; appropriate type checks should be added as necessary by the operation compiler.- Since:
- 2.0
-
-
Method Details
-
createExecutor
Description copied from interface:ISearchOperation
Initializes a new operation executor for the given operation. Repeated calls must return different executor instances.- Specified by:
createExecutor
in interfaceISearchOperation
-
toString
-
toString
Description copied from interface:ISearchOperation
Creates 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 aNullPointerException
will be thrown during the calculation of the string.- Specified by:
toString
in interfaceISearchOperation
-
getVariablePositions
- Specified by:
getVariablePositions
in interfaceISearchOperation
- Returns:
- the ordered list of the variable numbers that are affected by the search operation
-
getCallInformation
Description copied from interface:IPatternMatcherOperation
Returns the precomputed call information associated with the current operation- Specified by:
getCallInformation
in interfaceIPatternMatcherOperation
-