remove EMF
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2162 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
This commit is contained in:
parent
17a8b62204
commit
1d62ddf160
|
@ -0,0 +1,5 @@
|
|||
java\/awt\/.*
|
||||
javax\/swing\/.*
|
||||
sun\/awt\/.*
|
||||
sun\/swing\/.*
|
||||
com\/sun\/corba\/.*
|
|
@ -0,0 +1,4 @@
|
|||
java\/awt\/.*
|
||||
javax\/swing\/.*
|
||||
sun\/awt\/.*
|
||||
sun\/swing\/.*
|
|
@ -0,0 +1,3 @@
|
|||
Primordial,Java,stdlib,none
|
||||
Primordial,Java,jarFile,primordial.jar.model
|
||||
Application,Java,jarFile,JLex.jar
|
|
@ -0,0 +1,6 @@
|
|||
java\/awt\/.*
|
||||
javax\/swing\/.*
|
||||
sun\/awt\/.*
|
||||
sun\/swing\/.*
|
||||
com\/sun\/.*
|
||||
sun\/.*
|
|
@ -0,0 +1,3 @@
|
|||
Primordial,Java,stdlib,none
|
||||
Primordial,Java,jarFile,primordial.jar.model
|
||||
Application,Java,jarFile,bcel-5.2.jar
|
|
@ -0,0 +1,4 @@
|
|||
Primordial,Java,stdlib,none
|
||||
Primordial,Java,jarFile,primordial.jar.model
|
||||
Application,Java,classFile,hello/Hello.class
|
||||
Application,Java,sourceFile,hello/Hello.java
|
|
@ -0,0 +1,3 @@
|
|||
Primordial,Java,stdlib,none
|
||||
Primordial,Java,jarFile,primordial.jar.model
|
||||
Application,Java,jarFile,java-cup-11a.jar
|
|
@ -0,0 +1,2 @@
|
|||
Primordial,Java,stdlib,none
|
||||
Primordial,Java,jarFile,primordial.jar.model
|
|
@ -0,0 +1,3 @@
|
|||
Primordial,Java,stdlib,none
|
||||
Primordial,Java,jarFile,primordial.jar.model
|
||||
Application,Java,jarFile,com.ibm.wala.core.testdata_1.0.0.jar
|
|
@ -1,11 +1,3 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<com.ibm.wala.java.scope:EJavaAnalysisScope xmlns:com.ibm.wala.java.scope="http:///com/ibm/wala/wala.ecore.java.scope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
|
||||
<loaders loaderName="Primordial">
|
||||
<modules xsi:type="com.ibm.wala.java.scope:EBuiltInModule"/>
|
||||
<modules xsi:type="com.ibm.wala.java.scope:EBuiltInModule" id="primordial_jar_model"/>
|
||||
</loaders>
|
||||
<loaders loaderName="Application">
|
||||
<modules url="com.ibm.wala.core.testdata_1.0.0.jar" xsi:type="com.ibm.wala.java.scope:EJarFile"/>
|
||||
</loaders>
|
||||
</com.ibm.wala.java.scope:EJavaAnalysisScope>
|
||||
Primordial,Java,stdlib,none
|
||||
Primordial,Java,jarFile,primordial_jar_model
|
||||
Application,Java,jarFile,com.ibm.wala.core.testdata_1.0.0.jar
|
||||
|
|
|
@ -162,7 +162,7 @@ public class CallGraphTest extends WalaTestCase {
|
|||
}
|
||||
|
||||
public void testIO() throws ClassHierarchyException, IllegalArgumentException, CancelException {
|
||||
AnalysisScope scope = CallGraphTestUtil.makeJ2SEAnalysisScope("primordial.xml", CallGraphTestUtil.REGRESSION_EXCLUSIONS);
|
||||
AnalysisScope scope = CallGraphTestUtil.makeJ2SEAnalysisScope("primordial.txt", CallGraphTestUtil.REGRESSION_EXCLUSIONS);
|
||||
ClassHierarchy cha = ClassHierarchy.make(scope);
|
||||
Iterable<Entrypoint> entrypoints = makePrimordialPublicEntrypoints(scope, cha, "java/io");
|
||||
AnalysisOptions options = CallGraphTestUtil.makeAnalysisOptions(scope, entrypoints);
|
||||
|
@ -195,7 +195,7 @@ public class CallGraphTest extends WalaTestCase {
|
|||
return;
|
||||
}
|
||||
|
||||
AnalysisScope scope = CallGraphTestUtil.makeJ2SEAnalysisScope("primordial.xml", "GUIExclusions.xml");
|
||||
AnalysisScope scope = CallGraphTestUtil.makeJ2SEAnalysisScope("primordial.txt", "GUIExclusions.txt");
|
||||
ClassHierarchy cha = ClassHierarchy.make(scope);
|
||||
Iterable<Entrypoint> entrypoints = makePrimordialMainEntrypoints(scope, cha);
|
||||
AnalysisOptions options = CallGraphTestUtil.makeAnalysisOptions(scope, entrypoints);
|
||||
|
|
|
@ -10,8 +10,9 @@
|
|||
*******************************************************************************/
|
||||
package com.ibm.wala.core.tests.callGraph;
|
||||
|
||||
import com.ibm.wala.classLoader.*;
|
||||
import com.ibm.wala.eclipse.util.CancelException;
|
||||
import com.ibm.wala.emf.wrappers.EMFScopeWrapper;
|
||||
import com.ibm.wala.util.config.AnalysisScopeReader;
|
||||
import com.ibm.wala.ipa.callgraph.AnalysisCache;
|
||||
import com.ibm.wala.ipa.callgraph.AnalysisOptions;
|
||||
import com.ibm.wala.ipa.callgraph.AnalysisScope;
|
||||
|
@ -44,14 +45,16 @@ public class CallGraphTestUtil {
|
|||
return options;
|
||||
}
|
||||
|
||||
public static String REGRESSION_EXCLUSIONS = "Java60RegressionExclusions.xml";
|
||||
public static String REGRESSION_EXCLUSIONS = "Java60RegressionExclusions.txt";
|
||||
|
||||
// public static AnalysisScope makeJ2SEAnalysisScope(String scopeFile) {
|
||||
// return new EMFScopeWrapper(scopeFile, "J2SEClassHierarchyExclusions.xml", MY_CLASSLOADER);
|
||||
// return AnalysisScopeReader.read(scopeFile, "J2SEClassHierarchyExclusions.txt", MY_CLASSLOADER);
|
||||
// }
|
||||
|
||||
public static AnalysisScope makeJ2SEAnalysisScope(String scopeFile, String exclusionsFile) {
|
||||
return new EMFScopeWrapper(scopeFile, exclusionsFile, MY_CLASSLOADER);
|
||||
AnalysisScope scope =
|
||||
AnalysisScopeReader.read(scopeFile, exclusionsFile, MY_CLASSLOADER);
|
||||
return scope;
|
||||
}
|
||||
|
||||
public static CallGraph buildRTA(AnalysisOptions options, AnalysisCache cache, ClassHierarchy cha, AnalysisScope scope) throws IllegalArgumentException, CancelException {
|
||||
|
|
|
@ -38,7 +38,7 @@ public class ReflectionTest extends WalaTestCase {
|
|||
}
|
||||
|
||||
public void testReflect1() throws WalaException, IllegalArgumentException, CancelException {
|
||||
AnalysisScope scope = CallGraphTestUtil.makeJ2SEAnalysisScope(TestConstants.WALA_TESTDATA, "Java60RegressionExclusions.xml");
|
||||
AnalysisScope scope = CallGraphTestUtil.makeJ2SEAnalysisScope(TestConstants.WALA_TESTDATA, "Java60RegressionExclusions.txt");
|
||||
ClassHierarchy cha = ClassHierarchy.make(scope);
|
||||
Iterable<Entrypoint> entrypoints = com.ibm.wala.ipa.callgraph.impl.Util.makeMainEntrypoints(scope, cha, TestConstants.REFLECT1_MAIN);
|
||||
AnalysisOptions options = CallGraphTestUtil.makeAnalysisOptions(scope, entrypoints);
|
||||
|
|
|
@ -17,7 +17,7 @@ import com.ibm.wala.classLoader.ClassLoaderFactoryImpl;
|
|||
import com.ibm.wala.classLoader.IMethod;
|
||||
import com.ibm.wala.core.tests.util.TestConstants;
|
||||
import com.ibm.wala.core.tests.util.WalaTestCase;
|
||||
import com.ibm.wala.emf.wrappers.EMFScopeWrapper;
|
||||
import com.ibm.wala.util.config.AnalysisScopeReader;
|
||||
import com.ibm.wala.ipa.callgraph.AnalysisScope;
|
||||
import com.ibm.wala.ipa.cha.ClassHierarchy;
|
||||
import com.ibm.wala.ipa.cha.ClassHierarchyException;
|
||||
|
@ -41,7 +41,7 @@ public class GetTargetsTest extends WalaTestCase {
|
|||
|
||||
protected void setUp() throws Exception {
|
||||
|
||||
scope = new EMFScopeWrapper(TestConstants.WALA_TESTDATA, "J2SEClassHierarchyExclusions.xml", MY_CLASSLOADER);
|
||||
scope = AnalysisScopeReader.read(TestConstants.WALA_TESTDATA, "J2SEClassHierarchyExclusions.xml", MY_CLASSLOADER);
|
||||
|
||||
ClassLoaderFactory factory = new ClassLoaderFactoryImpl(scope.getExclusions() );
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ import com.ibm.wala.classLoader.ClassLoaderFactoryImpl;
|
|||
import com.ibm.wala.classLoader.IClass;
|
||||
import com.ibm.wala.core.tests.util.TestConstants;
|
||||
import com.ibm.wala.core.tests.util.WalaTestCase;
|
||||
import com.ibm.wala.emf.wrappers.EMFScopeWrapper;
|
||||
import com.ibm.wala.util.config.AnalysisScopeReader;
|
||||
import com.ibm.wala.ipa.callgraph.AnalysisScope;
|
||||
import com.ibm.wala.ipa.cha.ClassHierarchy;
|
||||
import com.ibm.wala.ipa.cha.ClassHierarchyException;
|
||||
|
@ -38,7 +38,7 @@ public class InterfaceTest extends WalaTestCase {
|
|||
}
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
scope = new EMFScopeWrapper(TestConstants.WALA_TESTDATA, "J2SEClassHierarchyExclusions.xml", MY_CLASSLOADER);
|
||||
scope = AnalysisScopeReader.read(TestConstants.WALA_TESTDATA, "J2SEClassHierarchyExclusions.xml", MY_CLASSLOADER);
|
||||
|
||||
ClassLoaderFactory factory = new ClassLoaderFactoryImpl(scope.getExclusions() );
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ import junit.framework.Assert;
|
|||
import com.ibm.wala.core.tests.ir.DeterministicIRTest;
|
||||
import com.ibm.wala.core.tests.util.TestConstants;
|
||||
import com.ibm.wala.core.tests.util.WalaTestCase;
|
||||
import com.ibm.wala.emf.wrappers.EMFScopeWrapper;
|
||||
import com.ibm.wala.util.config.AnalysisScopeReader;
|
||||
import com.ibm.wala.ipa.callgraph.AnalysisScope;
|
||||
|
||||
/**
|
||||
|
@ -29,7 +29,7 @@ public class LibraryVersionTest extends WalaTestCase {
|
|||
private static final ClassLoader MY_CLASSLOADER = DeterministicIRTest.class.getClassLoader();
|
||||
|
||||
public void testLibraryVersion() {
|
||||
AnalysisScope scope = new EMFScopeWrapper(TestConstants.WALA_TESTDATA, "J2SEClassHierarchyExclusions.xml", MY_CLASSLOADER);
|
||||
AnalysisScope scope = AnalysisScopeReader.read(TestConstants.WALA_TESTDATA, "J2SEClassHierarchyExclusions.xml", MY_CLASSLOADER);
|
||||
System.err.println("java library version is " + scope.getJavaLibraryVersion());
|
||||
Assert.assertTrue(scope.isJava16Libraries() || scope.isJava15Libraries()||scope.isJava14Libraries());
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ package com.ibm.wala.core.tests.cha;
|
|||
import com.ibm.wala.classLoader.IClass;
|
||||
import com.ibm.wala.core.tests.util.TestConstants;
|
||||
import com.ibm.wala.core.tests.util.WalaTestCase;
|
||||
import com.ibm.wala.emf.wrappers.EMFScopeWrapper;
|
||||
import com.ibm.wala.util.config.AnalysisScopeReader;
|
||||
import com.ibm.wala.ipa.callgraph.AnalysisScope;
|
||||
import com.ibm.wala.ipa.cha.ClassHierarchy;
|
||||
import com.ibm.wala.ipa.cha.ClassHierarchyException;
|
||||
|
@ -31,7 +31,7 @@ public class SourceMapTest extends WalaTestCase {
|
|||
|
||||
public void testHello() throws ClassHierarchyException {
|
||||
AnalysisScope scope = null;
|
||||
scope = new EMFScopeWrapper(TestConstants.HELLO, null, MY_CLASSLOADER);
|
||||
scope = AnalysisScopeReader.read(TestConstants.HELLO, null, MY_CLASSLOADER);
|
||||
// TODO: it's annoying to have to build a class hierarchy here.
|
||||
// see feature 38676
|
||||
ClassHierarchy cha = ClassHierarchy.make(scope);
|
||||
|
@ -45,7 +45,7 @@ public class SourceMapTest extends WalaTestCase {
|
|||
|
||||
public void testFromJar() throws ClassHierarchyException {
|
||||
AnalysisScope scope = null;
|
||||
scope = new EMFScopeWrapper(TestConstants.HELLO, null, MY_CLASSLOADER);
|
||||
scope = AnalysisScopeReader.read(TestConstants.HELLO, null, MY_CLASSLOADER);
|
||||
// TODO: it's annoying to have to build a class hierarchy here.
|
||||
// open a feature to fix this
|
||||
ClassHierarchy cha = ClassHierarchy.make(scope);
|
||||
|
|
|
@ -155,7 +155,7 @@ public abstract class AbstractPtrTest extends TestCase {
|
|||
}
|
||||
|
||||
protected DemandRefinementPointsTo makeDemandPointerAnalysis(String scopeFile, String mainClass) throws ClassHierarchyException, IllegalArgumentException, CancelException {
|
||||
AnalysisScope scope = CallGraphTestUtil.makeJ2SEAnalysisScope(scopeFile, "Java60RegressionExclusions.xml");
|
||||
AnalysisScope scope = CallGraphTestUtil.makeJ2SEAnalysisScope(scopeFile, "Java60RegressionExclusions.txt");
|
||||
// build a type hierarchy
|
||||
ClassHierarchy cha = ClassHierarchy.make(scope);
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ package com.ibm.wala.core.tests.demandpa;
|
|||
|
||||
public class TestInfo {
|
||||
|
||||
public static final String SCOPE_FILE = "wala.testdata.xml";
|
||||
public static final String SCOPE_FILE = "wala.testdata.txt";
|
||||
|
||||
// public static final String TEST1 = "Ldemandpa/Test1";
|
||||
|
||||
|
|
|
@ -14,9 +14,9 @@ import com.ibm.wala.cfg.ControlFlowGraph;
|
|||
import com.ibm.wala.classLoader.IMethod;
|
||||
import com.ibm.wala.core.tests.callGraph.CallGraphTestUtil;
|
||||
import com.ibm.wala.core.tests.util.WalaTestCase;
|
||||
import com.ibm.wala.ecore.java.scope.EJavaAnalysisScope;
|
||||
import com.ibm.wala.emf.wrappers.EMFScopeWrapper;
|
||||
import com.ibm.wala.emf.wrappers.JavaScopeUtil;
|
||||
import com.ibm.wala.ipa.callgraph.AnalysisScope;
|
||||
import com.ibm.wala.util.config.AnalysisScopeReader;
|
||||
|
||||
import com.ibm.wala.ipa.callgraph.AnalysisCache;
|
||||
import com.ibm.wala.ipa.callgraph.AnalysisOptions;
|
||||
import com.ibm.wala.ipa.callgraph.impl.Everywhere;
|
||||
|
@ -44,9 +44,9 @@ public class CFGTest extends WalaTestCase {
|
|||
*/
|
||||
private void doMethod(String methodSig) {
|
||||
try {
|
||||
EJavaAnalysisScope escope = JavaScopeUtil.makePrimordialScope(CallGraphTestUtil.REGRESSION_EXCLUSIONS);
|
||||
AnalysisScope scope = AnalysisScopeReader.makePrimordialScope(CallGraphTestUtil.REGRESSION_EXCLUSIONS);
|
||||
|
||||
EMFScopeWrapper scope = EMFScopeWrapper.generateScope(escope);
|
||||
|
||||
|
||||
ClassHierarchy cha = ClassHierarchy.make(scope);
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ import com.ibm.wala.classLoader.IMethod;
|
|||
import com.ibm.wala.classLoader.ShrikeCTMethod;
|
||||
import com.ibm.wala.core.tests.util.TestConstants;
|
||||
import com.ibm.wala.core.tests.util.WalaTestCase;
|
||||
import com.ibm.wala.emf.wrappers.EMFScopeWrapper;
|
||||
import com.ibm.wala.util.config.AnalysisScopeReader;
|
||||
import com.ibm.wala.ipa.callgraph.AnalysisCache;
|
||||
import com.ibm.wala.ipa.callgraph.AnalysisOptions;
|
||||
import com.ibm.wala.ipa.callgraph.AnalysisScope;
|
||||
|
@ -46,7 +46,7 @@ public class CornerCasesTest extends WalaTestCase {
|
|||
*/
|
||||
public void testBug38484() throws ClassHierarchyException {
|
||||
AnalysisScope scope = null;
|
||||
scope = new EMFScopeWrapper(TestConstants.WALA_TESTDATA, "J2SEClassHierarchyExclusions.xml", MY_CLASSLOADER);
|
||||
scope = AnalysisScopeReader.read(TestConstants.WALA_TESTDATA, "J2SEClassHierarchyExclusions.xml", MY_CLASSLOADER);
|
||||
ClassHierarchy cha = ClassHierarchy.make(scope);
|
||||
TypeReference t = TypeReference.findOrCreateClass(scope.getApplicationLoader(), "cornerCases", "YuckyInterface");
|
||||
IClass klass = cha.lookupClass(t);
|
||||
|
@ -63,7 +63,7 @@ public class CornerCasesTest extends WalaTestCase {
|
|||
*/
|
||||
public void testBug38540() throws ClassHierarchyException {
|
||||
AnalysisScope scope = null;
|
||||
scope = new EMFScopeWrapper(TestConstants.WALA_TESTDATA, "J2SEClassHierarchyExclusions.xml", MY_CLASSLOADER);
|
||||
scope = AnalysisScopeReader.read(TestConstants.WALA_TESTDATA, "J2SEClassHierarchyExclusions.xml", MY_CLASSLOADER);
|
||||
AnalysisOptions options = new AnalysisOptions();
|
||||
ClassHierarchy cha = ClassHierarchy.make(scope);
|
||||
TypeReference t = TypeReference.findOrCreateClass(scope.getApplicationLoader(), "cornerCases", "Main");
|
||||
|
|
|
@ -17,7 +17,7 @@ import com.ibm.wala.classLoader.ClassLoaderFactoryImpl;
|
|||
import com.ibm.wala.classLoader.IMethod;
|
||||
import com.ibm.wala.core.tests.util.TestConstants;
|
||||
import com.ibm.wala.core.tests.util.WalaTestCase;
|
||||
import com.ibm.wala.emf.wrappers.EMFScopeWrapper;
|
||||
import com.ibm.wala.util.config.AnalysisScopeReader;
|
||||
import com.ibm.wala.ipa.callgraph.AnalysisCache;
|
||||
import com.ibm.wala.ipa.callgraph.AnalysisOptions;
|
||||
import com.ibm.wala.ipa.callgraph.AnalysisScope;
|
||||
|
@ -59,7 +59,7 @@ public class DeterministicIRTest extends WalaTestCase {
|
|||
|
||||
protected void setUp() throws Exception {
|
||||
|
||||
scope = new EMFScopeWrapper(TestConstants.WALA_TESTDATA, "J2SEClassHierarchyExclusions.xml", MY_CLASSLOADER);
|
||||
scope = AnalysisScopeReader.read(TestConstants.WALA_TESTDATA, "J2SEClassHierarchyExclusions.xml", MY_CLASSLOADER);
|
||||
|
||||
options = new AnalysisOptions(scope, null);
|
||||
cache = new AnalysisCache();
|
||||
|
|
|
@ -16,7 +16,7 @@ import com.ibm.wala.classLoader.IClass;
|
|||
import com.ibm.wala.classLoader.IMethod;
|
||||
import com.ibm.wala.core.tests.util.TestConstants;
|
||||
import com.ibm.wala.core.tests.util.WalaTestCase;
|
||||
import com.ibm.wala.emf.wrappers.EMFScopeWrapper;
|
||||
import com.ibm.wala.util.config.AnalysisScopeReader;
|
||||
import com.ibm.wala.ipa.callgraph.AnalysisCache;
|
||||
import com.ibm.wala.ipa.callgraph.AnalysisOptions;
|
||||
import com.ibm.wala.ipa.callgraph.AnalysisScope;
|
||||
|
@ -61,7 +61,7 @@ public class LocalNamesTest extends WalaTestCase {
|
|||
*/
|
||||
protected void setUp() throws Exception {
|
||||
|
||||
scope = new EMFScopeWrapper(TestConstants.WALA_TESTDATA, "J2SEClassHierarchyExclusions.xml", MY_CLASSLOADER);
|
||||
scope = AnalysisScopeReader.read(TestConstants.WALA_TESTDATA, "J2SEClassHierarchyExclusions.xml", MY_CLASSLOADER);
|
||||
|
||||
options = new AnalysisOptions(scope, null);
|
||||
cache = new AnalysisCache();
|
||||
|
@ -90,7 +90,7 @@ public class LocalNamesTest extends WalaTestCase {
|
|||
*/
|
||||
public void testAliasNames() {
|
||||
try {
|
||||
AnalysisScope scope = new EMFScopeWrapper(TestConstants.WALA_TESTDATA, "J2SEClassHierarchyExclusions.xml", MY_CLASSLOADER);
|
||||
AnalysisScope scope = AnalysisScopeReader.read(TestConstants.WALA_TESTDATA, "J2SEClassHierarchyExclusions.xml", MY_CLASSLOADER);
|
||||
ClassHierarchy cha = ClassHierarchy.make(scope);
|
||||
TypeReference t = TypeReference.findOrCreateClass(scope.getApplicationLoader(), "cornerCases", "AliasNames");
|
||||
IClass klass = cha.lookupClass(t);
|
||||
|
|
|
@ -16,7 +16,7 @@ import com.ibm.wala.classLoader.ClassLoaderFactoryImpl;
|
|||
import com.ibm.wala.classLoader.IMethod;
|
||||
import com.ibm.wala.core.tests.util.TestConstants;
|
||||
import com.ibm.wala.core.tests.util.WalaTestCase;
|
||||
import com.ibm.wala.emf.wrappers.EMFScopeWrapper;
|
||||
import com.ibm.wala.util.config.AnalysisScopeReader;
|
||||
import com.ibm.wala.ipa.callgraph.AnalysisCache;
|
||||
import com.ibm.wala.ipa.callgraph.AnalysisOptions;
|
||||
import com.ibm.wala.ipa.callgraph.AnalysisScope;
|
||||
|
@ -55,7 +55,7 @@ public class TypeInferenceTest extends WalaTestCase {
|
|||
|
||||
protected void setUp() throws Exception {
|
||||
|
||||
scope = new EMFScopeWrapper(TestConstants.WALA_TESTDATA, "J2SEClassHierarchyExclusions.xml", MY_CLASSLOADER);
|
||||
scope = AnalysisScopeReader.read(TestConstants.WALA_TESTDATA, "J2SEClassHierarchyExclusions.xml", MY_CLASSLOADER);
|
||||
|
||||
options = new AnalysisOptions(scope, null);
|
||||
cache = new AnalysisCache();
|
||||
|
|
|
@ -12,22 +12,22 @@ package com.ibm.wala.core.tests.util;
|
|||
|
||||
public interface TestConstants {
|
||||
|
||||
public final static String WALA_TESTDATA = "wala.testdata.xml";
|
||||
public final static String WALA_TESTDATA = "wala.testdata.txt";
|
||||
|
||||
public static final String CLASSCONSTANT_MAIN = "LclassConstant/ClassConstant";
|
||||
public static final String PI_TEST_MAIN = "Lpi/PiNodeCallGraphTestCase";
|
||||
public static final String RECURSE_MAIN = "Lrecurse/NList";
|
||||
|
||||
public final static String HELLO = "hello.xml";
|
||||
public final static String HELLO = "hello.txt";
|
||||
public final static String HELLO_MAIN = "Lhello/Hello";
|
||||
|
||||
public final static String BCEL = "bcel.xml";
|
||||
public final static String BCEL = "bcel.txt";
|
||||
public final static String BCEL_VERIFIER_MAIN = "Lorg/apache/bcel/verifier/Verifier";
|
||||
|
||||
public final static String JLEX = "JLex.xml";
|
||||
public final static String JLEX = "JLex.txt";
|
||||
public final static String JLEX_MAIN = "LJLex/Main";
|
||||
|
||||
public final static String JAVA_CUP = "java_cup.xml";
|
||||
public final static String JAVA_CUP = "java_cup.txt";
|
||||
public final static String JAVA_CUP_MAIN = "Ljava_cup/Main";
|
||||
|
||||
public final static String MULTI_DIM_MAIN = "LmultiDim/TestMultiDim";
|
||||
|
|
|
@ -45,9 +45,9 @@ import com.ibm.wala.demandpa.util.CallGraphMapUtil;
|
|||
import com.ibm.wala.demandpa.util.MemoryAccessMap;
|
||||
import com.ibm.wala.demandpa.util.WalaUtil;
|
||||
import com.ibm.wala.eclipse.util.CancelException;
|
||||
import com.ibm.wala.ecore.java.scope.EJavaAnalysisScope;
|
||||
import com.ibm.wala.emf.wrappers.EMFScopeWrapper;
|
||||
import com.ibm.wala.emf.wrappers.JavaScopeUtil;
|
||||
import com.ibm.wala.ipa.callgraph.AnalysisScope;
|
||||
import com.ibm.wala.util.config.AnalysisScopeReader;
|
||||
|
||||
import com.ibm.wala.ipa.callgraph.AnalysisCache;
|
||||
import com.ibm.wala.ipa.callgraph.AnalysisOptions;
|
||||
import com.ibm.wala.ipa.callgraph.AnalysisScope;
|
||||
|
@ -120,15 +120,8 @@ public class CompareToZeroOneCFADriver {
|
|||
private static void runApplication(String appJar) throws IllegalArgumentException, CancelException {
|
||||
Trace.println("=======---------------=============");
|
||||
Trace.println("ANALYZING " + appJar + "\n\n");
|
||||
EMFScopeWrapper scope = null;
|
||||
try {
|
||||
EJavaAnalysisScope escope = JavaScopeUtil.makeAnalysisScope(appJar, CallGraphTestUtil.REGRESSION_EXCLUSIONS);
|
||||
|
||||
// generate a DOMO-consumable wrapper around the incoming scope object
|
||||
scope = EMFScopeWrapper.generateScope(escope);
|
||||
} catch (WalaException e) {
|
||||
Assertions.UNREACHABLE();
|
||||
}
|
||||
AnalysisScope scope = AnalysisScopeReader.makeJavaBinaryAnalysisScope(appJar, CallGraphTestUtil.REGRESSION_EXCLUSIONS);
|
||||
|
||||
// TODO: return the warning set (need a CAPA type)
|
||||
// invoke DOMO to build a DOMO class hierarchy object
|
||||
|
@ -233,4 +226,4 @@ public class CompareToZeroOneCFADriver {
|
|||
return fullDemandPointsTo;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,8 +15,8 @@ import java.util.Collection;
|
|||
import org.eclipse.core.resources.IWorkspaceRoot;
|
||||
import org.eclipse.core.resources.ResourcesPlugin;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.equinox.app.IApplication;
|
||||
import org.eclipse.equinox.app.IApplicationContext;
|
||||
//import org.eclipse.equinox.app.IApplication;
|
||||
//import org.eclipse.equinox.app.IApplicationContext;
|
||||
import org.eclipse.jdt.core.IJavaProject;
|
||||
|
||||
import com.ibm.wala.eclipse.util.EclipseProjectPath;
|
||||
|
@ -30,9 +30,9 @@ import com.ibm.wala.eclipse.util.JdtUtil;
|
|||
* @author sjfink
|
||||
*
|
||||
*/
|
||||
public class Main implements IApplication {
|
||||
|
||||
public class Main /* implements IApplication */ {
|
||||
|
||||
/*
|
||||
public Object start(IApplicationContext context) throws Exception {
|
||||
Collection<IJavaProject> jp = JdtUtil.getWorkspaceJavaProjects();
|
||||
IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
|
||||
|
@ -44,6 +44,7 @@ public class Main implements IApplication {
|
|||
}
|
||||
return null;
|
||||
}
|
||||
*/
|
||||
|
||||
public void stop() {
|
||||
}
|
||||
|
|
|
@ -15,9 +15,9 @@ import java.util.Properties;
|
|||
|
||||
import com.ibm.wala.core.tests.callGraph.CallGraphTestUtil;
|
||||
import com.ibm.wala.eclipse.util.CancelException;
|
||||
import com.ibm.wala.ecore.java.scope.EJavaAnalysisScope;
|
||||
import com.ibm.wala.emf.wrappers.EMFScopeWrapper;
|
||||
import com.ibm.wala.emf.wrappers.JavaScopeUtil;
|
||||
import com.ibm.wala.ipa.callgraph.AnalysisScope;
|
||||
import com.ibm.wala.util.config.AnalysisScopeReader;
|
||||
|
||||
import com.ibm.wala.examples.properties.WalaExamplesProperties;
|
||||
import com.ibm.wala.ipa.callgraph.AnalysisCache;
|
||||
import com.ibm.wala.ipa.callgraph.AnalysisOptions;
|
||||
|
@ -114,12 +114,13 @@ public class GVCallGraph {
|
|||
* @throws IllegalArgumentException
|
||||
*/
|
||||
public static Graph<CGNode> buildPrunedCallGraph(String appJar, String exclusionFile) throws WalaException, IllegalArgumentException, CancelException {
|
||||
EJavaAnalysisScope escope = JavaScopeUtil.makeAnalysisScope(appJar, CallGraphTestUtil.REGRESSION_EXCLUSIONS);
|
||||
if (exclusionFile != null) {
|
||||
escope.setExclusionFileName(exclusionFile);
|
||||
}
|
||||
|
||||
EMFScopeWrapper scope = EMFScopeWrapper.generateScope(escope);
|
||||
AnalysisScope scope =
|
||||
AnalysisScopeReader.makeJavaBinaryAnalysisScope(
|
||||
appJar,
|
||||
exclusionFile != null?
|
||||
exclusionFile:
|
||||
CallGraphTestUtil.REGRESSION_EXCLUSIONS);
|
||||
|
||||
ClassHierarchy cha = ClassHierarchy.make(scope);
|
||||
|
||||
Iterable<Entrypoint> entrypoints = com.ibm.wala.ipa.callgraph.impl.Util.makeMainEntrypoints(scope, cha);
|
||||
|
@ -187,4 +188,4 @@ public class GVCallGraph {
|
|||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,9 +16,9 @@ import java.util.Properties;
|
|||
import com.ibm.wala.cfg.cdg.ControlDependenceGraph;
|
||||
import com.ibm.wala.classLoader.IMethod;
|
||||
import com.ibm.wala.core.tests.callGraph.CallGraphTestUtil;
|
||||
import com.ibm.wala.ecore.java.scope.EJavaAnalysisScope;
|
||||
import com.ibm.wala.emf.wrappers.EMFScopeWrapper;
|
||||
import com.ibm.wala.emf.wrappers.JavaScopeUtil;
|
||||
import com.ibm.wala.ipa.callgraph.AnalysisScope;
|
||||
import com.ibm.wala.util.config.AnalysisScopeReader;
|
||||
|
||||
import com.ibm.wala.examples.properties.WalaExamplesProperties;
|
||||
import com.ibm.wala.ipa.callgraph.AnalysisCache;
|
||||
import com.ibm.wala.ipa.callgraph.AnalysisOptions;
|
||||
|
@ -82,9 +82,9 @@ public class GVControlDependenceGraph {
|
|||
if (SWTCallGraph.isDirectory(appJar)) {
|
||||
appJar = SWTCallGraph.findJarFiles(new String[] { appJar });
|
||||
}
|
||||
EJavaAnalysisScope escope = JavaScopeUtil.makeAnalysisScope(appJar, CallGraphTestUtil.REGRESSION_EXCLUSIONS);
|
||||
AnalysisScope scope = AnalysisScopeReader.makeJavaBinaryAnalysisScope(appJar, CallGraphTestUtil.REGRESSION_EXCLUSIONS);
|
||||
|
||||
EMFScopeWrapper scope = EMFScopeWrapper.generateScope(escope);
|
||||
|
||||
ClassHierarchy cha = ClassHierarchy.make(scope);
|
||||
|
||||
MethodReference mr = StringStuff.makeMethodReference(methodSig);
|
||||
|
|
|
@ -15,9 +15,9 @@ import java.util.Properties;
|
|||
|
||||
import com.ibm.wala.core.tests.callGraph.CallGraphTestUtil;
|
||||
import com.ibm.wala.eclipse.util.CancelException;
|
||||
import com.ibm.wala.ecore.java.scope.EJavaAnalysisScope;
|
||||
import com.ibm.wala.emf.wrappers.EMFScopeWrapper;
|
||||
import com.ibm.wala.emf.wrappers.JavaScopeUtil;
|
||||
import com.ibm.wala.ipa.callgraph.AnalysisScope;
|
||||
import com.ibm.wala.util.config.AnalysisScopeReader;
|
||||
|
||||
import com.ibm.wala.examples.properties.WalaExamplesProperties;
|
||||
import com.ibm.wala.ipa.callgraph.AnalysisCache;
|
||||
import com.ibm.wala.ipa.callgraph.AnalysisOptions;
|
||||
|
@ -111,10 +111,10 @@ public class GVSDG {
|
|||
*/
|
||||
public static Process run(String appJar, String mainClass, DataDependenceOptions dOptions, ControlDependenceOptions cOptions) throws IllegalArgumentException, CancelException {
|
||||
try {
|
||||
EJavaAnalysisScope escope = JavaScopeUtil.makeAnalysisScope(appJar, CallGraphTestUtil.REGRESSION_EXCLUSIONS);
|
||||
AnalysisScope scope = AnalysisScopeReader.makeJavaBinaryAnalysisScope(appJar, CallGraphTestUtil.REGRESSION_EXCLUSIONS);
|
||||
|
||||
// generate a WALA-consumable wrapper around the incoming scope object
|
||||
EMFScopeWrapper scope = EMFScopeWrapper.generateScope(escope);
|
||||
|
||||
ClassHierarchy cha = ClassHierarchy.make(scope);
|
||||
Iterable<Entrypoint> entrypoints = com.ibm.wala.ipa.callgraph.impl.Util.makeMainEntrypoints(scope, cha, mainClass);
|
||||
AnalysisOptions options = CallGraphTestUtil.makeAnalysisOptions(scope, entrypoints);
|
||||
|
|
|
@ -17,9 +17,9 @@ import java.util.Properties;
|
|||
import com.ibm.wala.core.tests.callGraph.CallGraphTestUtil;
|
||||
import com.ibm.wala.core.tests.slicer.SlicerTest;
|
||||
import com.ibm.wala.eclipse.util.CancelException;
|
||||
import com.ibm.wala.ecore.java.scope.EJavaAnalysisScope;
|
||||
import com.ibm.wala.emf.wrappers.EMFScopeWrapper;
|
||||
import com.ibm.wala.emf.wrappers.JavaScopeUtil;
|
||||
import com.ibm.wala.ipa.callgraph.AnalysisScope;
|
||||
import com.ibm.wala.util.config.AnalysisScopeReader;
|
||||
|
||||
import com.ibm.wala.examples.properties.WalaExamplesProperties;
|
||||
import com.ibm.wala.ipa.callgraph.AnalysisCache;
|
||||
import com.ibm.wala.ipa.callgraph.AnalysisOptions;
|
||||
|
@ -156,8 +156,8 @@ public class GVSlice {
|
|||
DataDependenceOptions dOptions, ControlDependenceOptions cOptions) throws IllegalArgumentException, CancelException {
|
||||
try {
|
||||
// create an analysis scope representing the appJar as a J2SE application
|
||||
EJavaAnalysisScope escope = JavaScopeUtil.makeAnalysisScope(appJar, CallGraphTestUtil.REGRESSION_EXCLUSIONS);
|
||||
EMFScopeWrapper scope = EMFScopeWrapper.generateScope(escope);
|
||||
AnalysisScope scope = AnalysisScopeReader.makeJavaBinaryAnalysisScope(appJar, CallGraphTestUtil.REGRESSION_EXCLUSIONS);
|
||||
|
||||
|
||||
// build a class hierarchy, call graph, and system dependence graph
|
||||
ClassHierarchy cha = ClassHierarchy.make(scope);
|
||||
|
|
|
@ -16,9 +16,9 @@ import java.util.Properties;
|
|||
|
||||
import com.ibm.wala.classLoader.IClass;
|
||||
import com.ibm.wala.core.tests.callGraph.CallGraphTestUtil;
|
||||
import com.ibm.wala.ecore.java.scope.EJavaAnalysisScope;
|
||||
import com.ibm.wala.emf.wrappers.EMFScopeWrapper;
|
||||
import com.ibm.wala.emf.wrappers.JavaScopeUtil;
|
||||
import com.ibm.wala.ipa.callgraph.AnalysisScope;
|
||||
import com.ibm.wala.util.config.AnalysisScopeReader;
|
||||
|
||||
import com.ibm.wala.examples.properties.WalaExamplesProperties;
|
||||
import com.ibm.wala.ipa.cha.ClassHierarchy;
|
||||
import com.ibm.wala.properties.WalaProperties;
|
||||
|
@ -65,10 +65,10 @@ public class GVTypeHierarchy {
|
|||
try {
|
||||
SWTTypeHierarchy.validateCommandLine(args);
|
||||
String classpath = args[SWTTypeHierarchy.CLASSPATH_INDEX];
|
||||
EJavaAnalysisScope escope = JavaScopeUtil.makeAnalysisScope(classpath, CallGraphTestUtil.REGRESSION_EXCLUSIONS);
|
||||
AnalysisScope scope = AnalysisScopeReader.makeJavaBinaryAnalysisScope(classpath, CallGraphTestUtil.REGRESSION_EXCLUSIONS);
|
||||
|
||||
// generate a WALA-consumable wrapper around the incoming scope object
|
||||
EMFScopeWrapper scope = EMFScopeWrapper.generateScope(escope);
|
||||
|
||||
|
||||
// invoke WALA to build a class hierarchy
|
||||
ClassHierarchy cha = ClassHierarchy.make(scope);
|
||||
|
|
|
@ -15,9 +15,9 @@ import java.util.Properties;
|
|||
|
||||
import com.ibm.wala.classLoader.IMethod;
|
||||
import com.ibm.wala.core.tests.callGraph.CallGraphTestUtil;
|
||||
import com.ibm.wala.ecore.java.scope.EJavaAnalysisScope;
|
||||
import com.ibm.wala.emf.wrappers.EMFScopeWrapper;
|
||||
import com.ibm.wala.emf.wrappers.JavaScopeUtil;
|
||||
import com.ibm.wala.ipa.callgraph.AnalysisScope;
|
||||
import com.ibm.wala.util.config.AnalysisScopeReader;
|
||||
|
||||
import com.ibm.wala.examples.properties.WalaExamplesProperties;
|
||||
import com.ibm.wala.ipa.callgraph.AnalysisCache;
|
||||
import com.ibm.wala.ipa.callgraph.AnalysisOptions;
|
||||
|
@ -76,9 +76,9 @@ public class GVWalaIR {
|
|||
if (SWTCallGraph.isDirectory(appJar)) {
|
||||
appJar = SWTCallGraph.findJarFiles(new String[] { appJar });
|
||||
}
|
||||
EJavaAnalysisScope escope = JavaScopeUtil.makeAnalysisScope(appJar, CallGraphTestUtil.REGRESSION_EXCLUSIONS);
|
||||
AnalysisScope scope = AnalysisScopeReader.makeJavaBinaryAnalysisScope(appJar, CallGraphTestUtil.REGRESSION_EXCLUSIONS);
|
||||
|
||||
EMFScopeWrapper scope = EMFScopeWrapper.generateScope(escope);
|
||||
|
||||
|
||||
ClassHierarchy cha = ClassHierarchy.make(scope);
|
||||
|
||||
|
|
|
@ -18,9 +18,9 @@ import java.util.Properties;
|
|||
import org.eclipse.jface.window.ApplicationWindow;
|
||||
|
||||
import com.ibm.wala.core.tests.callGraph.CallGraphTestUtil;
|
||||
import com.ibm.wala.ecore.java.scope.EJavaAnalysisScope;
|
||||
import com.ibm.wala.emf.wrappers.EMFScopeWrapper;
|
||||
import com.ibm.wala.emf.wrappers.JavaScopeUtil;
|
||||
import com.ibm.wala.ipa.callgraph.AnalysisScope;
|
||||
import com.ibm.wala.util.config.AnalysisScopeReader;
|
||||
|
||||
import com.ibm.wala.examples.properties.WalaExamplesProperties;
|
||||
import com.ibm.wala.ipa.callgraph.AnalysisCache;
|
||||
import com.ibm.wala.ipa.callgraph.AnalysisOptions;
|
||||
|
@ -91,14 +91,16 @@ public class SWTCallGraph {
|
|||
if (isDirectory(appJar)) {
|
||||
appJar = SWTCallGraph.findJarFiles(new String[] { appJar });
|
||||
}
|
||||
EJavaAnalysisScope escope = JavaScopeUtil.makeAnalysisScope(appJar, CallGraphTestUtil.REGRESSION_EXCLUSIONS);
|
||||
|
||||
String exclusionFile = p.getProperty("exclusions");
|
||||
if (exclusionFile != null) {
|
||||
escope.setExclusionFileName(exclusionFile);
|
||||
}
|
||||
|
||||
EMFScopeWrapper scope = EMFScopeWrapper.generateScope(escope);
|
||||
AnalysisScope scope =
|
||||
AnalysisScopeReader.makeJavaBinaryAnalysisScope(
|
||||
appJar,
|
||||
exclusionFile != null?
|
||||
exclusionFile:
|
||||
CallGraphTestUtil.REGRESSION_EXCLUSIONS);
|
||||
|
||||
ClassHierarchy cha = ClassHierarchy.make(scope);
|
||||
|
||||
Iterable<Entrypoint> entrypoints = com.ibm.wala.ipa.callgraph.impl.Util.makeMainEntrypoints(scope, cha);
|
||||
|
@ -188,4 +190,4 @@ public class SWTCallGraph {
|
|||
}
|
||||
return result.toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,9 +17,9 @@ import org.eclipse.jface.window.ApplicationWindow;
|
|||
import com.ibm.wala.analysis.pointers.BasicHeapGraph;
|
||||
import com.ibm.wala.core.tests.callGraph.CallGraphTestUtil;
|
||||
import com.ibm.wala.eclipse.util.CancelException;
|
||||
import com.ibm.wala.ecore.java.scope.EJavaAnalysisScope;
|
||||
import com.ibm.wala.emf.wrappers.EMFScopeWrapper;
|
||||
import com.ibm.wala.emf.wrappers.JavaScopeUtil;
|
||||
import com.ibm.wala.ipa.callgraph.AnalysisScope;
|
||||
import com.ibm.wala.util.config.AnalysisScopeReader;
|
||||
|
||||
import com.ibm.wala.ipa.callgraph.AnalysisCache;
|
||||
import com.ibm.wala.ipa.callgraph.AnalysisOptions;
|
||||
import com.ibm.wala.ipa.callgraph.CallGraph;
|
||||
|
@ -78,9 +78,9 @@ public class SWTPointsTo {
|
|||
}
|
||||
|
||||
public static Graph<Object> buildPointsTo(String appJar) throws WalaException, IllegalArgumentException, CancelException {
|
||||
EJavaAnalysisScope escope = JavaScopeUtil.makeAnalysisScope(appJar, CallGraphTestUtil.REGRESSION_EXCLUSIONS);
|
||||
AnalysisScope scope = AnalysisScopeReader.makeJavaBinaryAnalysisScope(appJar, CallGraphTestUtil.REGRESSION_EXCLUSIONS);
|
||||
|
||||
EMFScopeWrapper scope = EMFScopeWrapper.generateScope(escope);
|
||||
|
||||
ClassHierarchy cha = ClassHierarchy.make(scope);
|
||||
|
||||
Iterable<Entrypoint> entrypoints = com.ibm.wala.ipa.callgraph.impl.Util.makeMainEntrypoints(scope, cha);
|
||||
|
|
|
@ -17,9 +17,9 @@ import org.eclipse.jface.window.ApplicationWindow;
|
|||
|
||||
import com.ibm.wala.classLoader.IClass;
|
||||
import com.ibm.wala.core.tests.callGraph.CallGraphTestUtil;
|
||||
import com.ibm.wala.ecore.java.scope.EJavaAnalysisScope;
|
||||
import com.ibm.wala.emf.wrappers.EMFScopeWrapper;
|
||||
import com.ibm.wala.emf.wrappers.JavaScopeUtil;
|
||||
import com.ibm.wala.ipa.callgraph.AnalysisScope;
|
||||
import com.ibm.wala.util.config.AnalysisScopeReader;
|
||||
|
||||
import com.ibm.wala.ipa.cha.ClassHierarchy;
|
||||
import com.ibm.wala.ipa.cha.IClassHierarchy;
|
||||
import com.ibm.wala.types.ClassLoaderReference;
|
||||
|
@ -59,10 +59,10 @@ public class SWTTypeHierarchy {
|
|||
public static ApplicationWindow run(String classpath) {
|
||||
|
||||
try {
|
||||
EJavaAnalysisScope escope = JavaScopeUtil.makeAnalysisScope(classpath, CallGraphTestUtil.REGRESSION_EXCLUSIONS);
|
||||
AnalysisScope scope = AnalysisScopeReader.makeJavaBinaryAnalysisScope(classpath, CallGraphTestUtil.REGRESSION_EXCLUSIONS);
|
||||
|
||||
// generate a WALA-consumable wrapper around the incoming scope object
|
||||
EMFScopeWrapper scope = EMFScopeWrapper.generateScope(escope);
|
||||
|
||||
|
||||
// invoke WALA to build a class hierarchy
|
||||
ClassHierarchy cha = ClassHierarchy.make(scope);
|
||||
|
|
Loading…
Reference in New Issue