joeq.Compiler.Quad
Class Dominators

java.lang.Object
  extended by joeq.Class.jq_MethodVisitor.EmptyVisitor
      extended by joeq.Compiler.Quad.Dominators
All Implemented Interfaces:
jq_MethodVisitor, BasicBlockVisitor

public class Dominators
extends jq_MethodVisitor.EmptyVisitor
implements BasicBlockVisitor

Version:
$Id: Dominators.java 2465 2006-06-07 23:03:17Z joewhaley $
Author:
John Whaley

Nested Class Summary
static class Dominators.DominatorNode
           
 
Nested classes/interfaces inherited from interface joeq.Compiler.Quad.BasicBlockVisitor
BasicBlockVisitor.AllBasicBlockVisitor, BasicBlockVisitor.EmptyVisitor
 
Nested classes/interfaces inherited from interface joeq.Class.jq_MethodVisitor
jq_MethodVisitor.DeclaredMethodVisitor, jq_MethodVisitor.EmptyVisitor
 
Field Summary
protected  BasicBlock[] bbs
           
protected  ControlFlowGraph cfg
           
protected  boolean change
           
 boolean direction
           
static jwutil.graphs.Navigator dom_nav
           
 jwutil.math.BitString[] dominators
           
static boolean TRACE
           
 
Constructor Summary
Dominators()
           
Dominators(boolean direction)
          true = normal dominators.
 
Method Summary
 void calculateDominanceFrontier(Dominators.DominatorNode tree)
           
 Dominators.DominatorNode computeTree()
           
 boolean dominates(int b, jwutil.math.BitString b2)
           
 jwutil.math.BitString getDominanceFrontier(jwutil.math.BitString bits)
           
 Dominators.DominatorNode getDominatorNode(BasicBlock bb)
           
 BasicBlock getImmediateDominator(BasicBlock bb)
           
 jwutil.math.BitString getIteratedDominanceFrontier(jwutil.math.BitString S)
           
static void main(String[] args)
           
 void visitBasicBlock(BasicBlock bb)
          Visit a basic block.
 void visitMethod(jq_Method m)
           
 
Methods inherited from class joeq.Class.jq_MethodVisitor.EmptyVisitor
visitClassInitializer, visitInitializer, visitInstanceMethod, visitStaticMethod
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TRACE

public static final boolean TRACE
See Also:
Constant Field Values

direction

public final boolean direction

dominators

public jwutil.math.BitString[] dominators

change

protected boolean change

cfg

protected ControlFlowGraph cfg

bbs

protected BasicBlock[] bbs

dom_nav

public static final jwutil.graphs.Navigator dom_nav
Constructor Detail

Dominators

public Dominators(boolean direction)
true = normal dominators. false = post dominators.


Dominators

public Dominators()
Method Detail

visitMethod

public void visitMethod(jq_Method m)
Specified by:
visitMethod in interface jq_MethodVisitor
Overrides:
visitMethod in class jq_MethodVisitor.EmptyVisitor

visitBasicBlock

public void visitBasicBlock(BasicBlock bb)
Description copied from interface: BasicBlockVisitor
Visit a basic block.

Specified by:
visitBasicBlock in interface BasicBlockVisitor
Parameters:
bb - basic block to visit

getDominatorNode

public Dominators.DominatorNode getDominatorNode(BasicBlock bb)

getImmediateDominator

public BasicBlock getImmediateDominator(BasicBlock bb)

computeTree

public Dominators.DominatorNode computeTree()

calculateDominanceFrontier

public void calculateDominanceFrontier(Dominators.DominatorNode tree)

dominates

public boolean dominates(int b,
                         jwutil.math.BitString b2)

getDominanceFrontier

public jwutil.math.BitString getDominanceFrontier(jwutil.math.BitString bits)

getIteratedDominanceFrontier

public jwutil.math.BitString getIteratedDominanceFrontier(jwutil.math.BitString S)

main

public static void main(String[] args)


Copyright © 2001-2008 John Whaley. All Rights Reserved.