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
|
||||
*
|
||||
* @author sfink
|
||||
*/
|
||||
public class CallerSiteContext extends CallerContext {
|
||||
|
||||
|
|
|
@ -30,7 +30,6 @@ import com.ibm.wala.util.debug.Assertions;
|
|||
import com.ibm.wala.util.strings.Atom;
|
||||
|
||||
/**
|
||||
*
|
||||
* This context selector returns a context customized for the {@link InstanceKey} of the receiver if
|
||||
* <ul>
|
||||
* <li>receiver is a container, or</li>
|
||||
|
@ -39,8 +38,6 @@ import com.ibm.wala.util.strings.Atom;
|
|||
* </ul>
|
||||
*
|
||||
* 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 {
|
||||
|
||||
|
|
|
@ -24,11 +24,8 @@ import com.ibm.wala.ssa.ISSABasicBlock;
|
|||
import com.ibm.wala.ssa.SSAInstruction;
|
||||
|
||||
/**
|
||||
*
|
||||
* Default implementation of SSAContextInterpreter for context-insensitive
|
||||
* analysis
|
||||
*
|
||||
* @author sfink
|
||||
*/
|
||||
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
|
||||
*
|
||||
* @author sfink
|
||||
*/
|
||||
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;
|
||||
|
||||
/**
|
||||
*
|
||||
* 0-1-CFA Call graph builder, optimized to not disambiguate instances of "uninteresting" types
|
||||
*
|
||||
* @author sfink
|
||||
*/
|
||||
public class ZeroXCFABuilder extends SSAPropagationCallGraphBuilder {
|
||||
|
||||
|
@ -41,8 +38,10 @@ public class ZeroXCFABuilder extends SSAPropagationCallGraphBuilder {
|
|||
setContextSelector(contextSelector);
|
||||
|
||||
SSAContextInterpreter c = new DefaultSSAInterpreter(options, cache);
|
||||
c = new DelegatingSSAContextInterpreter(ReflectionContextInterpreter.createReflectionContextInterpreter(cha, options, getAnalysisCache(), reflect), c);
|
||||
SSAContextInterpreter contextInterpreter = appContextInterpreter == null ? c : new DelegatingSSAContextInterpreter(appContextInterpreter, c);
|
||||
c = new DelegatingSSAContextInterpreter(ReflectionContextInterpreter.createReflectionContextInterpreter(cha, options,
|
||||
getAnalysisCache(), reflect), c);
|
||||
SSAContextInterpreter contextInterpreter = appContextInterpreter == null ? c : new DelegatingSSAContextInterpreter(
|
||||
appContextInterpreter, c);
|
||||
setContextInterpreter(contextInterpreter);
|
||||
|
||||
ZeroXInstanceKeys zik = makeInstanceKeys(cha, options, contextInterpreter, instancePolicy);
|
||||
|
@ -59,21 +58,14 @@ public class ZeroXCFABuilder extends SSAPropagationCallGraphBuilder {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param options
|
||||
* options that govern call graph construction
|
||||
* @param cha
|
||||
* governing class hierarchy
|
||||
* @param cl
|
||||
* 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.
|
||||
* @param options options that govern call graph construction
|
||||
* @param cha governing class hierarchy
|
||||
* @param cl 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.
|
||||
* @throws IllegalArgumentException
|
||||
* if options is null
|
||||
* @throws IllegalArgumentException
|
||||
* if xmlFiles == null
|
||||
* @throws IllegalArgumentException if options is null
|
||||
* @throws IllegalArgumentException if xmlFiles == null
|
||||
*/
|
||||
public static SSAPropagationCallGraphBuilder make(AnalysisOptions options, AnalysisCache cache, IClassHierarchy cha,
|
||||
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;
|
||||
|
||||
/**
|
||||
* 0-X-CFA Call graph builder which analyzes calls to "container methods" in a
|
||||
* context which is defined by the receiver instance.
|
||||
*
|
||||
* @author sfink
|
||||
* 0-X-CFA Call graph builder which analyzes calls to "container methods" in a context which is defined by the receiver instance.
|
||||
*/
|
||||
public class ZeroXContainerCFABuilder extends ZeroXCFABuilder {
|
||||
|
||||
/**
|
||||
* @param cha
|
||||
* governing class hierarchy
|
||||
* @param options
|
||||
* call graph construction options
|
||||
* @param appContextSelector
|
||||
* application-specific logic to choose contexts
|
||||
* @param appContextInterpreter
|
||||
* application-specific logic to interpret a method in context
|
||||
* @param reflect
|
||||
* reflection specification
|
||||
* @throws IllegalArgumentException
|
||||
* if options is null
|
||||
* @param cha governing class hierarchy
|
||||
* @param options call graph construction options
|
||||
* @param appContextSelector application-specific logic to choose contexts
|
||||
* @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,
|
||||
ContextSelector appContextSelector, SSAContextInterpreter appContextInterpreter, ReflectionSpecification reflect, int instancePolicy) {
|
||||
ContextSelector appContextSelector, SSAContextInterpreter appContextInterpreter, ReflectionSpecification reflect,
|
||||
int instancePolicy) {
|
||||
|
||||
super(cha, options, cache, appContextSelector, appContextInterpreter, reflect, instancePolicy);
|
||||
|
||||
|
@ -50,10 +42,8 @@ public class ZeroXContainerCFABuilder extends ZeroXCFABuilder {
|
|||
setContextSelector(DCS);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return an object which creates contexts for call graph nodes based on the
|
||||
* container disambiguation policy
|
||||
* @return an object which creates contexts for call graph nodes based on the container disambiguation policy
|
||||
*/
|
||||
protected ContextSelector makeContainerContextSelector(IClassHierarchy cha, ZeroXInstanceKeys 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
|
||||
* allocation-site-based (0-1-CFA variants).
|
||||
*
|
||||
* @author sfink
|
||||
*/
|
||||
public class ZeroXInstanceKeys implements InstanceKeyFactory {
|
||||
|
||||
|
|
|
@ -25,8 +25,6 @@ import com.ibm.wala.ipa.cha.IClassHierarchy;
|
|||
|
||||
/**
|
||||
* nCFA Call graph builder
|
||||
*
|
||||
* @author Julian Dolby (dolby@us.ibm.com)
|
||||
*/
|
||||
public class nCFABuilder extends SSAPropagationCallGraphBuilder {
|
||||
|
||||
|
|
Loading…
Reference in New Issue