java.lang.Object
org.bigraphs.framework.simulation.modelchecking.ModelCheckingStrategySupport<B>
- All Implemented Interfaces:
ModelCheckingStrategy<B>
- Direct Known Subclasses:
BreadthFirstStrategy,DepthFirstStrategy,RandomAgentModelCheckingStrategy
public abstract class ModelCheckingStrategySupport<B extends Bigraph<? extends Signature<?>>>
extends Object
implements ModelCheckingStrategy<B>
Base class for supporting model checking strategy implementations.
Provides some useful method to keep subclasses simple.
- Author:
- Dominik Grzelak
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classModelCheckingStrategySupport.MatchResult<B extends Bigraph<? extends Signature<?>>> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected JLibBigBigraphDecoderprotected JLibBigBigraphEncoderprotected org.slf4j.Loggerprotected BigraphModelChecker<B> protected intprotected PredicateChecker<B> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidaddToWorklist(Collection<B> worklist, B bigraph) protected abstract Collection<B> protected voidevaluatePredicates(B agent, String canonical, String root) protected MatchIterable<BigraphMatch<B>> getBigraphMatches(ReactionRule<B> rule, B theAgent) Retrieves all matches of the given reaction rule for the provided agent bigraph.protected abstract BremoveNext(Collection<B> worklist) protected voidvoidMain method for model checking.
-
Field Details
-
logger
protected org.slf4j.Logger logger -
modelChecker
-
predicateChecker
-
occurrenceCounter
protected int occurrenceCounter -
decoder
-
encoder
-
-
Constructor Details
-
ModelCheckingStrategySupport
-
-
Method Details
-
createWorklist
-
removeNext
-
addToWorklist
-
resetOccurrenceCounter
protected void resetOccurrenceCounter() -
synthesizeTransitionSystem
public void synthesizeTransitionSystem()Main method for model checking. The mode of traversal can be changed by implementing thecreateWorklist()andremoveNext(Collection)methods.Alternatively, the #synthesizeTransitionSystem() method can be simply overridden.
- Specified by:
synthesizeTransitionSystemin interfaceModelCheckingStrategy<B extends Bigraph<? extends Signature<?>>>
-
getBigraphMatches
Retrieves all matches of the given reaction rule for the provided agent bigraph.Subclasses may override this method to introduce additional filtering, pruning strategies, or domain-specific constraints on the match set (e.g., restricting matches by attributes, spatial bounds, or metadata).
By default, this method delegates to the underlying
AbstractBigraphMatcher.- Parameters:
rule- the reaction rule whose redex will be matched against the agenttheAgent- the agent (host) bigraph in which matches should be searched- Returns:
- an iterable collection of all matches found for the given rule on the agent;
never
null, but may be empty if no matches exist. Depends onAbstractBigraphMatcher.
-
evaluatePredicates
-