Class Util
java.lang.Object
com.ibm.wala.ipa.callgraph.impl.Util
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addBypassLogic
(AnalysisOptions options, AnalysisScope scope, ClassLoader cl, XMLMethodSummaryReader summary, IClassHierarchy cha) Deprecated.Method will be replaced.static void
addBypassLogic
(AnalysisOptions options, AnalysisScope scope, ClassLoader cl, String xmlFile, IClassHierarchy cha) Deprecated.This method is being replaced.static void
addBypassLogic
(AnalysisOptions options, ClassLoader cl, XMLMethodSummaryReader summary, IClassHierarchy cha) static void
addBypassLogic
(AnalysisOptions options, ClassLoader cl, String xmlFile, IClassHierarchy cha) Modify an options object to include bypass logic as specified by a an XML file.static void
addDefaultBypassLogic
(AnalysisOptions options, AnalysisScope scope, ClassLoader cl, IClassHierarchy cha) static void
addDefaultBypassLogic
(AnalysisOptions options, ClassLoader cl, IClassHierarchy cha) static void
addDefaultSelectors
(AnalysisOptions options, IClassHierarchy cha) Set up an AnalysisOptions object with default selectors, corresponding to class hierarchy lookupstatic <T> void
checkGraphSubset
(Graph<T> supG, Graph<T> subG) static String
static Iterable
<Entrypoint> makeMainEntrypoints
(AnalysisScope scope, IClassHierarchy cha) Deprecated.UsemakeMainEntrypoints(IClassHierarchy)
insteadstatic Iterable
<Entrypoint> makeMainEntrypoints
(AnalysisScope scope, IClassHierarchy cha, String className) Deprecated.static Iterable
<Entrypoint> makeMainEntrypoints
(AnalysisScope scope, IClassHierarchy cha, String[] classNames) Deprecated.Pleasestatic Iterable
<Entrypoint> static Iterable
<Entrypoint> makeMainEntrypoints
(IClassHierarchy cha, String className) static Iterable
<Entrypoint> makeMainEntrypoints
(IClassHierarchy cha, String[] classNames) static Iterable
<Entrypoint> static Iterable
<Entrypoint> makeMainEntrypoints
(ClassLoaderReference loaderRef, IClassHierarchy cha, String[] classNames) makeNCFABuilder
(int n, AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha) make aCallGraphBuilder
that uses call-string context sensitivity, with call-string length limited to n, and a context-sensitive allocation-site-based heap abstraction.makeNCFABuilder
(int n, AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha, AnalysisScope scope) makeNObjBuilder
(int n, AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha) make aCallGraphBuilder
that uses object context sensitivity, with allocation-string length limited to nmakeNObjBuilder
(int n, AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha, AnalysisScope scope) static CallGraphBuilder
<InstanceKey> makeRTABuilder
(AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha) static CallGraphBuilder
<InstanceKey> makeRTABuilder
(AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha, AnalysisScope scope) makeVanillaNCFABuilder
(int n, AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha) make aCallGraphBuilder
that uses call-string context sensitivity, with call-string length limited to n, and a context-sensitive allocation-site-based heap abstraction.makeVanillaNCFABuilder
(int n, AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha, AnalysisScope scope) makeVanillaNObjBuilder
(int n, AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha) make aCallGraphBuilder
that uses object context sensitivity, with allocation-string length limited to nmakeVanillaNObjBuilder
(int n, AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha, AnalysisScope scope) makeVanillaZeroOneCFABuilder
(Language l, AnalysisOptions options, IAnalysisCacheView analysisCache, IClassHierarchy cha) makeVanillaZeroOneCFABuilder
(Language l, AnalysisOptions options, IAnalysisCacheView analysisCache, IClassHierarchy cha, AnalysisScope scope) makeVanillaZeroOneCFABuilder
(Language l, AnalysisOptions options, IAnalysisCacheView analysisCache, IClassHierarchy cha, AnalysisScope scope, ContextSelector customSelector, SSAContextInterpreter customInterpreter) makeVanillaZeroOneCFABuilder
(Language l, AnalysisOptions options, IAnalysisCacheView analysisCache, IClassHierarchy cha, ContextSelector customSelector, SSAContextInterpreter customInterpreter) makeVanillaZeroOneContainerCFABuilder
(AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha) makeVanillaZeroOneContainerCFABuilder
(AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha, AnalysisScope scope) makeZeroCFABuilder
(Language l, AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha) makeZeroCFABuilder
(Language l, AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha, AnalysisScope scope) makeZeroCFABuilder
(Language l, AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha, AnalysisScope scope, ContextSelector customSelector, SSAContextInterpreter customInterpreter) makeZeroCFABuilder
(Language l, AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha, ContextSelector customSelector, SSAContextInterpreter customInterpreter) makeZeroContainerCFABuilder
(AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha) makeZeroContainerCFABuilder
(AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha, AnalysisScope scope) makeZeroOneCFABuilder
(Language l, AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha) makeZeroOneCFABuilder
(Language l, AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha, AnalysisScope scope) makeZeroOneCFABuilder
(Language l, AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha, AnalysisScope scope, ContextSelector customSelector, SSAContextInterpreter customInterpreter) makeZeroOneCFABuilder
(Language l, AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha, ContextSelector customSelector, SSAContextInterpreter customInterpreter) makeZeroOneContainerCFABuilder
(AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha) makeZeroOneContainerCFABuilder
(AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha, AnalysisScope scope) makeZeroOneContainerCFABuilder
(AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha, AnalysisScope scope, ContextSelector appSelector, SSAContextInterpreter appInterpreter) makeZeroOneContainerCFABuilder
(AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha, ContextSelector appSelector, SSAContextInterpreter appInterpreter) static <T> Set
<T> create a set holding the contents of anIterator
static void
setNativeSpec
(String xmlFile)
-
Field Details
-
nativeSpec
TODO: Make these properties?
-
-
Constructor Details
-
Util
public Util()
-
-
Method Details
-
setNativeSpec
-
getNativeSpec
-
addDefaultSelectors
Set up an AnalysisOptions object with default selectors, corresponding to class hierarchy lookup- Throws:
IllegalArgumentException
- if options is null
-
addBypassLogic
@Deprecated public static void addBypassLogic(AnalysisOptions options, AnalysisScope scope, ClassLoader cl, String xmlFile, IClassHierarchy cha) throws IllegalArgumentException Deprecated.This method is being replaced. PleaseUse
addBypassLogic(AnalysisOptions, ClassLoader, String, IClassHierarchy)
insteadModify an options object to include bypass logic as specified by a an XML file.- Throws:
IllegalArgumentException
- if scope is nullIllegalArgumentException
- if cl is nullIllegalArgumentException
- if options is nullIllegalArgumentException
- if scope is null
-
addBypassLogic
public static void addBypassLogic(AnalysisOptions options, ClassLoader cl, String xmlFile, IClassHierarchy cha) throws IllegalArgumentException Modify an options object to include bypass logic as specified by a an XML file.- Throws:
IllegalArgumentException
- if scope is nullIllegalArgumentException
- if cl is nullIllegalArgumentException
- if options is nullIllegalArgumentException
- if scope is null
-
addBypassLogic
@Deprecated public static void addBypassLogic(AnalysisOptions options, AnalysisScope scope, ClassLoader cl, XMLMethodSummaryReader summary, IClassHierarchy cha) throws IllegalArgumentException Deprecated.Method will be replaced. PleaseUse
addBypassLogic(AnalysisOptions, ClassLoader, XMLMethodSummaryReader, IClassHierarchy)
instead- Throws:
IllegalArgumentException
-
addBypassLogic
public static void addBypassLogic(AnalysisOptions options, ClassLoader cl, XMLMethodSummaryReader summary, IClassHierarchy cha) throws IllegalArgumentException - Throws:
IllegalArgumentException
-
makeMainEntrypoints
@Deprecated public static Iterable<Entrypoint> makeMainEntrypoints(AnalysisScope scope, IClassHierarchy cha) Deprecated.Use
makeMainEntrypoints(IClassHierarchy)
instead- Returns:
- set of all eligible Main classes in the class hierarchy
- Throws:
IllegalArgumentException
- if scope is null
-
makeMainEntrypoints
- Returns:
- set of all eligible Main classes in the class hierarchy
- Throws:
IllegalArgumentException
- if scope is null
-
makeMainEntrypoints
public static Iterable<Entrypoint> makeMainEntrypoints(ClassLoaderReference clr, IClassHierarchy cha) -
makeMainEntrypoints
@Deprecated public static Iterable<Entrypoint> makeMainEntrypoints(AnalysisScope scope, IClassHierarchy cha, String className) Deprecated. -
makeMainEntrypoints
- Returns:
- Entrypoints for a set of J2SE Main classes
-
makeMainEntrypoints
@Deprecated public static Iterable<Entrypoint> makeMainEntrypoints(AnalysisScope scope, IClassHierarchy cha, String[] classNames) Deprecated. -
makeMainEntrypoints
- Returns:
- Entrypoints for a set of J2SE Main classes
-
makeMainEntrypoints
public static Iterable<Entrypoint> makeMainEntrypoints(ClassLoaderReference loaderRef, IClassHierarchy cha, String[] classNames) throws IllegalArgumentException - Returns:
- Entrypoints for a set of J2SE Main classes
- Throws:
IllegalArgumentException
- if classNames == nullIllegalArgumentException
- if (classNames != null) and (0 < classNames.length) and (classNames[0] == null)IllegalArgumentException
- if classNames.length == 0
-
setify
-
checkGraphSubset
- Throws:
IllegalArgumentException
- if subG is nullIllegalArgumentException
- if supG is null
-
makeRTABuilder
@Deprecated public static CallGraphBuilder<InstanceKey> makeRTABuilder(AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha, AnalysisScope scope) - Parameters:
options
- options that govern call graph constructioncha
- governing class hierarchyscope
- representation of the analysis scope- Returns:
- an RTA Call Graph builder.
-
makeRTABuilder
public static CallGraphBuilder<InstanceKey> makeRTABuilder(AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha) - Parameters:
options
- options that govern call graph constructioncha
- governing class hierarchy- Returns:
- an RTA Call Graph builder.
-
makeZeroCFABuilder
@Deprecated public static SSAPropagationCallGraphBuilder makeZeroCFABuilder(Language l, AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha, AnalysisScope scope) - Parameters:
options
- options that govern call graph constructioncha
- governing class hierarchyscope
- representation of the analysis scope- Returns:
- a 0-CFA Call Graph Builder.
-
makeZeroCFABuilder
public static SSAPropagationCallGraphBuilder makeZeroCFABuilder(Language l, AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha) - Parameters:
options
- options that govern call graph constructioncha
- governing class hierarchy- Returns:
- a 0-CFA Call Graph Builder.
-
makeZeroCFABuilder
@Deprecated public static SSAPropagationCallGraphBuilder makeZeroCFABuilder(Language l, AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha, AnalysisScope scope, ContextSelector customSelector, SSAContextInterpreter customInterpreter) Deprecated.- Parameters:
options
- options that govern call graph constructioncha
- governing class hierarchyscope
- representation of the analysis scopecustomSelector
- user-defined context selector, or null if nonecustomInterpreter
- user-defined context interpreter, or null if none- Returns:
- a 0-CFA Call Graph Builder.
- Throws:
IllegalArgumentException
- if options is null
-
makeZeroCFABuilder
public static SSAPropagationCallGraphBuilder makeZeroCFABuilder(Language l, AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha, ContextSelector customSelector, SSAContextInterpreter customInterpreter) - Parameters:
options
- options that govern call graph constructioncha
- governing class hierarchycustomSelector
- user-defined context selector, or null if nonecustomInterpreter
- user-defined context interpreter, or null if none- Returns:
- a 0-CFA Call Graph Builder.
- Throws:
IllegalArgumentException
- if options is null
-
makeZeroOneCFABuilder
@Deprecated public static SSAPropagationCallGraphBuilder makeZeroOneCFABuilder(Language l, AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha, AnalysisScope scope) Deprecated.- Parameters:
options
- options that govern call graph constructioncha
- governing class hierarchyscope
- representation of the analysis scope- Returns:
- a 0-1-CFA Call Graph Builder.
-
makeZeroOneCFABuilder
public static SSAPropagationCallGraphBuilder makeZeroOneCFABuilder(Language l, AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha) - Parameters:
options
- options that govern call graph constructioncha
- governing class hierarchy- Returns:
- a 0-1-CFA Call Graph Builder.
-
makeVanillaZeroOneCFABuilder
@Deprecated public static SSAPropagationCallGraphBuilder makeVanillaZeroOneCFABuilder(Language l, AnalysisOptions options, IAnalysisCacheView analysisCache, IClassHierarchy cha, AnalysisScope scope, ContextSelector customSelector, SSAContextInterpreter customInterpreter) Deprecated.- Parameters:
options
- options that govern call graph constructioncha
- governing class hierarchyscope
- representation of the analysis scopecustomSelector
- user-defined context selector, or null if nonecustomInterpreter
- user-defined context interpreter, or null if none- Returns:
- a 0-1-CFA Call Graph Builder.
- Throws:
IllegalArgumentException
- if options is null
-
makeVanillaZeroOneCFABuilder
public static SSAPropagationCallGraphBuilder makeVanillaZeroOneCFABuilder(Language l, AnalysisOptions options, IAnalysisCacheView analysisCache, IClassHierarchy cha, ContextSelector customSelector, SSAContextInterpreter customInterpreter) - Parameters:
options
- options that govern call graph constructioncha
- governing class hierarchycustomSelector
- user-defined context selector, or null if nonecustomInterpreter
- user-defined context interpreter, or null if none- Returns:
- a 0-1-CFA Call Graph Builder.
- Throws:
IllegalArgumentException
- if options is null
-
makeVanillaZeroOneCFABuilder
@Deprecated public static SSAPropagationCallGraphBuilder makeVanillaZeroOneCFABuilder(Language l, AnalysisOptions options, IAnalysisCacheView analysisCache, IClassHierarchy cha, AnalysisScope scope) Deprecated.- Parameters:
options
- options that govern call graph constructioncha
- governing class hierarchyscope
- representation of the analysis scope- Returns:
- a 0-1-CFA Call Graph Builder.
-
makeVanillaZeroOneCFABuilder
public static SSAPropagationCallGraphBuilder makeVanillaZeroOneCFABuilder(Language l, AnalysisOptions options, IAnalysisCacheView analysisCache, IClassHierarchy cha) - Parameters:
options
- options that govern call graph constructioncha
- governing class hierarchy- Returns:
- a 0-1-CFA Call Graph Builder.
-
makeZeroOneCFABuilder
@Deprecated public static SSAPropagationCallGraphBuilder makeZeroOneCFABuilder(Language l, AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha, AnalysisScope scope, ContextSelector customSelector, SSAContextInterpreter customInterpreter) Deprecated.- Parameters:
options
- options that govern call graph constructioncha
- governing class hierarchyscope
- representation of the analysis scopecustomSelector
- user-defined context selector, or null if nonecustomInterpreter
- user-defined context interpreter, or null if none- Returns:
- a 0-1-CFA Call Graph Builder.
- Throws:
IllegalArgumentException
- if options is null
-
makeZeroOneCFABuilder
public static SSAPropagationCallGraphBuilder makeZeroOneCFABuilder(Language l, AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha, ContextSelector customSelector, SSAContextInterpreter customInterpreter) - Parameters:
options
- options that govern call graph constructioncha
- governing class hierarchycustomSelector
- user-defined context selector, or null if nonecustomInterpreter
- user-defined context interpreter, or null if none- Returns:
- a 0-1-CFA Call Graph Builder.
- Throws:
IllegalArgumentException
- if options is null
-
makeZeroContainerCFABuilder
@Deprecated public static SSAPropagationCallGraphBuilder makeZeroContainerCFABuilder(AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha, AnalysisScope scope) - Parameters:
options
- options that govern call graph constructioncha
- governing class hierarchyscope
- representation of the analysis scope- Returns:
- a 0-CFA Call Graph Builder augmented with extra logic for containers
- Throws:
IllegalArgumentException
- if options is null
-
makeZeroContainerCFABuilder
public static SSAPropagationCallGraphBuilder makeZeroContainerCFABuilder(AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha) - Parameters:
options
- options that govern call graph constructioncha
- governing class hierarchy- Returns:
- a 0-CFA Call Graph Builder augmented with extra logic for containers
- Throws:
IllegalArgumentException
- if options is null
-
makeZeroOneContainerCFABuilder
@Deprecated public static SSAPropagationCallGraphBuilder makeZeroOneContainerCFABuilder(AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha, AnalysisScope scope) Deprecated.- Parameters:
options
- options that govern call graph constructioncha
- governing class hierarchyscope
- representation of the analysis scope- Returns:
- a 0-1-CFA Call Graph Builder augmented with extra logic for containers
- Throws:
IllegalArgumentException
- if options is null
-
makeZeroOneContainerCFABuilder
@Deprecated public static SSAPropagationCallGraphBuilder makeZeroOneContainerCFABuilder(AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha, AnalysisScope scope, ContextSelector appSelector, SSAContextInterpreter appInterpreter) -
makeZeroOneContainerCFABuilder
public static SSAPropagationCallGraphBuilder makeZeroOneContainerCFABuilder(AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha) - Parameters:
options
- options that govern call graph constructioncha
- governing class hierarchy- Returns:
- a 0-1-CFA Call Graph Builder augmented with extra logic for containers
- Throws:
IllegalArgumentException
- if options is null
-
makeZeroOneContainerCFABuilder
public static SSAPropagationCallGraphBuilder makeZeroOneContainerCFABuilder(AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha, ContextSelector appSelector, SSAContextInterpreter appInterpreter) -
makeNCFABuilder
@Deprecated public static SSAPropagationCallGraphBuilder makeNCFABuilder(int n, AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha, AnalysisScope scope) make aCallGraphBuilder
that uses call-string context sensitivity, with call-string length limited to n, and a context-sensitive allocation-site-based heap abstraction. -
makeNCFABuilder
public static SSAPropagationCallGraphBuilder makeNCFABuilder(int n, AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha) make aCallGraphBuilder
that uses call-string context sensitivity, with call-string length limited to n, and a context-sensitive allocation-site-based heap abstraction. -
makeNObjBuilder
@Deprecated public static SSAPropagationCallGraphBuilder makeNObjBuilder(int n, AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha, AnalysisScope scope) make aCallGraphBuilder
that uses object context sensitivity, with allocation-string length limited to n -
makeNObjBuilder
public static SSAPropagationCallGraphBuilder makeNObjBuilder(int n, AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha) make aCallGraphBuilder
that uses object context sensitivity, with allocation-string length limited to n -
makeVanillaNObjBuilder
@Deprecated public static SSAPropagationCallGraphBuilder makeVanillaNObjBuilder(int n, AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha, AnalysisScope scope) make aCallGraphBuilder
that uses object context sensitivity, with allocation-string length limited to n -
makeVanillaNObjBuilder
public static SSAPropagationCallGraphBuilder makeVanillaNObjBuilder(int n, AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha) make aCallGraphBuilder
that uses object context sensitivity, with allocation-string length limited to n -
makeVanillaNCFABuilder
@Deprecated public static SSAPropagationCallGraphBuilder makeVanillaNCFABuilder(int n, AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha, AnalysisScope scope) -
makeVanillaNCFABuilder
public static SSAPropagationCallGraphBuilder makeVanillaNCFABuilder(int n, AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha) make aCallGraphBuilder
that uses call-string context sensitivity, with call-string length limited to n, and a context-sensitive allocation-site-based heap abstraction. Standard optimizations in the heap abstraction like smushing of strings are disabled. -
makeVanillaZeroOneContainerCFABuilder
@Deprecated public static SSAPropagationCallGraphBuilder makeVanillaZeroOneContainerCFABuilder(AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha, AnalysisScope scope) -
makeVanillaZeroOneContainerCFABuilder
public static SSAPropagationCallGraphBuilder makeVanillaZeroOneContainerCFABuilder(AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha) - Parameters:
options
- options that govern call graph constructioncha
- governing class hierarchy- Returns:
- a 0-1-CFA Call Graph Builder augmented with extra logic for containers
- Throws:
IllegalArgumentException
- if options is null
-
addDefaultBypassLogic
@Deprecated public static void addDefaultBypassLogic(AnalysisOptions options, AnalysisScope scope, ClassLoader cl, IClassHierarchy cha) -
addDefaultBypassLogic
public static void addDefaultBypassLogic(AnalysisOptions options, ClassLoader cl, IClassHierarchy cha)
-