public class CrossProductAnalysis extends HeapAbstractionFactory
Constructor and Description |
---|
CrossProductAnalysis(HeapAbstractionFactory f1,
HeapAbstractionFactory f2)
Create an analysis as the cross product of two other analyses
|
Modifier and Type | Method and Description |
---|---|
CContext |
fixContextForReferenceVariable(CContext context,
ReferenceVariable r)
Fix the code context for a reference variable, if needed, when creating
a reference variable replica for reference variable
r . |
CContext |
initialContextImpl()
Return the initial CContext, i.e., to analyze the main method.
|
CContext |
mergeImpl(CallSiteNode callSite,
HContext receiver,
CContext callerContext)
Produce a code context (i.e., CContext) to analysis code
called from call site
callSite in code context
callerContext , where receiver is
the abstract object for the recevier of the method invocation. |
HContext |
recordImpl(CContext context,
AllocSiteNode alloc)
Produce an abstract object (i.e., HContext) to represent an
object created at allocation site
alloc in code
context context . |
java.lang.String |
toString() |
clearMemoization, init, initialContext, memoize, memoize, merge, record
public CrossProductAnalysis(HeapAbstractionFactory f1, HeapAbstractionFactory f2)
f1
- first analysisf2
- second analysispublic HContext recordImpl(CContext context, AllocSiteNode alloc)
HeapAbstractionFactory
alloc
in code
context context
.recordImpl
in class HeapAbstractionFactory
public CContext fixContextForReferenceVariable(CContext context, ReferenceVariable r)
HeapAbstractionFactory
r
.
The need for this method is motivated by an object sensitive analysis
where static fields should only have a single replica, i.e., if f is a static
field of C, and o is an object of class C, then an expression o.f should
be represented by a reference variable replica that has the
ObjectField for C.f in the unique static context, not the context for o.fixContextForReferenceVariable
in class HeapAbstractionFactory
public CContext mergeImpl(CallSiteNode callSite, HContext receiver, CContext callerContext)
HeapAbstractionFactory
callSite
in code context
callerContext
, where receiver
is
the abstract object for the recevier of the method invocation.
If the method being called does not have a receiver (i.e., it
is a static method), then receiver
will be null.mergeImpl
in class HeapAbstractionFactory
public CContext initialContextImpl()
HeapAbstractionFactory
initialContextImpl
in class HeapAbstractionFactory
public java.lang.String toString()
toString
in class java.lang.Object