harpoon.Analysis.Quads
Class DefiniteInitOracle

java.lang.Object
  extended by harpoon.Analysis.Quads.DefiniteInitOracle

public class DefiniteInitOracle
extends Object

A DefiniteInitOracle tells you whether a given field is "definitely initialized" before control flow leaves every constructor of its declaring class. A field is not considered to be "definitely initialized" if it "may" be read before its definite initialization point.

Version:
$Id: DefiniteInitOracle.java,v 1.6 2004/02/08 03:20:10 cananian Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>

Constructor Summary
DefiniteInitOracle(HCodeFactory hcf, ClassHierarchy ch)
          Creates a DefiniteInitOracle which will use the given code factory and hierarchy approximation.
 
Method Summary
 boolean isDefinitelyInitialized(HField hf)
          Queries the DefiniteInitOracle; returns true iff every constructor for the declaring class of hf *must* define the field before any reference to the field is made.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefiniteInitOracle

public DefiniteInitOracle(HCodeFactory hcf,
                          ClassHierarchy ch)
Creates a DefiniteInitOracle which will use the given code factory and hierarchy approximation. For best results, the code factory should produce SSI or SSA form.

Method Detail

isDefinitelyInitialized

public boolean isDefinitelyInitialized(HField hf)
Queries the DefiniteInitOracle; returns true iff every constructor for the declaring class of hf *must* define the field before any reference to the field is made.