harpoon.Analysis.Maps
Interface ConstMap<HCE extends HCodeElement>

All Known Implementing Classes:
BitWidthAnalysis, ConstMapProxy, DefaultMap, SCCAnalysis, SimpleConstMap

public interface ConstMap<HCE extends HCodeElement>

ConstMap is a mapping from temporaries to their constant values.

Version:
$Id: ConstMap.java,v 1.4 2002/09/02 19:23:26 cananian Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>

Method Summary
 Object constMap(HCE hce, Temp t)
          Determine the constant value of a given temporary in the context of a specific definition.
 boolean isConst(HCE hce, Temp t)
          Determine whether a given temporary has a constant value at the specified definition point.
 

Method Detail

isConst

boolean isConst(HCE hce,
                Temp t)
Determine whether a given temporary has a constant value at the specified definition point.

Parameters:
hce - the definition point.
t - the Temp to be examined.
Returns:
true is the given definition point can be proven to give the specified Temp a constant value, false otherwise.

constMap

Object constMap(HCE hce,
                Temp t)
Determine the constant value of a given temporary in the context of a specific definition.

Parameters:
hce - the definition point.
t - the temporary to be examined.
Returns:
an object corresponding to the constant value of this temporary defined at this point. Values of base types get wrapped in objects in the standard way.
Throws:
Error - if isConst(hce, t) is false.