chord.analyses.alias
Class CtxtsAnalysis
java.lang.Object
chord.project.analyses.JavaAnalysis
chord.analyses.alias.CtxtsAnalysis
- All Implemented Interfaces:
- ITask
public class CtxtsAnalysis
- extends JavaAnalysis
Analysis for pre-computing abstract contexts.
The goal of this analysis is to translate client-specified inputs concerning the desired kind of context sensitivity
into relations that are subsequently consumed by context-sensitive may alias and call graph analyses.
This analysis allows:
- each method to be analyzed using a different kind of context sensitivity (one of context insensitivity, k-CFA,
k-object-sensitivity, and copy-context-sensitivity),
- each local variable to be analyzed context sensitively or insensitively, and
- a different 'k' value to be used for each object allocation site and method call site.
This analysis can be called multiple times and in each invocation it can incorporate feedback from a client to adjust
the precision of the points-to information and call graph computed subsequently by the may alias and call graph
analyses. Clients can indicate in each invocation:
- Which methods must be analyzed context sensitively (in addition to those already being analyzed context
sensitively in the previous invocation of this analysis) and using what kind of context sensitivity; the
remaining methods will be analyzed context insensitively (that is, in the lone 'epsilon' context)
- Which local variables of reference type must be analyzed context sensitively (in addition to those already being
analyzed context sensitively in the previous invocation of this analysis); the remaining ones will be analyzed
context insensitively (that is, their points-to information will be tracked in the lone 'epsilon' context).
- The object alocation sites and method call sites whose 'k' values must be incremented (over those used in the
previous invocation of this analysis).
Recognized system properties:
- chord.ctxt.kind: the kind of context sensitivity to use for each method (and all its locals).
It may be 'ci' (context insensitive) or 'cs' (k-CFA).
- chord.inst.ctxt.kind: the kind of context sensitivity to use for each instance method (and all its locals).
It may be 'ci' (context insensitive), 'cs' (k-CFA), or 'co' (k-object-sensitive).
- chord.stat.ctxt.kind: the kind of context sensitivity to use for each static method (and all its locsals).
It may be one of 'ci' (context insensitive), 'cs' (k-CFA), or 'cc' (copy-context-sensitive).
- chord.kobj.k and chord.kcfa.k: the 'k' value to use for each object allocation site and each method call site,
respectively.
This analysis outputs the following domains and relations:
- C: domain containing all abstract contexts
- CC: relation containing each pair (c,c2) such that c2 is all but the last element of context c
- CH: relation containing each (c,h) such that object allocation site h is the last element of abstract context c
- CI: relation containing each (c,i) such that call site i is the last element of abstract context c
- CVC: relation containing each (c,v,o) such that local v might point to object o in context c of its declaring method.
- CFC: relation containing each (o1,f,o2) such that instance field f of object o1 might point to object o2
- FC: relation containing each (f,o) such that static field f may point to object o
- CICM: relation containing each (c,i,c2,m) if invocation i in context c can reach method 2 (in context c2)
- rootCM: relation containing each (c,m) such that method m is an entry method in context c
- reachableCM: relation containing each (c,m) such that method m can be called in context c
- Author:
- Mayur Naik (mhn@cs.stanford.edu)
|
Method Summary |
static java.lang.String |
getCspaKind()
|
void |
run()
Executes this analysis in a "classic" project. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
CTXTINS
public static final int CTXTINS
- See Also:
- Constant Field Values
KOBJSEN
public static final int KOBJSEN
- See Also:
- Constant Field Values
KCFASEN
public static final int KCFASEN
- See Also:
- Constant Field Values
CTXTCPY
public static final int CTXTCPY
- See Also:
- Constant Field Values
global_kobjValue
public static int[] global_kobjValue
global_kcfaValue
public static int[] global_kcfaValue
CtxtsAnalysis
public CtxtsAnalysis()
run
public void run()
- Description copied from interface:
ITask
- Executes this analysis in a "classic" project.
This method must usually not be called directly.
The correct way to call it is to call
ClassicProject.runTask(String) or
ClassicProject.runTask(ITask), providing
this analysis either by its name or its object.
- Specified by:
run in interface ITask- Overrides:
run in class JavaAnalysis
getCspaKind
public static java.lang.String getCspaKind()