org.kahina.lp.profiler
Class LogicProgrammingProfiler

java.lang.Object
  extended by org.kahina.lp.profiler.LogicProgrammingProfiler
All Implemented Interfaces:
KahinaListener
Direct Known Subclasses:
PrologProfiler, TraleSLDProfiler

public class LogicProgrammingProfiler
extends Object
implements KahinaListener


Field Summary
protected  LogicProgrammingInstance<?,?,?> kahina
           
 
Constructor Summary
LogicProgrammingProfiler(LogicProgrammingInstance<?,?,?> kahina, Mapper<String,ProfileEntry> mapper, LogicProgrammingProfile profile)
           
 
Method Summary
protected  void call(int id)
           
protected  void exception(int id)
           
protected  void exit(int id)
           
protected  void fail(int id)
           
 LogicProgrammingProfile getProfile()
           
protected  ProfileEntry getProfileEntryForStepID(int stepID)
           
 void processEvent(KahinaEvent event)
           
protected  void profileNode(KahinaTree tree, KahinaTree contentfulTree, int stepID, LogicProgrammingProfile profile)
           
protected  void profileNode(LogicProgrammingStep step, KahinaTree tree, KahinaTree contentfulTree, int stepID, LogicProgrammingProfile profile)
           
protected  void profileNode(ProfileEntry entry, LogicProgrammingStep step, KahinaTree tree, KahinaTree contentfulTree, int stepID, LogicProgrammingProfile profile)
           
 LogicProgrammingProfile profileSubtree(KahinaTree tree, KahinaTree contentfulTree, int subtreeRootID)
          Creates a profile for the subtree rooted in a given node.
protected  void redo(int id)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

kahina

protected final LogicProgrammingInstance<?,?,?> kahina
Constructor Detail

LogicProgrammingProfiler

public LogicProgrammingProfiler(LogicProgrammingInstance<?,?,?> kahina,
                                Mapper<String,ProfileEntry> mapper,
                                LogicProgrammingProfile profile)
Method Detail

processEvent

public void processEvent(KahinaEvent event)
Specified by:
processEvent in interface KahinaListener

call

protected void call(int id)

fail

protected void fail(int id)

exception

protected void exception(int id)

exit

protected void exit(int id)

redo

protected void redo(int id)

getProfileEntryForStepID

protected ProfileEntry getProfileEntryForStepID(int stepID)

getProfile

public LogicProgrammingProfile getProfile()

profileSubtree

public LogicProgrammingProfile profileSubtree(KahinaTree tree,
                                              KahinaTree contentfulTree,
                                              int subtreeRootID)
Creates a profile for the subtree rooted in a given node.

Parameters:
tree - The tree object used for determining the descendants of the node given as subtree node. This can either be the primary or the secondary tree.
contentfulTree - The tree object used for determinining the status of nodes. This usually needs to be the primary tree, as in the current architecture, node statuses and labels are only stored in the primary tree.
subtreeRootID - The (internal) ID of the root of the subtree the caller wants to profile.
Returns:
A profile for the specified subtree.

profileNode

protected void profileNode(KahinaTree tree,
                           KahinaTree contentfulTree,
                           int stepID,
                           LogicProgrammingProfile profile)

profileNode

protected void profileNode(LogicProgrammingStep step,
                           KahinaTree tree,
                           KahinaTree contentfulTree,
                           int stepID,
                           LogicProgrammingProfile profile)

profileNode

protected void profileNode(ProfileEntry entry,
                           LogicProgrammingStep step,
                           KahinaTree tree,
                           KahinaTree contentfulTree,
                           int stepID,
                           LogicProgrammingProfile profile)