本文整理了Java中com.ibm.wala.ipa.callgraph.impl.Util.makeMainEntrypoints()
方法的一些代码示例,展示了Util.makeMainEntrypoints()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.makeMainEntrypoints()
方法的具体详情如下:
包路径:com.ibm.wala.ipa.callgraph.impl.Util
类名称:Util
方法名:makeMainEntrypoints
暂无
代码示例来源:origin: wala/WALA
/**
* @return Entrypoints object for a Main J2SE class
*/
public static Iterable<Entrypoint> makeMainEntrypoints(AnalysisScope scope, final IClassHierarchy cha, String className) {
return makeMainEntrypoints(scope, cha, new String[] { className });
}
代码示例来源:origin: com.ibm.wala/com.ibm.wala.core
/**
* @return Entrypoints object for a Main J2SE class
*/
public static Iterable<Entrypoint> makeMainEntrypoints(AnalysisScope scope, final IClassHierarchy cha, String className) {
return makeMainEntrypoints(scope, cha, new String[] { className });
}
代码示例来源:origin: com.ibm.wala/com.ibm.wala.cast.java
@Override
protected Iterable<Entrypoint> makeDefaultEntrypoints(AnalysisScope scope, IClassHierarchy cha) {
return Util.makeMainEntrypoints(JavaSourceAnalysisScope.SOURCE, cha);
}
代码示例来源:origin: wala/WALA
public static Iterable<Entrypoint> makeMainEntrypoints(final AnalysisScope scope, final IClassHierarchy cha,
final String[] classNames) {
if (scope == null) {
throw new IllegalArgumentException("scope is null");
}
return makeMainEntrypoints(scope.getApplicationLoader(), cha, classNames);
}
代码示例来源:origin: com.ibm.wala/com.ibm.wala.core
public static Iterable<Entrypoint> makeMainEntrypoints(final AnalysisScope scope, final IClassHierarchy cha,
final String[] classNames) {
if (scope == null) {
throw new IllegalArgumentException("scope is null");
}
return makeMainEntrypoints(scope.getApplicationLoader(), cha, classNames);
}
代码示例来源:origin: wala/WALA
/**
* @return set of all eligible Main classes in the class hierarchy
* @throws IllegalArgumentException if scope is null
*/
public static Iterable<Entrypoint> makeMainEntrypoints(AnalysisScope scope, IClassHierarchy cha) {
if (scope == null) {
throw new IllegalArgumentException("scope is null");
}
return makeMainEntrypoints(scope.getApplicationLoader(), cha);
}
代码示例来源:origin: wala/WALA
@Override
protected Iterable<Entrypoint> makeDefaultEntrypoints(AnalysisScope scope, IClassHierarchy cha) {
return Util.makeMainEntrypoints(JavaSourceAnalysisScope.SOURCE, cha, mainClassDescriptors);
}
};
代码示例来源:origin: wala/WALA
@Override
protected Iterable<Entrypoint> makeDefaultEntrypoints(AnalysisScope scope, IClassHierarchy cha) {
return Util.makeMainEntrypoints(JavaSourceAnalysisScope.SOURCE, cha, mainClassDescriptors);
}
};
代码示例来源:origin: com.ibm.wala/com.ibm.wala.core
/**
* @return set of all eligible Main classes in the class hierarchy
* @throws IllegalArgumentException if scope is null
*/
public static Iterable<Entrypoint> makeMainEntrypoints(AnalysisScope scope, IClassHierarchy cha) {
if (scope == null) {
throw new IllegalArgumentException("scope is null");
}
return makeMainEntrypoints(scope.getApplicationLoader(), cha);
}
代码示例来源:origin: wala/WALA
@Override
protected Iterable<Entrypoint> makeDefaultEntrypoints(AnalysisScope scope, IClassHierarchy cha) {
return Util.makeMainEntrypoints(JavaSourceAnalysisScope.SOURCE, cha, mainClassDescriptors);
}
代码示例来源:origin: wala/WALA
public static CallGraph testCHA(String scopeFile,
String exclusionsFile,
Function<IClassHierarchy, Iterable<Entrypoint>> makeEntrypoints)
throws ClassHierarchyException, IllegalArgumentException, CancelException, IOException
{
AnalysisScope scope = CallGraphTestUtil.makeJ2SEAnalysisScope(scopeFile, exclusionsFile);
IClassHierarchy cha = ClassHierarchyFactory.make(scope);
CHACallGraph CG = new CHACallGraph(cha);
CG.init(makeEntrypoints.apply(cha));
return CG;
}
代码示例来源:origin: wala/WALA
private static CallGraph staticCG(String mainClass, String exclusionsFile) throws IOException, ClassHierarchyException, IllegalArgumentException, CancelException {
AnalysisScope scope = CallGraphTestUtil.makeJ2SEAnalysisScope(TestConstants.WALA_TESTDATA, exclusionsFile != null? exclusionsFile: CallGraphTestUtil.REGRESSION_EXCLUSIONS);
ClassHierarchy cha = ClassHierarchyFactory.make(scope);
Iterable<Entrypoint> entrypoints = com.ibm.wala.ipa.callgraph.impl.Util.makeMainEntrypoints(scope, cha, mainClass);
AnalysisOptions options = CallGraphTestUtil.makeAnalysisOptions(scope, entrypoints);
return CallGraphTestUtil.buildZeroOneCFA(options, new AnalysisCacheImpl(), cha, scope, false);
}
代码示例来源:origin: wala/WALA
@Test public void testRecursion() throws ClassHierarchyException, IllegalArgumentException, CancelException, IOException {
AnalysisScope scope = CallGraphTestUtil.makeJ2SEAnalysisScope(TestConstants.WALA_TESTDATA,
CallGraphTestUtil.REGRESSION_EXCLUSIONS);
ClassHierarchy cha = ClassHierarchyFactory.make(scope);
Iterable<Entrypoint> entrypoints = com.ibm.wala.ipa.callgraph.impl.Util.makeMainEntrypoints(scope, cha,
TestConstants.RECURSE_MAIN);
AnalysisOptions options = CallGraphTestUtil.makeAnalysisOptions(scope, entrypoints);
doCallGraphs(options, new AnalysisCacheImpl(), cha, scope);
}
代码示例来源:origin: wala/WALA
@Test public void testBug144() throws IOException, ClassHierarchyException, IllegalArgumentException, CancelException {
AnalysisScope scope = CallGraphTestUtil.makeJ2SEAnalysisScope(TestConstants.WALA_TESTDATA, CallGraphTestUtil.REGRESSION_EXCLUSIONS);
ClassHierarchy cha = ClassHierarchyFactory.make(scope);
Iterable<Entrypoint> entrypoints = com.ibm.wala.ipa.callgraph.impl.Util.makeMainEntrypoints(scope, cha,
"Lbug144/A");
AnalysisOptions options = CallGraphTestUtil.makeAnalysisOptions(scope, entrypoints);
@SuppressWarnings("unused")
CallGraph cg = CallGraphTestUtil.buildZeroCFA(options, new AnalysisCacheImpl(), cha, scope, false);
}
代码示例来源:origin: wala/WALA
@Test public void testJLex() throws ClassHierarchyException, IllegalArgumentException, CancelException, IOException {
AnalysisScope scope = CallGraphTestUtil.makeJ2SEAnalysisScope(TestConstants.JLEX, CallGraphTestUtil.REGRESSION_EXCLUSIONS);
ClassHierarchy cha = ClassHierarchyFactory.make(scope);
Iterable<Entrypoint> entrypoints = com.ibm.wala.ipa.callgraph.impl.Util
.makeMainEntrypoints(scope, cha, TestConstants.JLEX_MAIN);
AnalysisOptions options = CallGraphTestUtil.makeAnalysisOptions(scope, entrypoints);
doCallGraphs(options, new AnalysisCacheImpl(), cha, scope);
}
代码示例来源:origin: wala/WALA
@Test public void testBcelVerifier() throws ClassHierarchyException, IllegalArgumentException, CancelException, IOException {
AnalysisScope scope = CallGraphTestUtil.makeJ2SEAnalysisScope(TestConstants.BCEL, CallGraphTestUtil.REGRESSION_EXCLUSIONS);
ClassHierarchy cha = ClassHierarchyFactory.make(scope);
Iterable<Entrypoint> entrypoints = com.ibm.wala.ipa.callgraph.impl.Util.makeMainEntrypoints(scope, cha,
TestConstants.BCEL_VERIFIER_MAIN);
AnalysisOptions options = CallGraphTestUtil.makeAnalysisOptions(scope, entrypoints);
// this speeds up the test
options.setReflectionOptions(ReflectionOptions.NONE);
doCallGraphs(options, new AnalysisCacheImpl(), cha, scope);
}
代码示例来源:origin: wala/WALA
@Test public void testJava_cup() throws ClassHierarchyException, IllegalArgumentException, CancelException, IOException {
AnalysisScope scope = CallGraphTestUtil.makeJ2SEAnalysisScope(TestConstants.JAVA_CUP, CallGraphTestUtil.REGRESSION_EXCLUSIONS);
ClassHierarchy cha = ClassHierarchyFactory.make(scope);
Iterable<Entrypoint> entrypoints = com.ibm.wala.ipa.callgraph.impl.Util.makeMainEntrypoints(scope, cha,
TestConstants.JAVA_CUP_MAIN);
AnalysisOptions options = CallGraphTestUtil.makeAnalysisOptions(scope, entrypoints);
doCallGraphs(options, new AnalysisCacheImpl(), cha, scope, useShortProfile());
}
代码示例来源:origin: wala/WALA
@Test public void testHello() throws ClassHierarchyException, IllegalArgumentException, CancelException, IOException {
if (analyzingJar()) return;
AnalysisScope scope = CallGraphTestUtil.makeJ2SEAnalysisScope(TestConstants.HELLO, CallGraphTestUtil.REGRESSION_EXCLUSIONS);
ClassHierarchy cha = ClassHierarchyFactory.make(scope);
Iterable<Entrypoint> entrypoints = com.ibm.wala.ipa.callgraph.impl.Util.makeMainEntrypoints(scope, cha,
TestConstants.HELLO_MAIN);
AnalysisOptions options = CallGraphTestUtil.makeAnalysisOptions(scope, entrypoints);
doCallGraphs(options, new AnalysisCacheImpl(), cha, scope);
}
代码示例来源:origin: wala/WALA
private static Pair<CallGraph,PointerAnalysis<InstanceKey>> makeJavaBuilder(String scopeFile, String mainClass) throws IOException, ClassHierarchyException, IllegalArgumentException, CancelException {
AnalysisScope scope = CallGraphTestUtil.makeJ2SEAnalysisScope(scopeFile, CallGraphTestUtil.REGRESSION_EXCLUSIONS);
ClassHierarchy cha = ClassHierarchyFactory.make(scope);
Iterable<Entrypoint> entrypoints = com.ibm.wala.ipa.callgraph.impl.Util.makeMainEntrypoints(scope, cha, mainClass);
AnalysisOptions options = CallGraphTestUtil.makeAnalysisOptions(scope, entrypoints);
SSAPropagationCallGraphBuilder builder = Util.makeZeroCFABuilder(Language.JAVA, options, new AnalysisCacheImpl(), cha, scope);
CallGraph CG = builder.makeCallGraph(options);
return Pair.make(CG, builder.getPointerAnalysis());
}
代码示例来源:origin: wala/WALA
private static CallGraph doGraph(boolean usePiNodes) throws ClassHierarchyException, IllegalArgumentException, CancelException, IOException {
AnalysisScope scope = CallGraphTestUtil.makeJ2SEAnalysisScope(TestConstants.WALA_TESTDATA, CallGraphTestUtil.REGRESSION_EXCLUSIONS);
ClassHierarchy cha = ClassHierarchyFactory.make(scope);
Iterable<Entrypoint> entrypoints = com.ibm.wala.ipa.callgraph.impl.Util.makeMainEntrypoints(scope, cha,
TestConstants.PI_TEST_MAIN);
AnalysisOptions options = CallGraphTestUtil.makeAnalysisOptions(scope, entrypoints);
SSAPiNodePolicy policy = usePiNodes ? SSAOptions.getAllBuiltInPiNodes() : null;
options.getSSAOptions().setPiNodePolicy(policy);
return CallGraphTestUtil.buildZeroCFA(options, new AnalysisCacheImpl(new DefaultIRFactory(), options.getSSAOptions()), cha, scope, false);
}
内容来源于网络,如有侵权,请联系作者删除!