edu.cmu.cs.crystal.analysis.constant
Class ConstantAnalysis

java.lang.Object
  extended by edu.cmu.cs.crystal.AbstractCrystalMethodAnalysis
      extended by edu.cmu.cs.crystal.analysis.constant.ConstantAnalysis
All Implemented Interfaces:
ICrystalAnalysis

public class ConstantAnalysis
extends AbstractCrystalMethodAnalysis


Nested Class Summary
 class ConstantAnalysis.DeadBranchChecker
           
 
Constructor Summary
ConstantAnalysis()
           
 
Method Summary
 void analyzeMethod(MethodDeclaration d)
          Invoked for each method or constructor in the class.
 TupleLatticeElement<Variable,BooleanConstantLE> getResultsAfter(TACInstruction instr)
           
 TupleLatticeElement<Variable,BooleanConstantLE> getResultsBefore(TACInstruction instr)
           
 boolean getValue(Variable var, ASTNode node, boolean after)
           
 boolean hasPreciseValueAfter(Variable var, ASTNode node, boolean after)
           
 
Methods inherited from class edu.cmu.cs.crystal.AbstractCrystalMethodAnalysis
afterAllCompilationUnits, afterAllMethods, beforeAllCompilationUnits, beforeAllMethods, getInput, getName, getReporter, runAnalysis
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConstantAnalysis

public ConstantAnalysis()
Method Detail

hasPreciseValueAfter

public boolean hasPreciseValueAfter(Variable var,
                                    ASTNode node,
                                    boolean after)

getValue

public boolean getValue(Variable var,
                        ASTNode node,
                        boolean after)

analyzeMethod

public void analyzeMethod(MethodDeclaration d)
Description copied from class: AbstractCrystalMethodAnalysis
Invoked for each method or constructor in the class.

Specified by:
analyzeMethod in class AbstractCrystalMethodAnalysis

getResultsBefore

public TupleLatticeElement<Variable,BooleanConstantLE> getResultsBefore(TACInstruction instr)

getResultsAfter

public TupleLatticeElement<Variable,BooleanConstantLE> getResultsAfter(TACInstruction instr)