public abstract class AbstractAnalysisEngine 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<Module> |
moduleFiles
The modules to analyze
|
protected PointerAnalysis<InstanceKey> |
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 |
buildCallGraph(IClassHierarchy cha,
AnalysisOptions options,
boolean savePointerAnalysis,
com.ibm.wala.util.MonitorUtil.IProgressMonitor monitor) |
IClassHierarchy |
buildClassHierarchy() |
CallGraph |
buildDefaultCallGraph() |
CallGraphBuilder |
defaultCallGraphBuilder()
Builds the call graph for the analysis scope in effect, using all of the given entry points.
|
AnalysisCache |
getCache() |
protected CallGraph |
getCallGraph() |
protected abstract CallGraphBuilder |
getCallGraphBuilder(IClassHierarchy cha,
AnalysisOptions options,
AnalysisCache cache) |
IClassHierarchy |
getClassHierarchy() |
AnalysisOptions |
getDefaultOptions(Iterable<Entrypoint> entrypoints)
Get the default analysis options appropriate for this engine
|
String |
getExclusionsFile() |
HeapGraph |
getHeapGraph() |
AnalysisOptions |
getOptions() |
PointerAnalysis<InstanceKey> |
getPointerAnalysis() |
protected AnalysisScope |
getScope() |
boolean |
isClosedWorld() |
protected ClassLoaderFactory |
makeClassLoaderFactory(com.ibm.wala.util.config.SetOfClasses exclusions) |
AnalysisCache |
makeDefaultCache() |
protected Iterable<Entrypoint> |
makeDefaultEntrypoints(AnalysisScope scope,
IClassHierarchy cha) |
protected void |
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 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<Module> moduleFiles
protected AnalysisScope scope
protected Module[] j2seLibs
protected CallGraph cg
protected PointerAnalysis<InstanceKey> pointerAnalysis
protected abstract CallGraphBuilder getCallGraphBuilder(IClassHierarchy cha, AnalysisOptions options, AnalysisCache cache)
protected CallGraphBuilder buildCallGraph(IClassHierarchy cha, AnalysisOptions options, boolean savePointerAnalysis, com.ibm.wala.util.MonitorUtil.IProgressMonitor monitor) throws IllegalArgumentException, com.ibm.wala.util.CancelException
IllegalArgumentExceptioncom.ibm.wala.util.CancelExceptionpublic void setModuleFiles(Collection moduleFiles)
AnalysisEnginesetModuleFiles in interface AnalysisEnginemoduleFiles - A non-null Collection of module files: (EARFile, WARFile, ApplicationClientFile, EJBJarFile).public void buildAnalysisScope()
throws IOException
IOExceptionpublic IClassHierarchy buildClassHierarchy()
protected ClassLoaderFactory makeClassLoaderFactory(com.ibm.wala.util.config.SetOfClasses exclusions)
public IClassHierarchy getClassHierarchy()
protected void setClassHierarchy(IClassHierarchy cha)
protected CallGraph getCallGraph()
protected void addApplicationModulesToScope()
public void setJ2SELibraries(JarFile[] libs)
AnalysisEnginesetJ2SELibraries in interface AnalysisEnginelibs - 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)
AnalysisEnginesetJ2SELibraries in interface AnalysisEnginelibs - 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)
AnalysisEnginesetClosedWorld in interface AnalysisEngineb - whether to use closed-world analysispublic boolean isClosedWorld()
protected AnalysisScope getScope()
public PointerAnalysis<InstanceKey> getPointerAnalysis()
public HeapGraph getHeapGraph()
public String getExclusionsFile()
public void setExclusionsFile(String exclusionsFile)
public AnalysisOptions getDefaultOptions(Iterable<Entrypoint> entrypoints)
AnalysisEnginegetDefaultOptions in interface AnalysisEnginepublic AnalysisCache makeDefaultCache()
protected Iterable<Entrypoint> makeDefaultEntrypoints(AnalysisScope scope, IClassHierarchy cha)
public void setEntrypointBuilder(AbstractAnalysisEngine.EntrypointBuilder builder)
public CallGraphBuilder defaultCallGraphBuilder() throws IllegalArgumentException, com.ibm.wala.util.CancelException, IOException
com.ibm.wala.util.CancelExceptionIllegalArgumentExceptionIOExceptionpublic CallGraph buildDefaultCallGraph() throws IllegalArgumentException, com.ibm.wala.util.CancelException, IOException
IllegalArgumentExceptioncom.ibm.wala.util.CancelExceptionIOExceptionpublic AnalysisCache getCache()
public AnalysisOptions getOptions()
Copyright © 2015. All rights reserved.