public class ZeroXInstanceKeys extends Object implements InstanceKeyFactory
InstanceKey
s depending on various policies ranging from class-based (i.e. 0-CFA) to
allocation-site-based (0-1-CFA variants).Modifier and Type | Field and Description |
---|---|
static int |
ALLOCATIONS
An ALLOCATIONS - based policy distinguishes instances by allocation site.
|
static int |
CONSTANT_SPECIFIC
Should we use constant-specific keys?
|
static TypeReference |
JavaLangAbstractStringBuilder |
static TypeReference |
JavaLangStringBuffer |
static TypeReference |
JavaLangStringBuilder |
static int |
NONE
The NONE policy is not allocation-site based
|
static int |
SMUSH_MANY
This variant counts the N, number of allocation sites of a particular type T in each method.
|
static int |
SMUSH_PRIMITIVE_HOLDERS
A policy variant where if a type T has only primitive instance fields, then instances of type T are NOT disambiguated by
allocation site.
|
static int |
SMUSH_STRINGS
A policy variant where String and StringBuffers are NOT disambiguated according to allocation site.
|
static int |
SMUSH_THROWABLES
A policy variant where
Throwable instances are NOT disambiguated according to allocation site. |
protected Map<CGNode,Set<IClass>> |
smushMap
a Map from CGNode->Set
|
Constructor and Description |
---|
ZeroXInstanceKeys(AnalysisOptions options,
IClassHierarchy cha,
RTAContextInterpreter contextInterpreter,
int policy) |
Modifier and Type | Method and Description |
---|---|
boolean |
disambiguateConstants() |
ClassBasedInstanceKeys |
getClassBasedInstanceKeys() |
protected IClassHierarchy |
getClassHierarchy() |
InstanceKey |
getInstanceKeyForAllocation(CGNode node,
NewSiteReference allocation) |
<T> InstanceKey |
getInstanceKeyForConstant(TypeReference type,
T S) |
InstanceKey |
getInstanceKeyForMetadataObject(Object obj,
TypeReference objType) |
InstanceKey |
getInstanceKeyForMultiNewArray(CGNode node,
NewSiteReference allocation,
int dim) |
InstanceKey |
getInstanceKeyForPEI(CGNode node,
ProgramCounter pei,
TypeReference type) |
boolean |
isInteresting(IClass C)
A class is "interesting" iff we distinguish instances of the class
|
static boolean |
isStackTraceElement(IClass c) |
static boolean |
isStringish(IClass C) |
static boolean |
isThrowable(IClass c) |
boolean |
smushThrowables() |
public static final TypeReference JavaLangStringBuffer
public static final TypeReference JavaLangStringBuilder
public static final TypeReference JavaLangAbstractStringBuilder
public static final int NONE
public static final int ALLOCATIONS
public static final int SMUSH_STRINGS
public static final int SMUSH_THROWABLES
Throwable
instances are NOT disambiguated according to allocation site.public static final int SMUSH_PRIMITIVE_HOLDERS
public static final int SMUSH_MANY
public static final int CONSTANT_SPECIFIC
public ZeroXInstanceKeys(AnalysisOptions options, IClassHierarchy cha, RTAContextInterpreter contextInterpreter, int policy)
public boolean smushThrowables()
public boolean disambiguateConstants()
public InstanceKey getInstanceKeyForAllocation(CGNode node, NewSiteReference allocation)
getInstanceKeyForAllocation
in interface InstanceKeyFactory
public InstanceKey getInstanceKeyForMultiNewArray(CGNode node, NewSiteReference allocation, int dim)
getInstanceKeyForMultiNewArray
in interface InstanceKeyFactory
public <T> InstanceKey getInstanceKeyForConstant(TypeReference type, T S)
getInstanceKeyForConstant
in interface InstanceKeyFactory
public InstanceKey getInstanceKeyForPEI(CGNode node, ProgramCounter pei, TypeReference type)
getInstanceKeyForPEI
in interface InstanceKeyFactory
public InstanceKey getInstanceKeyForMetadataObject(Object obj, TypeReference objType)
getInstanceKeyForMetadataObject
in interface InstanceKeyFactory
objType
- TODOpublic boolean isInteresting(IClass C)
public static boolean isStringish(IClass C)
public static boolean isThrowable(IClass c)
public static boolean isStackTraceElement(IClass c)
protected IClassHierarchy getClassHierarchy()
public ClassBasedInstanceKeys getClassBasedInstanceKeys()