org.semanticweb.HermiT.existentials
Class StrategyBase

java.lang.Object
  extended by org.semanticweb.HermiT.existentials.StrategyBase
All Implemented Interfaces:
ExpansionStrategy
Direct Known Subclasses:
CreationOrderStrategy, DepthFirstStrategy, IndividualReuseStrategy

public abstract class StrategyBase
extends java.lang.Object
implements ExpansionStrategy

Implements the common bits of an ExistentialsExpansionStrategy, leaving only actual processing of existentials in need of expansion to subclasses.


Nested Class Summary
protected static interface StrategyBase.Expander
          The real work of expansion is delegated to an Expander object by the expandExistentials(Expander) method.
 
Field Summary
protected  BlockingStrategy blockingStrategy
           
protected  java.util.Collection<ExistentialConcept> curExistentials
          Cache for expandExistentials to prevent concurrent modification
protected  DescriptionGraphManager descriptionGraphManager
           
protected  ExistentialExpansionManager existentialExpansionManager
           
protected  ExtensionManager extensionManager
           
protected  Tableau tableau
           
 
Constructor Summary
StrategyBase(BlockingStrategy strategy)
           
 
Method Summary
 void assertionAdded(AtomicRole atomicRole, Node nodeFrom, Node nodeTo)
           
 void assertionAdded(Concept concept, Node node)
           
 void assertionRemoved(AtomicRole atomicRole, Node nodeFrom, Node nodeTo)
           
 void assertionRemoved(Concept concept, Node node)
           
 void backtrack()
           
 void branchingPointPushed()
           
 void clear()
           
protected  boolean expandExistentials(StrategyBase.Expander e)
          provides a hook subclasses can use to implement their own (no-argument) expandExistentials() method.
 void initialize(Tableau tableau)
           
 boolean isDeterministic()
           
 void modelFound()
           
 void nodeDestroyed(Node node)
           
 void nodeStatusChanged(Node node)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.semanticweb.HermiT.existentials.ExpansionStrategy
expandExistentials
 

Field Detail

blockingStrategy

protected final BlockingStrategy blockingStrategy

tableau

protected Tableau tableau

extensionManager

protected ExtensionManager extensionManager

existentialExpansionManager

protected ExistentialExpansionManager existentialExpansionManager

descriptionGraphManager

protected DescriptionGraphManager descriptionGraphManager

curExistentials

protected java.util.Collection<ExistentialConcept> curExistentials
Cache for expandExistentials to prevent concurrent modification

Constructor Detail

StrategyBase

public StrategyBase(BlockingStrategy strategy)
Method Detail

initialize

public void initialize(Tableau tableau)
Specified by:
initialize in interface ExpansionStrategy

clear

public void clear()
Specified by:
clear in interface ExpansionStrategy

expandExistentials

protected boolean expandExistentials(StrategyBase.Expander e)
provides a hook subclasses can use to implement their own (no-argument) expandExistentials() method. Calls e.expand(...) for each unsatisfied existential in the tableau, or until some call to e.expand returns true.

Returns:
e.completeExpansion()

assertionAdded

public void assertionAdded(Concept concept,
                           Node node)
Specified by:
assertionAdded in interface ExpansionStrategy

assertionRemoved

public void assertionRemoved(Concept concept,
                             Node node)
Specified by:
assertionRemoved in interface ExpansionStrategy

assertionAdded

public void assertionAdded(AtomicRole atomicRole,
                           Node nodeFrom,
                           Node nodeTo)
Specified by:
assertionAdded in interface ExpansionStrategy

assertionRemoved

public void assertionRemoved(AtomicRole atomicRole,
                             Node nodeFrom,
                             Node nodeTo)
Specified by:
assertionRemoved in interface ExpansionStrategy

nodeStatusChanged

public void nodeStatusChanged(Node node)
Specified by:
nodeStatusChanged in interface ExpansionStrategy

nodeDestroyed

public void nodeDestroyed(Node node)
Specified by:
nodeDestroyed in interface ExpansionStrategy

branchingPointPushed

public void branchingPointPushed()
Specified by:
branchingPointPushed in interface ExpansionStrategy

backtrack

public void backtrack()
Specified by:
backtrack in interface ExpansionStrategy

modelFound

public void modelFound()
Specified by:
modelFound in interface ExpansionStrategy

isDeterministic

public boolean isDeterministic()
Specified by:
isDeterministic in interface ExpansionStrategy