edu.ksu.cis.projects.bogor.module.backtrack
Class CompoundBacktrackingInfo

java.lang.Object
  extended by edu.ksu.cis.projects.bogor.module.backtrack.CompoundBacktrackingInfo
All Implemented Interfaces:
IBacktrackingInfo, Disposable

public final class CompoundBacktrackingInfo
extends Object
implements IBacktrackingInfo

An aggregator for backtracking actions. This is the acceptable mechanism for composing smaller, reusable actions when implementing an actiondef extension.

Version:
CVS $Revision: 1.1 $ $Date: 2005/02/11 22:33:25 $
Author:
Matt Hoosier

Constructor Summary
CompoundBacktrackingInfo(Node node, ISchedulingStrategyInfo ssi, int stateId, int threadId, List<IBacktrackingInfo> bis)
           
 
Method Summary
 void backtrack(IState state)
           
 IBacktrackingInfo clone(Map<Object,Object> cloneMap)
           
 void dispose()
          Remove references.
 Node getNode()
          The point from which re-searching should start, if this reverse delta corresponds to a choice point.
 ISchedulingStrategyInfo getSchedulingStrategyInfo()
           
 int getStateId()
          Fingerprint of state most recently stored in current DFS descent
 int getThreadId()
          The descriptor of the thread which took the forward version of this action.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompoundBacktrackingInfo

public CompoundBacktrackingInfo(Node node,
                                ISchedulingStrategyInfo ssi,
                                int stateId,
                                int threadId,
                                List<IBacktrackingInfo> bis)
Parameters:
node - node whose execution this backtracking action reverses
ssi - scheduling information used during execution of node
stateId - state ID of system at beginning of transformation containing node
threadId - thread executing node
bis -

a series of backtracking infos which should be applied.

Chronologically, they will be applied in the reverse order of their appearance in bis. That is,

      bis.get(bis.size() - 1).backtrack(...);
      bis.get(bis.size() - 2).backtrack(...);
      ...
      bis.get(0).backtrack(...);
      
Method Detail

getNode

public Node getNode()
Description copied from interface: IBacktrackingInfo
The point from which re-searching should start, if this reverse delta corresponds to a choice point.

Specified by:
getNode in interface IBacktrackingInfo

getSchedulingStrategyInfo

public ISchedulingStrategyInfo getSchedulingStrategyInfo()
Specified by:
getSchedulingStrategyInfo in interface IBacktrackingInfo

getStateId

public int getStateId()
Description copied from interface: IBacktrackingInfo
Fingerprint of state most recently stored in current DFS descent

Specified by:
getStateId in interface IBacktrackingInfo

getThreadId

public int getThreadId()
Description copied from interface: IBacktrackingInfo
The descriptor of the thread which took the forward version of this action.

Specified by:
getThreadId in interface IBacktrackingInfo

backtrack

public void backtrack(IState state)
Specified by:
backtrack in interface IBacktrackingInfo

clone

public IBacktrackingInfo clone(Map<Object,Object> cloneMap)
Specified by:
clone in interface IBacktrackingInfo

dispose

public void dispose()
Description copied from interface: Disposable
Remove references. Once called, avoid using this object.

Specified by:
dispose in interface Disposable