harpoon.IR.Tree
Interface TreeDerivation

All Known Implementing Classes:
DerivationGenerator

public interface TreeDerivation

TreeDerivation provides a means to access type and derivation information for any Tree.Exp in a code representation.

Version:
$Id: TreeDerivation.java,v 1.2 2002/02/25 21:05:42 cananian Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>
See Also:
Derivation, TypeMap

Method Summary
 Derivation.DList derivation(Exp exp)
          Returns the derivation of a given tree expression exp.
 HClass typeMap(Exp exp)
          Returns the type of a given tree expression exp.
 

Method Detail

typeMap

HClass typeMap(Exp exp)
               throws TypeMap.TypeNotKnownException
Returns the type of a given tree expression exp. If the type of the Tree.Exp is not known, throws TypeNotKnownException. If the Tree.Exp represents a derived pointer, null is returned, in which case the derivation() method must return a non-null value. HClass.Void is returned to indicate the type of a null pointer; as a special case, it is also returned to indicate the type of an opaque pointer value which does not correspond to a java object pointer or some derivation thereof and thus should not be traced during garbage collection.

Parameters:
exp - The tree expression to examine.
Returns:
the type of exp
Throws:
TypeMap.TypeNotKnownException - if the TreeDerivation does not have any information about exp.
See Also:
TypeMap

derivation

Derivation.DList derivation(Exp exp)
                            throws TypeMap.TypeNotKnownException
Returns the derivation of a given tree expression exp. If the derivation of the Tree.Exp is not known, throws TypeNotKnownException. If the Tree.Exp represents a non-derived base pointer, returns null, in which case the typeMap() method must return a non-null value.

Parameters:
exp - The tree expression to examine.
Returns:
the derivation of exp
Throws:
TypeMap.TypeNotKnownException - if the TreeDerivation does not have any information about exp.
See Also:
Derivation