agg.parser
Class DependencyPair

java.lang.Object
  extended by agg.parser.ExcludePair
      extended by agg.parser.DependencyPair
All Implemented Interfaces:
CriticalPair
Direct Known Subclasses:
LayeredDependencyPair, PriorityDependencyPair, SimpleDependencyPair

public class DependencyPair
extends ExcludePair

This class contains the algorithm to decide if one rule depends of another rule.


Field Summary
protected  boolean completeConcurrency
           
protected  java.util.List<ConcurrentRule> concurrentRules
           
protected  OrdinaryMorphism isoLeft
           
protected  OrdinaryMorphism isoRight
           
protected  java.util.Hashtable<OrdinaryMorphism,Pair<OrdinaryMorphism,OrdinaryMorphism>> leftNAC2extLeft
           
protected  java.util.Hashtable<OrdinaryMorphism,Pair<OrdinaryMorphism,OrdinaryMorphism>> leftPAC2extLeft
           
protected  boolean makeConcurrentRules
           
protected  boolean switchDependency
           
 
Fields inherited from class agg.parser.ExcludePair
boundB1_l1, boundB1_r1, checkDependencyCond2, complete, computable, consistencyCheck, consistentOnly, contextC1_l1, contextC1_r1, criticalNACOfR2exists, dangling, danglingEdge, danglingEdges, delete, dependencyCond1, dependencyCond2, equalVariableNameOfAttrMapping, essential, grammar, ignoreIdenticalRules, levelOfTypeGraphCheck, maxOverlapping, maxOverlapSize, ownStrategy, preservedChanged, preservedK1_l1, preservedK1_r1, produce, reduce, reduceSameMatch, stop, strategy, strongAttrCheck, typesTG_L2, typesTG_NAC2, typesTG_PAC2, withInheritance, withNACs, withPACs
 
Fields inherited from interface agg.parser.CriticalPair
CONFLICT, CONFLICTFREE, DEPENDENCY, EXCLUDE, TRIGGER_DEPENDENCY, TRIGGER_SWITCH_DEPENDENCY
 
Constructor Summary
DependencyPair()
          Creates a new object to compute critical pairs.
 
Method Summary
 void dispose()
           
 void enableProduceConcurrentRule(boolean b)
           
 void enableSwitchDependency(boolean b)
           
 java.util.List<ConcurrentRule> getConcurrentRules()
           
 java.util.Vector<Pair<Pair<OrdinaryMorphism,OrdinaryMorphism>,Pair<OrdinaryMorphism,OrdinaryMorphism>>> isCritical(int kind, Rule r1, Rule r2)
          computes critical pairs of the specified kind.
protected  Rule makeAbstractInverseRule(Rule r)
          Make abstract inverted rule : R -> L.
protected  Rule makeInverseRule(Rule r)
          Make abstract inverse rule : R -> L.
 void setCompleteConcurrency(boolean b)
           
 
Methods inherited from class agg.parser.ExcludePair
attributeCheckFailed, checkGlobalNACsOfRule2, checkGraphConsistency, destroyOverlapping, disableCheckOfGraphConstraints, enableComplete, enableConsistent, enableEqualVariableNameOfAttrMapping, enableIgnoreIdenticalRules, enableNACs, enablePACs, enableReduce, enableReduceSameMatch, enableStrongAttrCheck, extendLeftGraphByNAC, extendLeftGraphByPAC, getNumberOfKindOfPairs, isExclude, resetCheckOfGraphConstraints, ruleChangesAttributes, setGraGra, setMorphismCompletionStrategy, stop, unsetAllTransientAttrValuesOfOverlapGrah, unsetAllTransientAttrValuesOfRule
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

switchDependency

protected boolean switchDependency

makeConcurrentRules

protected boolean makeConcurrentRules

completeConcurrency

protected boolean completeConcurrency

concurrentRules

protected java.util.List<ConcurrentRule> concurrentRules

isoRight

protected OrdinaryMorphism isoRight

isoLeft

protected OrdinaryMorphism isoLeft

leftNAC2extLeft

protected java.util.Hashtable<OrdinaryMorphism,Pair<OrdinaryMorphism,OrdinaryMorphism>> leftNAC2extLeft

leftPAC2extLeft

protected java.util.Hashtable<OrdinaryMorphism,Pair<OrdinaryMorphism,OrdinaryMorphism>> leftPAC2extLeft
Constructor Detail

DependencyPair

public DependencyPair()
Creates a new object to compute critical pairs.

Method Detail

dispose

public void dispose()
Overrides:
dispose in class ExcludePair

enableSwitchDependency

public void enableSwitchDependency(boolean b)

enableProduceConcurrentRule

public void enableProduceConcurrentRule(boolean b)

setCompleteConcurrency

public void setCompleteConcurrency(boolean b)

getConcurrentRules

public java.util.List<ConcurrentRule> getConcurrentRules()

makeAbstractInverseRule

protected Rule makeAbstractInverseRule(Rule r)
Make abstract inverted rule : R -> L. That means: - copy RHS to LHS of the result rule, - copy LHS to RHS of the result rule, - convert rule morphism, - replace attr. expression of RHS by variable, - attr. conditions will be ignored, - NACs will be ignored. Note: the specified rule r has to be injective, otherwise returns null.


makeInverseRule

protected Rule makeInverseRule(Rule r)
Make abstract inverse rule : R -> L. That means: - copy RHS to LHS of the result rule, - copy LHS to RHS of the result rule, - convert rule morphism, - convert NACs, - replace attr. expression of RHS by variable, - convert attr. conditions. Note: the specified rule r has to be injective, otherwise returns null.


isCritical

public java.util.Vector<Pair<Pair<OrdinaryMorphism,OrdinaryMorphism>,Pair<OrdinaryMorphism,OrdinaryMorphism>>> isCritical(int kind,
                                                                                                                          Rule r1,
                                                                                                                          Rule r2)
                                                                                                                   throws InvalidAlgorithmException
computes critical pairs of the specified kind. Returns null if the specified rule pair is not critical, otherwise an object which can explain in which way this pair is critical. One possible object can be a Vector of overlapping graphs. If a kind is requested which cannot be computed an InvalidAlgorithmException is thrown.

Specified by:
isCritical in interface CriticalPair
Overrides:
isCritical in class ExcludePair
Parameters:
kind - specifies the kind of critical pair CriticalPair.
r1 - defines the first part which can be critical
r2 - the second part which can be critical
Returns:
The object which is critic of the two rules
Throws:
InvalidAlgorithmException - Thrown if a illegal algorithm is selected.