harpoon.Analysis.Maps
Interface ExactTypeMap

All Superinterfaces:
TypeMap
All Known Implementing Classes:
BitWidthAnalysis, ExactTypeMapProxy, SCCAnalysis, TypeInfo

public interface ExactTypeMap
extends TypeMap

ExactTypeMap is an extension of TypeMap that allows the indication of 'exact' types -- that is, temporaries that can be guaranteed to contain an object of the indicated type and not a subtype of that type.

Any TypeMap can be made into an ExactTypeMap by conservatively returning typeMap(hce,t).isPrimitive() to all calls to isExactType().

Version:
$Id: ExactTypeMap.java,v 1.2 2002/02/25 20:58:10 cananian Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>

Nested Class Summary
static class ExactTypeMap.ExactType
          Implementors of ExactTypeMap will probably find this pair type useful.
 
Nested classes inherited from class harpoon.Analysis.Maps.TypeMap
TypeMap.TypeNotKnownException
 
Method Summary
 boolean isExactType(HCodeElement hce, Temp t)
          Returns true if temporary t defined at definition point hce contains an object of the type returned by typeMap(hce, t) and not a subtype of that type.
 
Methods inherited from interface harpoon.Analysis.Maps.TypeMap
typeMap
 

Method Detail

isExactType

public boolean isExactType(HCodeElement hce,
                           Temp t)
                    throws TypeMap.TypeNotKnownException
Returns true if temporary t defined at definition point hce contains an object of the type returned by typeMap(hce, t) and not a subtype of that type. Returns false if the object in t can be a subtype of the type returned by typeMap(hce, t).

If typeMap() returns a primitive type, then isExactType() should return true.

Parameters:
hce - The HCodeElement defining t for this request.
t - The Temp to examine.
Returns:
true if t's type is exact, false otherwise.
Throws:
NullPointerException - if t or hce is null.
TypeNotKnownException - if the ExactTypeMap does not have any information about t as defined at hc.
TypeMap.TypeNotKnownException