SandMark version 2.1


sandmark.util.controlflowgraph
Class InterferenceGraph

java.lang.Object
  |
  +--sandmark.util.controlflowgraph.InterferenceGraph

public class InterferenceGraph
extends java.lang.Object

InterferenceGraph analyzes accesses to local variables within a method to determine where variables are live. In addition, the analysis splits apart uses of the same local variable slot that are not related. NOTE: For watermarking purposes, this class turns all one byte load and store instructions (like aload_1) to their two byte equivalents (aload 1) This class may not be perfect - if you think you have detected a problem, email kheffner@cs.arizona.edu

Author:
Kelly Heffner

Nested Class Summary
(package private) static class InterferenceGraph.PartialNode
          Represents a part basic block as a live range.
(package private) static class InterferenceGraph.RangeNode
          Represents a whole basic block as a live range.
 
Constructor Summary
InterferenceGraph(MethodCFG cfg)
          Constructs an InterferenceGraph from a method control flow graph.
 
Method Summary
 java.util.ArrayList getVars()
          Gets the list of LiveVariable objects in an array list.
static void main(java.lang.String[] args)
          For testing purposes only
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InterferenceGraph

public InterferenceGraph(MethodCFG cfg)
Constructs an InterferenceGraph from a method control flow graph.

Parameters:
cfg - the control flow graph for the method to analyze
Method Detail

getVars

public java.util.ArrayList getVars()
Gets the list of LiveVariable objects in an array list. Note: this method returns a shallow copy of the variable list. Modifications to the list will not affect the list in the InterferenceGraph object, but modifications to the LiveVariables in it will modify this object, and the method that it represents.

Returns:
the list of live variable information

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
For testing purposes only

java.lang.Exception

SandMark version 2.1

Wed Jul 3 17:27:43 MST 2002