tweak comments
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3673 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
This commit is contained in:
parent
8d636def47
commit
67c81af1d5
|
@ -17,8 +17,6 @@ import com.ibm.wala.ipa.callgraph.ContextKey;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A context which is a <CGNode, CallSiteReference> pair
|
* A context which is a <CGNode, CallSiteReference> pair
|
||||||
*
|
|
||||||
* @author sfink
|
|
||||||
*/
|
*/
|
||||||
public class CallerSiteContext extends CallerContext {
|
public class CallerSiteContext extends CallerContext {
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,6 @@ import com.ibm.wala.util.debug.Assertions;
|
||||||
import com.ibm.wala.util.strings.Atom;
|
import com.ibm.wala.util.strings.Atom;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* This context selector returns a context customized for the {@link InstanceKey} of the receiver if
|
* This context selector returns a context customized for the {@link InstanceKey} of the receiver if
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>receiver is a container, or</li>
|
* <li>receiver is a container, or</li>
|
||||||
|
@ -39,8 +38,6 @@ import com.ibm.wala.util.strings.Atom;
|
||||||
* </ul>
|
* </ul>
|
||||||
*
|
*
|
||||||
* Additionally, we add one level of call string context to a few well-known static factory methods from the standard libraries.
|
* Additionally, we add one level of call string context to a few well-known static factory methods from the standard libraries.
|
||||||
*
|
|
||||||
* @author sfink
|
|
||||||
*/
|
*/
|
||||||
public class ContainerContextSelector implements ContextSelector {
|
public class ContainerContextSelector implements ContextSelector {
|
||||||
|
|
||||||
|
|
|
@ -24,11 +24,8 @@ import com.ibm.wala.ssa.ISSABasicBlock;
|
||||||
import com.ibm.wala.ssa.SSAInstruction;
|
import com.ibm.wala.ssa.SSAInstruction;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* Default implementation of SSAContextInterpreter for context-insensitive
|
* Default implementation of SSAContextInterpreter for context-insensitive
|
||||||
* analysis
|
* analysis
|
||||||
*
|
|
||||||
* @author sfink
|
|
||||||
*/
|
*/
|
||||||
public class ContextInsensitiveSSAInterpreter extends ContextInsensitiveRTAInterpreter implements SSAContextInterpreter {
|
public class ContextInsensitiveSSAInterpreter extends ContextInsensitiveRTAInterpreter implements SSAContextInterpreter {
|
||||||
|
|
||||||
|
|
|
@ -29,8 +29,6 @@ import com.ibm.wala.ssa.SSAInstruction;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Basic analysis; context-insensitive except for newInstance and clone
|
* Basic analysis; context-insensitive except for newInstance and clone
|
||||||
*
|
|
||||||
* @author sfink
|
|
||||||
*/
|
*/
|
||||||
public class DefaultSSAInterpreter extends DefaultRTAInterpreter implements SSAContextInterpreter {
|
public class DefaultSSAInterpreter extends DefaultRTAInterpreter implements SSAContextInterpreter {
|
||||||
|
|
||||||
|
|
|
@ -24,10 +24,7 @@ import com.ibm.wala.ipa.callgraph.propagation.SSAPropagationCallGraphBuilder;
|
||||||
import com.ibm.wala.ipa.cha.IClassHierarchy;
|
import com.ibm.wala.ipa.cha.IClassHierarchy;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* 0-1-CFA Call graph builder, optimized to not disambiguate instances of "uninteresting" types
|
* 0-1-CFA Call graph builder, optimized to not disambiguate instances of "uninteresting" types
|
||||||
*
|
|
||||||
* @author sfink
|
|
||||||
*/
|
*/
|
||||||
public class ZeroXCFABuilder extends SSAPropagationCallGraphBuilder {
|
public class ZeroXCFABuilder extends SSAPropagationCallGraphBuilder {
|
||||||
|
|
||||||
|
@ -41,8 +38,10 @@ public class ZeroXCFABuilder extends SSAPropagationCallGraphBuilder {
|
||||||
setContextSelector(contextSelector);
|
setContextSelector(contextSelector);
|
||||||
|
|
||||||
SSAContextInterpreter c = new DefaultSSAInterpreter(options, cache);
|
SSAContextInterpreter c = new DefaultSSAInterpreter(options, cache);
|
||||||
c = new DelegatingSSAContextInterpreter(ReflectionContextInterpreter.createReflectionContextInterpreter(cha, options, getAnalysisCache(), reflect), c);
|
c = new DelegatingSSAContextInterpreter(ReflectionContextInterpreter.createReflectionContextInterpreter(cha, options,
|
||||||
SSAContextInterpreter contextInterpreter = appContextInterpreter == null ? c : new DelegatingSSAContextInterpreter(appContextInterpreter, c);
|
getAnalysisCache(), reflect), c);
|
||||||
|
SSAContextInterpreter contextInterpreter = appContextInterpreter == null ? c : new DelegatingSSAContextInterpreter(
|
||||||
|
appContextInterpreter, c);
|
||||||
setContextInterpreter(contextInterpreter);
|
setContextInterpreter(contextInterpreter);
|
||||||
|
|
||||||
ZeroXInstanceKeys zik = makeInstanceKeys(cha, options, contextInterpreter, instancePolicy);
|
ZeroXInstanceKeys zik = makeInstanceKeys(cha, options, contextInterpreter, instancePolicy);
|
||||||
|
@ -59,21 +58,14 @@ public class ZeroXCFABuilder extends SSAPropagationCallGraphBuilder {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param options
|
* @param options options that govern call graph construction
|
||||||
* options that govern call graph construction
|
* @param cha governing class hierarchy
|
||||||
* @param cha
|
* @param cl classloader that can find WALA resources
|
||||||
* governing class hierarchy
|
* @param scope representation of the analysis scope
|
||||||
* @param cl
|
* @param xmlFiles set of Strings that are names of XML files holding bypass logic specifications.
|
||||||
* classloader that can find WALA resources
|
|
||||||
* @param scope
|
|
||||||
* representation of the analysis scope
|
|
||||||
* @param xmlFiles
|
|
||||||
* set of Strings that are names of XML files holding bypass logic specifications.
|
|
||||||
* @return a 0-1-Opt-CFA Call Graph Builder.
|
* @return a 0-1-Opt-CFA Call Graph Builder.
|
||||||
* @throws IllegalArgumentException
|
* @throws IllegalArgumentException if options is null
|
||||||
* if options is null
|
* @throws IllegalArgumentException if xmlFiles == null
|
||||||
* @throws IllegalArgumentException
|
|
||||||
* if xmlFiles == null
|
|
||||||
*/
|
*/
|
||||||
public static SSAPropagationCallGraphBuilder make(AnalysisOptions options, AnalysisCache cache, IClassHierarchy cha,
|
public static SSAPropagationCallGraphBuilder make(AnalysisOptions options, AnalysisCache cache, IClassHierarchy cha,
|
||||||
ClassLoader cl, AnalysisScope scope, String[] xmlFiles, byte instancePolicy) throws IllegalArgumentException {
|
ClassLoader cl, AnalysisScope scope, String[] xmlFiles, byte instancePolicy) throws IllegalArgumentException {
|
||||||
|
|
|
@ -19,29 +19,21 @@ import com.ibm.wala.ipa.callgraph.propagation.SSAContextInterpreter;
|
||||||
import com.ibm.wala.ipa.cha.IClassHierarchy;
|
import com.ibm.wala.ipa.cha.IClassHierarchy;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 0-X-CFA Call graph builder which analyzes calls to "container methods" in a
|
* 0-X-CFA Call graph builder which analyzes calls to "container methods" in a context which is defined by the receiver instance.
|
||||||
* context which is defined by the receiver instance.
|
|
||||||
*
|
|
||||||
* @author sfink
|
|
||||||
*/
|
*/
|
||||||
public class ZeroXContainerCFABuilder extends ZeroXCFABuilder {
|
public class ZeroXContainerCFABuilder extends ZeroXCFABuilder {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param cha
|
* @param cha governing class hierarchy
|
||||||
* governing class hierarchy
|
* @param options call graph construction options
|
||||||
* @param options
|
* @param appContextSelector application-specific logic to choose contexts
|
||||||
* call graph construction options
|
* @param appContextInterpreter application-specific logic to interpret a method in context
|
||||||
* @param appContextSelector
|
* @param reflect reflection specification
|
||||||
* application-specific logic to choose contexts
|
* @throws IllegalArgumentException if options is null
|
||||||
* @param appContextInterpreter
|
|
||||||
* application-specific logic to interpret a method in context
|
|
||||||
* @param reflect
|
|
||||||
* reflection specification
|
|
||||||
* @throws IllegalArgumentException
|
|
||||||
* if options is null
|
|
||||||
*/
|
*/
|
||||||
public ZeroXContainerCFABuilder(IClassHierarchy cha, AnalysisOptions options, AnalysisCache cache,
|
public ZeroXContainerCFABuilder(IClassHierarchy cha, AnalysisOptions options, AnalysisCache cache,
|
||||||
ContextSelector appContextSelector, SSAContextInterpreter appContextInterpreter, ReflectionSpecification reflect, int instancePolicy) {
|
ContextSelector appContextSelector, SSAContextInterpreter appContextInterpreter, ReflectionSpecification reflect,
|
||||||
|
int instancePolicy) {
|
||||||
|
|
||||||
super(cha, options, cache, appContextSelector, appContextInterpreter, reflect, instancePolicy);
|
super(cha, options, cache, appContextSelector, appContextInterpreter, reflect, instancePolicy);
|
||||||
|
|
||||||
|
@ -50,10 +42,8 @@ public class ZeroXContainerCFABuilder extends ZeroXCFABuilder {
|
||||||
setContextSelector(DCS);
|
setContextSelector(DCS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return an object which creates contexts for call graph nodes based on the
|
* @return an object which creates contexts for call graph nodes based on the container disambiguation policy
|
||||||
* container disambiguation policy
|
|
||||||
*/
|
*/
|
||||||
protected ContextSelector makeContainerContextSelector(IClassHierarchy cha, ZeroXInstanceKeys keys) {
|
protected ContextSelector makeContainerContextSelector(IClassHierarchy cha, ZeroXInstanceKeys keys) {
|
||||||
return new ContainerContextSelector(cha, keys);
|
return new ContainerContextSelector(cha, keys);
|
||||||
|
|
|
@ -39,8 +39,6 @@ import com.ibm.wala.util.collections.HashSetFactory;
|
||||||
/**
|
/**
|
||||||
* Flexible class to create {@link InstanceKey}s depending on various policies ranging from class-based (i.e. 0-CFA) to
|
* Flexible class to create {@link InstanceKey}s depending on various policies ranging from class-based (i.e. 0-CFA) to
|
||||||
* allocation-site-based (0-1-CFA variants).
|
* allocation-site-based (0-1-CFA variants).
|
||||||
*
|
|
||||||
* @author sfink
|
|
||||||
*/
|
*/
|
||||||
public class ZeroXInstanceKeys implements InstanceKeyFactory {
|
public class ZeroXInstanceKeys implements InstanceKeyFactory {
|
||||||
|
|
||||||
|
|
|
@ -25,8 +25,6 @@ import com.ibm.wala.ipa.cha.IClassHierarchy;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* nCFA Call graph builder
|
* nCFA Call graph builder
|
||||||
*
|
|
||||||
* @author Julian Dolby (dolby@us.ibm.com)
|
|
||||||
*/
|
*/
|
||||||
public class nCFABuilder extends SSAPropagationCallGraphBuilder {
|
public class nCFABuilder extends SSAPropagationCallGraphBuilder {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue