fix compilation problems, remove dependency on wala test project, transform eclipse project dependencies into plugin dependencies

This commit is contained in:
Martin Mohr 2014-04-09 02:43:32 +02:00 committed by Juergen Graf
parent d77cfc60fc
commit 77275aad73
4 changed files with 16 additions and 162 deletions

View File

@ -2,23 +2,16 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry combineaccessrules="false" kind="src" path="/com.ibm.wala.cast"/>
<classpathentry combineaccessrules="false" kind="src" path="/com.ibm.wala.cast.java"/>
<classpathentry combineaccessrules="false" kind="src" path="/com.ibm.wala.core"/>
<classpathentry combineaccessrules="false" kind="src" path="/com.ibm.wala.ide"/>
<classpathentry combineaccessrules="false" kind="src" path="/com.ibm.wala.shrike"/>
<classpathentry combineaccessrules="false" kind="src" path="/com.ibm.wala.util"/>
<classpathentry combineaccessrules="false" kind="src" path="/com.ibm.wala.core.tests"/>
<classpathentry kind="lib" path="/afs/info.uni-karlsruhe.de/user/mmohr/git/joana/contrib/wala/com.ibm.wala.dalvik/lib/commons-cli-1.2.jar"/>
<classpathentry kind="lib" path="/afs/info.uni-karlsruhe.de/user/mmohr/git/joana/contrib/wala/com.ibm.wala.dalvik/lib/commons-io-2.4.jar"/>
<classpathentry kind="lib" path="/afs/info.uni-karlsruhe.de/user/mmohr/git/joana/contrib/wala/com.ibm.wala.dalvik/lib/commons-lang3-3.1.jar"/>
<classpathentry kind="lib" path="/afs/info.uni-karlsruhe.de/user/mmohr/git/joana/contrib/wala/com.ibm.wala.dalvik/lib/dexlib-1.3.4-dev.jar"/>
<classpathentry kind="lib" path="/afs/info.uni-karlsruhe.de/user/mmohr/git/joana/contrib/wala/com.ibm.wala.dalvik/lib/guava-13.0.1.jar"/>
<classpathentry kind="lib" path="/afs/info.uni-karlsruhe.de/user/mmohr/git/joana/contrib/wala/com.ibm.wala.dalvik/lib/jgrapht-0.8.3.jar"/>
<classpathentry kind="lib" path="/afs/info.uni-karlsruhe.de/user/mmohr/git/joana/contrib/wala/com.ibm.wala.dalvik/lib/junit-4.11.jar"/>
<classpathentry kind="lib" path="/afs/info.uni-karlsruhe.de/user/mmohr/git/joana/contrib/wala/com.ibm.wala.dalvik/lib/logback-classic-1.0.9.jar"/>
<classpathentry kind="lib" path="/afs/info.uni-karlsruhe.de/user/mmohr/git/joana/contrib/wala/com.ibm.wala.dalvik/lib/logback-core-1.0.9.jar"/>
<classpathentry kind="lib" path="/afs/info.uni-karlsruhe.de/user/mmohr/git/joana/contrib/wala/com.ibm.wala.dalvik/lib/slf4j-api-1.7.2.jar"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="lib" path="lib/commons-cli-1.2.jar"/>
<classpathentry kind="lib" path="lib/commons-io-2.4.jar"/>
<classpathentry kind="lib" path="lib/commons-lang3-3.1.jar"/>
<classpathentry kind="lib" path="lib/dexlib-1.3.4-dev.jar"/>
<classpathentry kind="lib" path="lib/guava-13.0.1.jar"/>
<classpathentry kind="lib" path="lib/jgrapht-0.8.3.jar"/>
<classpathentry kind="lib" path="lib/junit-4.11.jar"/>
<classpathentry kind="lib" path="lib/logback-classic-1.0.9.jar"/>
<classpathentry kind="lib" path="lib/logback-core-1.0.9.jar"/>
<classpathentry kind="lib" path="lib/slf4j-api-1.7.2.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View File

@ -31,3 +31,9 @@ Export-Package: com.ibm.wala.dalvik.classLoader,
org.scandroid.spec,
org.scandroid.synthmethod,
org.scandroid.util
Require-Bundle: com.ibm.wala.cast;bundle-version="1.0.0",
com.ibm.wala.cast.java;bundle-version="1.0.0",
com.ibm.wala.core;bundle-version="1.1.3",
com.ibm.wala.ide;bundle-version="1.1.3",
com.ibm.wala.shrike;bundle-version="1.3.1",
com.ibm.wala.util;bundle-version="2.0.0"

