public abstract class AbstractAnalysisEngine<I extends InstanceKey,X extends CallGraphBuilder<I>,Y> extends Object implements AnalysisEngine
Modifier and Type | Class and Description |
---|---|
static interface |
AbstractAnalysisEngine.EntrypointBuilder |
Modifier and Type | Field and Description |
---|---|
protected CallGraph |
cg
Governing call graph
|
protected static int |
DEBUG_LEVEL
DEBUG_LEVEL:
0 No output
1 Print some simple stats and warning information
2 Detailed debugging
|
protected Module[] |
j2seLibs
The standard J2SE libraries to analyze
|
protected Collection<? extends Module> |
moduleFiles
The modules to analyze
|
protected PointerAnalysis<? super I> |
pointerAnalysis
Results of pointer analysis
|
protected AnalysisScope |
scope
A representation of the analysis scope
|
static String |
SYNTHETIC_J2SE_MODEL |
Constructor and Description |
---|
AbstractAnalysisEngine() |
Modifier and Type | Method and Description |
---|---|
protected void |
addApplicationModulesToScope()
Add the application modules to the analysis scope.
|
void |
buildAnalysisScope()
Set up the AnalysisScope object
|
protected CallGraphBuilder<? super I> |
buildCallGraph(IClassHierarchy cha,
AnalysisOptions options,
boolean savePointerAnalysis,
com.ibm.wala.util.MonitorUtil.IProgressMonitor monitor) |
IClassHierarchy |
buildClassHierarchy() |
CallGraph |
buildDefaultCallGraph() |
CallGraphBuilder<? super I> |
defaultCallGraphBuilder()
Builds the call graph for the analysis scope in effect, using all of the given entry points.
|
IAnalysisCacheView |
getCache() |
protected CallGraph |
getCallGraph() |
protected abstract CallGraphBuilder<? super I> |
getCallGraphBuilder(IClassHierarchy cha,
AnalysisOptions options,
IAnalysisCacheView cache2) |
IClassHierarchy |
getClassHierarchy() |
AnalysisOptions |
getDefaultOptions(Iterable<Entrypoint> entrypoints)
Get the default analysis options appropriate for this engine
|
String |
getExclusionsFile() |
HeapGraph<?> |
getHeapGraph() |
AnalysisOptions |
getOptions() |
PointerAnalysis<? super I> |
getPointerAnalysis() |
protected AnalysisScope |
getScope() |
SDG<? super I> |
getSDG(Slicer.DataDependenceOptions data,
Slicer.ControlDependenceOptions ctrl) |
boolean |
isClosedWorld() |
protected ClassLoaderFactory |
makeClassLoaderFactory(com.ibm.wala.util.config.SetOfClasses exclusions) |
IAnalysisCacheView |
makeDefaultCache() |
protected Iterable<Entrypoint> |
makeDefaultEntrypoints(AnalysisScope scope,
IClassHierarchy cha) |
Y |
performAnalysis(PropagationCallGraphBuilder builder) |
protected IClassHierarchy |
setClassHierarchy(IClassHierarchy cha) |
void |
setClosedWorld(boolean b)
Specify whether the engine should or should not employ "closed-world" analysis.
|
void |
setEntrypointBuilder(AbstractAnalysisEngine.EntrypointBuilder builder) |
void |
setExclusionsFile(String exclusionsFile) |
void |
setJ2SELibraries(JarFile[] libs)
Specify the jar files that represent the standard J2SE libraries
|
void |
setJ2SELibraries(Module[] libs)
Specify the mdoules that represent the standard J2SE libraries
|
void |
setModuleFiles(Collection<? extends Module> moduleFiles)
Specify the list of modules that should be analyzed.
|
public static final String SYNTHETIC_J2SE_MODEL
protected static final int DEBUG_LEVEL
protected Collection<? extends Module> moduleFiles
protected AnalysisScope scope
protected Module[] j2seLibs
protected CallGraph cg
protected PointerAnalysis<? super I extends InstanceKey> pointerAnalysis
protected abstract CallGraphBuilder<? super I> getCallGraphBuilder(IClassHierarchy cha, AnalysisOptions options, IAnalysisCacheView cache2)
protected CallGraphBuilder<? super I> buildCallGraph(IClassHierarchy cha, AnalysisOptions options, boolean savePointerAnalysis, com.ibm.wala.util.MonitorUtil.IProgressMonitor monitor) throws IllegalArgumentException, com.ibm.wala.util.CancelException
IllegalArgumentException
com.ibm.wala.util.CancelException
public void setModuleFiles(Collection<? extends Module> moduleFiles)
AnalysisEngine
setModuleFiles
in interface AnalysisEngine
moduleFiles
- A non-null Collection of module files: (EARFile, WARFile, ApplicationClientFile, EJBJarFile).public void buildAnalysisScope() throws IOException
IOException
public IClassHierarchy buildClassHierarchy()
protected ClassLoaderFactory makeClassLoaderFactory(com.ibm.wala.util.config.SetOfClasses exclusions)
public IClassHierarchy getClassHierarchy()
protected IClassHierarchy setClassHierarchy(IClassHierarchy cha)
protected CallGraph getCallGraph()
protected void addApplicationModulesToScope()
public void setJ2SELibraries(JarFile[] libs)
AnalysisEngine
setJ2SELibraries
in interface AnalysisEngine
libs
- an array of jar files; usually rt.jar for vanilla JDK core.jar, server.jar, and xml.jar for some WAS runtimespublic void setJ2SELibraries(Module[] libs)
AnalysisEngine
setJ2SELibraries
in interface AnalysisEngine
libs
- an array of Modules; usually rt.jar for vanilla JDK core.jar, server.jar, and xml.jar for some WAS runtimespublic void setClosedWorld(boolean b)
AnalysisEngine
setClosedWorld
in interface AnalysisEngine
b
- whether to use closed-world analysispublic boolean isClosedWorld()
protected AnalysisScope getScope()
public PointerAnalysis<? super I> getPointerAnalysis()
public HeapGraph<?> getHeapGraph()
public SDG<? super I> getSDG(Slicer.DataDependenceOptions data, Slicer.ControlDependenceOptions ctrl)
public String getExclusionsFile()
public void setExclusionsFile(String exclusionsFile)
public AnalysisOptions getDefaultOptions(Iterable<Entrypoint> entrypoints)
AnalysisEngine
getDefaultOptions
in interface AnalysisEngine
public IAnalysisCacheView makeDefaultCache()
protected Iterable<Entrypoint> makeDefaultEntrypoints(AnalysisScope scope, IClassHierarchy cha)
public void setEntrypointBuilder(AbstractAnalysisEngine.EntrypointBuilder builder)
public CallGraphBuilder<? super I> defaultCallGraphBuilder() throws IllegalArgumentException, com.ibm.wala.util.CancelException, IOException
IllegalArgumentException
com.ibm.wala.util.CancelException
IOException
public CallGraph buildDefaultCallGraph() throws IllegalArgumentException, com.ibm.wala.util.CancelException, IOException
IllegalArgumentException
com.ibm.wala.util.CancelException
IOException
public IAnalysisCacheView getCache()
public AnalysisOptions getOptions()
public Y performAnalysis(PropagationCallGraphBuilder builder) throws com.ibm.wala.util.CancelException
com.ibm.wala.util.CancelException
Copyright © 2019. All rights reserved.