org.jtool.jxplatform.graph.cfg
Class GetConstrainedReachableNodes

java.lang.Object
  extended byorg.jtool.jxplatform.graph.cfg.GetConstrainedReachableNodes

public class GetConstrainedReachableNodes
extends java.lang.Object

Calculates constrained reachable nodes on a CFG.

Author:
Katsuhsa Maruyama

Constructor Summary
GetConstrainedReachableNodes(CFG cfg, CFGNode fromNode, CFGNode toNode)
          Calculates constrained reachable path nodes between two CFG nodes and records nodes in the path.
 
Method Summary
 boolean contains(CFGNode node)
          Tests if the collection of the reachable nodes contains a node.
 boolean isEmpty()
          Tests if there is no reachable node.
 java.util.Iterator iterator()
          Returns an iterator of the collection of the reachable nodes in proper sequence.
 void printNodes()
          Displays information about the collected nodes for debugging.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GetConstrainedReachableNodes

public GetConstrainedReachableNodes(CFG cfg,
                                    CFGNode fromNode,
                                    CFGNode toNode)
Calculates constrained reachable path nodes between two CFG nodes and records nodes in the path.

Parameters:
cfg - A CFG.
fromNode - A start node of reachable path to be calculated.
toNode - An end node of reachable path to be calculated.
Method Detail

contains

public boolean contains(CFGNode node)
Tests if the collection of the reachable nodes contains a node.

Parameters:
node - A CFG node to be tested.
Returns:
true if the reachable nodes contains the specified node, otherwise false.

isEmpty

public boolean isEmpty()
Tests if there is no reachable node.

Returns:
true if there is no reachable node, otherwise false.

iterator

public java.util.Iterator iterator()
Returns an iterator of the collection of the reachable nodes in proper sequence.

Returns:
The iterator of the collection of the reachable nodes.

printNodes

public void printNodes()
Displays information about the collected nodes for debugging.