View File

@ -284,15 +284,6 @@ public class CGAnalysisContext<E extends ISSABasicBlock> {
}
});
if (options.pdfCG())
GraphUtil.makeCG(this);
if (options.pdfPartialCG())
GraphUtil.makePCG(this);
if (options.pdfOneLevelCG())
GraphUtil.makeOneLCG(this);
if (options.systemToApkCG())
GraphUtil.makeSystemToAPKCG(this);
if (options.stdoutCG()) {
for (Iterator<CGNode> nodeI = cg.iterator(); nodeI.hasNext();) {
CGNode node = nodeI.next();

View File

@ -1,136 +0,0 @@
/*
*
* Copyright (c) 2009-2012,
*
* Steve Suh <suhsteve@gmail.com>
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. The names of the contributors may not be used to endorse or promote
* products derived from this software without specific prior written
* permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*
*/
package org.scandroid.util;
import java.io.File;
import java.util.Properties;
import org.scandroid.domain.DomainElement;
import com.ibm.wala.dataflow.IFDS.TabulationResult;
import com.ibm.wala.examples.drivers.PDFTypeHierarchy;
import com.ibm.wala.examples.properties.WalaExamplesProperties;
import com.ibm.wala.ide.ui.IFDSExplorer;
import com.ibm.wala.ipa.callgraph.CGNode;
import com.ibm.wala.ipa.cfg.BasicBlockInContext;
import com.ibm.wala.properties.WalaProperties;
import com.ibm.wala.ssa.ISSABasicBlock;
import com.ibm.wala.util.WalaException;
import com.ibm.wala.util.debug.Assertions;
import com.ibm.wala.util.graph.Graph;
public class GraphUtil {
private static String folderPath = "callgraphs";
@SuppressWarnings({ "unchecked", "rawtypes" })
public static <E extends ISSABasicBlock> void makeCG(
CGAnalysisContext<E> analysisContext) {
make(analysisContext.getOptions().getFilename(), (Graph) analysisContext.cg,
"FullCallGraph");
}
@SuppressWarnings({ "unchecked", "rawtypes" })
public static <E extends ISSABasicBlock> void makePCG(
CGAnalysisContext<E> analysisContext) {
make(analysisContext.getOptions().getFilename(),
(Graph) analysisContext.partialGraph, "PartialCallGraph");
}
@SuppressWarnings({ "unchecked", "rawtypes" })
public static <E extends ISSABasicBlock> void makeOneLCG(
CGAnalysisContext<E> analysisContext) {
make(analysisContext.getOptions().getFilename(),
(Graph) analysisContext.oneLevelGraph, "OneLevelCallGraph");
}
@SuppressWarnings({ "unchecked", "rawtypes" })
public static <E extends ISSABasicBlock> void makeSystemToAPKCG(
CGAnalysisContext<E> analysisContext) {
make(analysisContext.getOptions().getFilename(),
(Graph) analysisContext.systemToApkGraph, "SystemToApkGraph");
}
public static <E extends ISSABasicBlock> void exploreIFDS(
TabulationResult<BasicBlockInContext<E>, CGNode, DomainElement> flowResult) {
Properties p = null;
try {
p = WalaProperties.loadProperties();
} catch (WalaException e) {
e.printStackTrace();
Assertions.UNREACHABLE();
}
IFDSExplorer.setDotExe(p.getProperty(WalaExamplesProperties.DOT_EXE));
IFDSExplorer
.setGvExe(p.getProperty(WalaExamplesProperties.PDFVIEW_EXE));
try {
IFDSExplorer.viewIFDS(flowResult);
} catch (Exception e) {
e.printStackTrace();
}
}
private static void make(String filename, Graph<Object> cg, String suffix) {
Properties p = null;
try {
p = WalaProperties.loadProperties();
} catch (WalaException e) {
e.printStackTrace();
Assertions.UNREACHABLE();
}
File theDir = new File(folderPath);
if (!theDir.exists())
theDir.mkdir();
String pdfFile, dotFile, dotExe;
pdfFile = folderPath + File.separatorChar + filename + "." + suffix
+ ".pdf";
dotFile = folderPath + File.separatorChar + filename
+ PDFTypeHierarchy.DOT_FILE;
dotExe = p.getProperty(WalaExamplesProperties.DOT_EXE);
try {
DexDotUtil.dotify(cg, null, dotFile, pdfFile, dotExe);
} catch (WalaException e) {
e.printStackTrace();
Assertions.UNREACHABLE();
}
}
}