Class Rules
- java.lang.Object
-
- org.eclipse.viatra.transformation.evm.specific.Rules
-
public final class Rules extends java.lang.Object
Provides static methods acting on or generating aRuleSpecification
.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <Match extends IPatternMatch>
RuleSpecification<Match>newMatcherRuleSpecification(IQuerySpecification<? extends ViatraQueryMatcher<Match>> querySpecification, java.util.Set<Job<Match>> jobs)
Creates aRuleSpecification
with the given query specification and jobs, using theDefaultActivationLifeCycle#DEFAULT
life-cycle.static <Match extends IPatternMatch>
RuleSpecification<Match>newMatcherRuleSpecification(IQuerySpecification<? extends ViatraQueryMatcher<Match>> querySpecification, ActivationLifeCycle lifecycle, java.util.Set<Job<Match>> jobs)
Creates aRuleSpecification
with the given query specification, life-cycle and jobs.static <Match extends IPatternMatch>
RuleSpecification<Match>newMatcherRuleSpecification(IQuerySpecification<? extends ViatraQueryMatcher<Match>> querySpecification, ActivationLifeCycle lifecycle, java.util.Set<Job<Match>> jobs, java.lang.String name)
Creates aRuleSpecification
with the given query specification, life-cycle and jobs and name.static <Match extends IPatternMatch>
RuleSpecification<Match>newMatcherRuleSpecification(ViatraQueryMatcher<Match> matcher, ActivationLifeCycle lifecycle, java.util.Set<Job<Match>> jobs)
static <Match extends IPatternMatch>
RuleSpecification<Match>newMatcherRuleSpecification(ViatraQueryMatcher<Match> matcher, ActivationLifeCycle lifecycle, java.util.Set<Job<Match>> jobs, java.lang.String name)
static <Match extends IPatternMatch>
EventFilter<Match>newMultiMatchFilter(java.util.Collection<Match> filterMatches, ViatraQueryFilterSemantics semantics)
Creates a "multi" event filter that uses the IPatternMatch.isCompatibleWith to check event atoms against a collection of filter (partial) matches.static <Match extends IPatternMatch>
EventFilter<Match>newSingleMatchFilter(Match filterMatch)
Creates an event filter that uses the IPatternMatch.isCompatibleWith to check event atoms.
-
-
-
Method Detail
-
newMatcherRuleSpecification
public static <Match extends IPatternMatch> RuleSpecification<Match> newMatcherRuleSpecification(IQuerySpecification<? extends ViatraQueryMatcher<Match>> querySpecification, ActivationLifeCycle lifecycle, java.util.Set<Job<Match>> jobs)
Creates aRuleSpecification
with the given query specification, life-cycle and jobs. For default life-cycle implementations, seeDefaultActivationLifeCycle
.- Parameters:
querySpecification
-lifecycle
-jobs
-
-
newMatcherRuleSpecification
public static <Match extends IPatternMatch> RuleSpecification<Match> newMatcherRuleSpecification(IQuerySpecification<? extends ViatraQueryMatcher<Match>> querySpecification, ActivationLifeCycle lifecycle, java.util.Set<Job<Match>> jobs, java.lang.String name)
Creates aRuleSpecification
with the given query specification, life-cycle and jobs and name. For default life-cycle implementations, seeDefaultActivationLifeCycle
.- Parameters:
querySpecification
-lifecycle
-jobs
-name
-
-
newMatcherRuleSpecification
public static <Match extends IPatternMatch> RuleSpecification<Match> newMatcherRuleSpecification(IQuerySpecification<? extends ViatraQueryMatcher<Match>> querySpecification, java.util.Set<Job<Match>> jobs)
Creates aRuleSpecification
with the given query specification and jobs, using theDefaultActivationLifeCycle#DEFAULT
life-cycle.- Parameters:
querySpecification
-jobs
-
-
newMatcherRuleSpecification
public static <Match extends IPatternMatch> RuleSpecification<Match> newMatcherRuleSpecification(ViatraQueryMatcher<Match> matcher, ActivationLifeCycle lifecycle, java.util.Set<Job<Match>> jobs)
-
newMatcherRuleSpecification
public static <Match extends IPatternMatch> RuleSpecification<Match> newMatcherRuleSpecification(ViatraQueryMatcher<Match> matcher, ActivationLifeCycle lifecycle, java.util.Set<Job<Match>> jobs, java.lang.String name)
-
newSingleMatchFilter
public static <Match extends IPatternMatch> EventFilter<Match> newSingleMatchFilter(Match filterMatch)
Creates an event filter that uses the IPatternMatch.isCompatibleWith to check event atoms. Using the matches that are equal will result in equal filters.- Parameters:
filterMatch
- non-null match to use for filtering- Returns:
- the event filter
-
newMultiMatchFilter
public static <Match extends IPatternMatch> EventFilter<Match> newMultiMatchFilter(java.util.Collection<Match> filterMatches, ViatraQueryFilterSemantics semantics)
Creates a "multi" event filter that uses the IPatternMatch.isCompatibleWith to check event atoms against a collection of filter (partial) matches. The possible semantics are documented inViatraQueryFilterSemantics
.- Parameters:
filterMatches
- non-null match to use for filteringsemantics
- the filter semantics to use- Returns:
- the event filter
-
-