harpoon.Analysis.PointerAnalysis
Class ArtificialTempFactory
java.lang.Object
|
+--harpoon.Analysis.PointerAnalysis.ArtificialTempFactory
- All Implemented Interfaces:
- Serializable
- public abstract class ArtificialTempFactory
- extends Object
- implements Serializable
ArtificialTempFactory
provides support for the static fields
in the context of the Pointer Analysis algorithm of Martin & Whaley.
In that algorith, these fields are modeled by some special class variables
(CL in the original paper) that point to class nodes that serves as
containers for the static fields.
Ex: Suppose we have the classes A and B and that A contains a static field
called f. Then, to model A.f, we need a variable vA pointing to a special
class node nC_A which contains the field f. Note that no class
variable and no class node are generated for the class B which doesn't have
any static field.
Another alternative would be to have a special variable cl.f for each
static field cl.f but this would lead to some irregularities in the
algorithm and will generate a bigger number of artificial nodes.
- Version:
- $Id: ArtificialTempFactory.java,v 1.3 2002/02/26 22:41:18 cananian Exp $
- Author:
- Alexandru SALCIANU <salcianu@retezat.lcs.mit.edu>
- See Also:
- Serialized Form
Method Summary |
static Temp |
getTempFor(HField hf)
Returns a Temp representing the "container"
class variable (a variable which will point to a static node)
for the static fields of the declaring class |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ArtificialTempFactory
public ArtificialTempFactory()
getTempFor
public static final Temp getTempFor(HField hf)
- Returns a
Temp
representing the "container"
class variable (a variable which will point to a static node)
for the static fields of the declaring class