harpoon.Analysis.Quads
Class MayReadOracle
java.lang.Object
harpoon.Analysis.Quads.MayReadOracle
public class MayReadOracle
- extends Object
A MayReadOracle
tells you which fields of a given
class 'may' be read on the given edge.
- Version:
- $Id: MayReadOracle.java,v 1.5 2004/02/08 01:53:14 cananian Exp $
- Author:
- C. Scott Ananian <cananian@alumni.princeton.edu>
Method Summary |
Set |
mayReadAt(Edge e)
Returns the set of fields possibly-read before edge e
is executed. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MayReadOracle
public MayReadOracle(HCode hc,
FieldSyncOracle fso,
CallGraph cg,
HClass which,
boolean specialHandlingForConstructors)
- Creates a
MayReadOracle
using the quad-ssi representation
hc
of some method and global information about read fields
provided by fso
. We will return results for only
fields declared by class which
, unless which
is null, in which case we'll return results for all fields.
If specialHandlingForConstructors
is true
,
then when analyzing a constructor we will only consider fields of
objects which *may* be this
(parameter 0 of the
constructor) as reads. This is useful if we are trying to determine
whether a field is read before it is defined in a constructor,
for example. With specialHandlingForConstructors
equal
to false
, no reads are ignored.
mayReadAt
public Set mayReadAt(Edge e)
- Returns the set of fields possibly-read before edge
e
is executed. The edge must belong to the HCode
given to this class' constructor.