|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectagg.parser.AbstractParser
agg.parser.ExcludeParser
public class ExcludeParser
This class provides a parser which needs critical pairs. The criticl pair
must be ExcludePair
. So objects has to be instaciated with
ExcludePairContainer
. To be independent of a grammar it is
necessary to instanciate a object with a host graph and stop graph
seperately.
Field Summary | |
---|---|
protected boolean |
correct
|
protected com.objectspace.jgl.Stack |
stack
Main part of a backtracking algorithm |
protected boolean |
stop
|
Fields inherited from class agg.parser.AbstractParser |
---|
delay, grammar, graph, listener, pairContainer, stopGraph |
Constructor Summary | |
---|---|
ExcludeParser(GraGra grammar,
Graph hostGraph,
Graph stopGraph,
ExcludePairContainer excludeContainer)
Creates a new parser. |
Method Summary | |
---|---|
protected void |
finalize()
Clears some internal stuff. |
protected java.util.Vector<Pair<OrdinaryMorphism,OrdinaryMorphism>> |
findInclusions(Rule r1,
int kind)
Returns all inclusion of the overlapping of a given rule into the host graph. |
protected boolean |
isMatchCritic(Match m,
java.util.Vector<Pair<OrdinaryMorphism,OrdinaryMorphism>> inclusions)
Checks if a current match is critic. |
protected void |
makeLightContainer(java.util.Hashtable<Rule,java.util.Hashtable<Rule,Pair<java.lang.Boolean,java.util.Vector<Pair<Pair<OrdinaryMorphism,OrdinaryMorphism>,Pair<OrdinaryMorphism,OrdinaryMorphism>>>>>> in,
java.util.Hashtable<Rule,java.util.Hashtable<Rule,Pair<java.lang.Boolean,java.util.Vector<Pair<Pair<OrdinaryMorphism,OrdinaryMorphism>,Pair<OrdinaryMorphism,OrdinaryMorphism>>>>>> out)
A container stores all pairs with the information if two rules critic or not. |
boolean |
parse()
Starts the parser. |
void |
run()
Usually this method is invoked by the start method from the class Thread . |
void |
stop()
Stops the running. |
boolean |
wasStopped()
|
Methods inherited from class agg.parser.AbstractParser |
---|
addParserEventListener, applyRule, findMatch, findMatch, fireParserEvent, getGraph, getHostGraph, getStopGraph, parseString, printGraph, printImageGraph, removeParserEventListener, setCriticalPairs, setDelayAfterApplyRule, setGrammar, setHostGraph, setStopGraph |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected com.objectspace.jgl.Stack stack
protected boolean stop
protected boolean correct
Constructor Detail |
---|
public ExcludeParser(GraGra grammar, Graph hostGraph, Graph stopGraph, ExcludePairContainer excludeContainer)
grammar
- The graph grammar.hostGraph
- The host graph.stopGraph
- The stop graph.excludeContainer
- The critical pairs.Method Detail |
---|
public boolean parse()
parse
in interface Parser
parse
in class AbstractParser
protected void finalize()
finalize
in class AbstractParser
protected void makeLightContainer(java.util.Hashtable<Rule,java.util.Hashtable<Rule,Pair<java.lang.Boolean,java.util.Vector<Pair<Pair<OrdinaryMorphism,OrdinaryMorphism>,Pair<OrdinaryMorphism,OrdinaryMorphism>>>>>> in, java.util.Hashtable<Rule,java.util.Hashtable<Rule,Pair<java.lang.Boolean,java.util.Vector<Pair<Pair<OrdinaryMorphism,OrdinaryMorphism>,Pair<OrdinaryMorphism,OrdinaryMorphism>>>>>> out)
in
- The complete container.out
- The new filtered container.protected java.util.Vector<Pair<OrdinaryMorphism,OrdinaryMorphism>> findInclusions(Rule r1, int kind)
r1
- The rulekind
- The critical pair algorithm.
protected boolean isMatchCritic(Match m, java.util.Vector<Pair<OrdinaryMorphism,OrdinaryMorphism>> inclusions)
m
- The match.inclusions
- The set of inclusions from overlapping graphs into the host
graph.
public void run()
Thread
.
This method starts the parse method.
run
in interface java.lang.Runnable
public void stop()
public boolean wasStopped()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |