public class SameBooleanTransitionTypeMatcher extends org.eclipse.viatra.query.runtime.api.impl.BaseMatcher<SameBooleanTransitionTypeMatch>
Use the pattern matcher on a given model via on(ViatraQueryEngine)
,
e.g. in conjunction with ViatraQueryEngine#on(Notifier)
.
Matches of the pattern will be represented as SameBooleanTransitionTypeMatch
.
Original source:
pattern sameBooleanTransitionType(transition1 : TypedTransition, transition2 : TypedTransition){
find negativeTransition(transition1);
find negativeTransition(transition2);
} or {
neg find negativeTransition(transition1);
neg find negativeTransition(transition2);
}
SameBooleanTransitionTypeMatch
,
SameBooleanTransitionTypeProcessor
,
SameBooleanTransitionTypeQuerySpecification
Modifier and Type | Method and Description |
---|---|
int |
countMatches(TypedTransition pTransition1,
TypedTransition pTransition2)
Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
|
void |
forEachMatch(TypedTransition pTransition1,
TypedTransition pTransition2,
org.eclipse.viatra.query.runtime.api.IMatchProcessor<? super SameBooleanTransitionTypeMatch> processor)
Executes the given processor on each match of the pattern that conforms to the given fixed values of some parameters.
|
boolean |
forOneArbitraryMatch(TypedTransition pTransition1,
TypedTransition pTransition2,
org.eclipse.viatra.query.runtime.api.IMatchProcessor<? super SameBooleanTransitionTypeMatch> processor)
Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
|
java.util.Collection<SameBooleanTransitionTypeMatch> |
getAllMatches(TypedTransition pTransition1,
TypedTransition pTransition2)
Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
|
java.util.Set<TypedTransition> |
getAllValuesOftransition1()
Retrieve the set of values that occur in matches for transition1.
|
java.util.Set<TypedTransition> |
getAllValuesOftransition1(SameBooleanTransitionTypeMatch partialMatch)
Retrieve the set of values that occur in matches for transition1.
|
java.util.Set<TypedTransition> |
getAllValuesOftransition1(TypedTransition pTransition2)
Retrieve the set of values that occur in matches for transition1.
|
java.util.Set<TypedTransition> |
getAllValuesOftransition2()
Retrieve the set of values that occur in matches for transition2.
|
java.util.Set<TypedTransition> |
getAllValuesOftransition2(SameBooleanTransitionTypeMatch partialMatch)
Retrieve the set of values that occur in matches for transition2.
|
java.util.Set<TypedTransition> |
getAllValuesOftransition2(TypedTransition pTransition1)
Retrieve the set of values that occur in matches for transition2.
|
SameBooleanTransitionTypeMatch |
getOneArbitraryMatch(TypedTransition pTransition1,
TypedTransition pTransition2)
Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
|
boolean |
hasMatch(TypedTransition pTransition1,
TypedTransition pTransition2)
Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
under any possible substitution of the unspecified parameters (if any).
|
SameBooleanTransitionTypeMatch |
newMatch(TypedTransition pTransition1,
TypedTransition pTransition2)
Returns a new (partial) match.
|
static SameBooleanTransitionTypeMatcher |
on(org.eclipse.viatra.query.runtime.api.ViatraQueryEngine engine)
Initializes the pattern matcher within an existing VIATRA Query engine.
|
static org.eclipse.viatra.query.runtime.api.IQuerySpecification<SameBooleanTransitionTypeMatcher> |
querySpecification() |
countMatches, countMatches, forEachMatch, forEachMatch, forOneArbitraryMatch, forOneArbitraryMatch, getAllMatches, getAllMatches, getAllValues, getAllValues, getEngine, getOneArbitraryMatch, getOneArbitraryMatch, getParameterNames, getPatternName, getPositionOfParameter, getSpecification, hasMatch, newEmptyMatch, newMatch
public static SameBooleanTransitionTypeMatcher on(org.eclipse.viatra.query.runtime.api.ViatraQueryEngine engine) throws org.eclipse.viatra.query.runtime.exception.ViatraQueryException
engine
- the existing VIATRA Query engine in which this matcher will be created.org.eclipse.viatra.query.runtime.exception.ViatraQueryException
- if an error occurs during pattern matcher creationpublic java.util.Collection<SameBooleanTransitionTypeMatch> getAllMatches(TypedTransition pTransition1, TypedTransition pTransition2)
pTransition1
- the fixed value of pattern parameter transition1, or null if not bound.pTransition2
- the fixed value of pattern parameter transition2, or null if not bound.public SameBooleanTransitionTypeMatch getOneArbitraryMatch(TypedTransition pTransition1, TypedTransition pTransition2)
pTransition1
- the fixed value of pattern parameter transition1, or null if not bound.pTransition2
- the fixed value of pattern parameter transition2, or null if not bound.public boolean hasMatch(TypedTransition pTransition1, TypedTransition pTransition2)
pTransition1
- the fixed value of pattern parameter transition1, or null if not bound.pTransition2
- the fixed value of pattern parameter transition2, or null if not bound.public int countMatches(TypedTransition pTransition1, TypedTransition pTransition2)
pTransition1
- the fixed value of pattern parameter transition1, or null if not bound.pTransition2
- the fixed value of pattern parameter transition2, or null if not bound.public void forEachMatch(TypedTransition pTransition1, TypedTransition pTransition2, org.eclipse.viatra.query.runtime.api.IMatchProcessor<? super SameBooleanTransitionTypeMatch> processor)
pTransition1
- the fixed value of pattern parameter transition1, or null if not bound.pTransition2
- the fixed value of pattern parameter transition2, or null if not bound.processor
- the action that will process each pattern match.public boolean forOneArbitraryMatch(TypedTransition pTransition1, TypedTransition pTransition2, org.eclipse.viatra.query.runtime.api.IMatchProcessor<? super SameBooleanTransitionTypeMatch> processor)
pTransition1
- the fixed value of pattern parameter transition1, or null if not bound.pTransition2
- the fixed value of pattern parameter transition2, or null if not bound.processor
- the action that will process the selected match.public SameBooleanTransitionTypeMatch newMatch(TypedTransition pTransition1, TypedTransition pTransition2)
The returned match will be immutable. Use BaseMatcher.newEmptyMatch()
to obtain a mutable match object.
pTransition1
- the fixed value of pattern parameter transition1, or null if not bound.pTransition2
- the fixed value of pattern parameter transition2, or null if not bound.public java.util.Set<TypedTransition> getAllValuesOftransition1()
public java.util.Set<TypedTransition> getAllValuesOftransition1(SameBooleanTransitionTypeMatch partialMatch)
public java.util.Set<TypedTransition> getAllValuesOftransition1(TypedTransition pTransition2)
public java.util.Set<TypedTransition> getAllValuesOftransition2()
public java.util.Set<TypedTransition> getAllValuesOftransition2(SameBooleanTransitionTypeMatch partialMatch)
public java.util.Set<TypedTransition> getAllValuesOftransition2(TypedTransition pTransition1)
public static org.eclipse.viatra.query.runtime.api.IQuerySpecification<SameBooleanTransitionTypeMatcher> querySpecification() throws org.eclipse.viatra.query.runtime.exception.ViatraQueryException
org.eclipse.viatra.query.runtime.exception.ViatraQueryException
- if the pattern definition could not be loaded