java.lang.Object
org.bigraphs.framework.simulation.matching.AbstractBigraphMatcher<B>
- Type Parameters:
B
- type of the bigraph
- Direct Known Subclasses:
PureBigraphMatcher
public abstract class AbstractBigraphMatcher<B extends Bigraph<? extends Signature<?>>>
extends Object
This class is responsible for executing bigraph matching. A bigraph matcher consists of a bigraph
matching engine. A concrete matcher with the corresponding matching engine w.r.t. to the bigraph type. The correct one,
is created using the factory method
create(Class)
by supplying the bigraph type as class.
The matcher needs an agent and redex to perform bigraph matching.
Matches are then returned via an iterator for easier access of the results The instances of the matches are of type
BigraphMatch
.
The matching engine/iterator can later also access/override a so-called "custom constraint matching method"
(not yet implemented) to additionally specify some user-defined constraints (e.g., match attributes).
With other words: This class works like a factory to return the matches as iterables of class BigraphMatch
.
- Author:
- Dominik Grzelak
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <B extends Bigraph<? extends Signature<?>>>
AbstractBigraphMatcher<B>getAgent()
Returns the supplied agent passed via thematch(Bigraph, ReactionRule)
method.getRedex()
Returns the supplied redex passed via thematch(Bigraph, ReactionRule)
method.protected abstract BigraphMatchingEngine<B>
Provide the matching engine for the specific bigraph type implemented by the sub classabstract <M extends BigraphMatch<B>>
MatchIterable<M>match
(B agent, ReactionRule<B> rule)
-
Field Details
-
agent
-
redex
-
rule
-
-
Constructor Details
-
AbstractBigraphMatcher
protected AbstractBigraphMatcher()
-
-
Method Details
-
create
public static <B extends Bigraph<? extends Signature<?>>> AbstractBigraphMatcher<B> create(Class<B> bigraphClass) -
match
-
instantiateEngine
Provide the matching engine for the specific bigraph type implemented by the sub class- Returns:
- concrete bigraph matching engine
-
getAgent
Returns the supplied agent passed via thematch(Bigraph, ReactionRule)
method.- Returns:
- the agent for the match
-
getRedex
Returns the supplied redex passed via thematch(Bigraph, ReactionRule)
method.- Returns:
- the redex for the match
-