edu.ksu.cis.projects.bogor.analyses
Class LiveVariableAnalysis

java.lang.Object
  extended by edu.ksu.cis.projects.bogor.analyses.IntraFSMAnalysis<String>
      extended by edu.ksu.cis.projects.bogor.analyses.LiveVariableAnalysis

public class LiveVariableAnalysis
extends IntraFSMAnalysis<String>

This class provides a live variables analysis for a certain FSM. This analysis requires that the AST for IdExp have been decided whether it is a local reference or not.

Version:
CVS $Revision: 1.5 $ $Date: 2005/05/19 17:19:39 $
Author:
Robby , Matt Hoosier

Nested Class Summary
protected static class LiveVariableAnalysis.HashSetFactory<T>
           
protected static class LiveVariableAnalysis.LeftSubsetOfRightOperator<T>
           
protected static class LiveVariableAnalysis.UnionOperator<T>
           
 
Nested classes/interfaces inherited from class edu.ksu.cis.projects.bogor.analyses.IntraFSMAnalysis
IntraFSMAnalysis.SetContainmentOperator<T>, IntraFSMAnalysis.SetFactory<T>, IntraFSMAnalysis.SetMergeOperator<T>, IntraFSMAnalysis.WorkListEntry
 
Field Summary
protected  LocalVariablesCollector lvc
           
protected  IntObjectTable<Set<String>> result
           
 
Fields inherited from class edu.ksu.cis.projects.bogor.analyses.IntraFSMAnalysis
analysisTable, bottom, cfg, containmentTest, init, isForwardAnalysis, mergeOperation, setFactory, workList
 
Constructor Summary
LiveVariableAnalysis(CFG cfg)
           
 
Method Summary
protected  void analyze()
          Perform Phase II of the MDF algorithm.
protected  void analyzeBlockTransformation(BlockTransformation t, Set<String> s)
           
protected  void analyzeInvokeTransformation(InvokeTransformation t, Set<String> s)
           
protected  Set<String> analyzeLocation(int locDesc, Set<String> s)
          Compute an analysis-specific "active" set of variables given a known active input set and a program location.
protected  void analyzeNextState(NextState ns, Set<String> s)
           
 void dispose()
           
 IntObjectTable<Set<String>> getResult()
           
protected  void init()
          Perform Phase I of the MDF algorithm.
 
Methods inherited from class edu.ksu.cis.projects.bogor.analyses.IntraFSMAnalysis
addToWorkList, getEntry, removeNextInWorkList, setEntry
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lvc

protected LocalVariablesCollector lvc

result

protected IntObjectTable<Set<String>> result
Constructor Detail

LiveVariableAnalysis

public LiveVariableAnalysis(CFG cfg)
Method Detail

getResult

public IntObjectTable<Set<String>> getResult()

dispose

public void dispose()
Overrides:
dispose in class IntraFSMAnalysis<String>

analyze

protected void analyze()
Description copied from class: IntraFSMAnalysis
Perform Phase II of the MDF algorithm. Computes a fixed-point for the working sets on each location.

Overrides:
analyze in class IntraFSMAnalysis<String>

analyzeBlockTransformation

protected void analyzeBlockTransformation(BlockTransformation t,
                                          Set<String> s)

analyzeInvokeTransformation

protected void analyzeInvokeTransformation(InvokeTransformation t,
                                           Set<String> s)

analyzeLocation

protected Set<String> analyzeLocation(int locDesc,
                                      Set<String> s)
Description copied from class: IntraFSMAnalysis
Compute an analysis-specific "active" set of variables given a known active input set and a program location.

Specified by:
analyzeLocation in class IntraFSMAnalysis<String>

analyzeNextState

protected void analyzeNextState(NextState ns,
                                Set<String> s)

init

protected void init()
Description copied from class: IntraFSMAnalysis
Perform Phase I of the MDF algorithm. Enqueues a work item for every (pred, succ) pair in the flow graph and sets initial working sets for each program label.

Overrides:
init in class IntraFSMAnalysis<String>