harpoon.Analysis.DataFlow
Class DataFlowBasicBlockVisitor

java.lang.Object
  extended by harpoon.Analysis.BasicBlockInterfVisitor
      extended by harpoon.Analysis.DataFlow.DataFlowBasicBlockVisitor
Direct Known Subclasses:
BackwardDataFlowBasicBlockVisitor, ForwardDataFlowBasicBlockVisitor

public abstract class DataFlowBasicBlockVisitor
extends BasicBlockInterfVisitor

DataFlowBasicBlockVisitor is a specialized BasicBlockVisitor for performing data flow analysis on a set of BasicBlock.

Version:
$Id: DataFlowBasicBlockVisitor.java,v 1.6 2004/02/08 01:51:05 cananian Exp $
Author:
John Whaley <jwhaley@alum.mit.edu>

Constructor Summary
DataFlowBasicBlockVisitor()
           
 
Method Summary
abstract  void addSuccessors(WorkSet W, BasicBlockInterf q)
          Adds the successors of the basic block q to the worklist W, performing merge operations if necessary.
static void db(String s)
           
abstract  boolean merge(BasicBlockInterf from, BasicBlockInterf to)
          Merges operation on the from and to basic block.
abstract  void visit(BasicBlock b)
          Performs some transfer function on a basic block b.
 void visit(BasicBlockInterf b)
          Performs some transfer function on a basic block b.
 
Methods inherited from class harpoon.Analysis.BasicBlockInterfVisitor
visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataFlowBasicBlockVisitor

public DataFlowBasicBlockVisitor()
Method Detail

db

public static void db(String s)

addSuccessors

public abstract void addSuccessors(WorkSet W,
                                   BasicBlockInterf q)
Adds the successors of the basic block q to the worklist W, performing merge operations if necessary.


merge

public abstract boolean merge(BasicBlockInterf from,
                              BasicBlockInterf to)
Merges operation on the from and to basic block. Returns true if the to basic block changes.
NOTE: "changes" above refers to our knowledge about the basic block changing, not the contents of the basic block itself, which shouldn't be modified during Analysis. Thus, an appropriate "change" would be a variable being added to the IN-set of 'to' during Forward Dataflow Analysis.


visit

public abstract void visit(BasicBlock b)
Performs some transfer function on a basic block b.
NOTE: Transfer functions must be monotonic for dataflow analysis to terminate.

Overrides:
visit in class BasicBlockInterfVisitor

visit

public void visit(BasicBlockInterf b)
Performs some transfer function on a basic block b.
NOTE: Transfer functions must be monotonic for dataflow analysis to terminate.

Specified by:
visit in class BasicBlockInterfVisitor