Skip to content

Commit

Permalink
initial checkin
Browse files Browse the repository at this point in the history
  • Loading branch information
StevenArzt committed Mar 19, 2013
1 parent 1701284 commit 8fc4302
Show file tree
Hide file tree
Showing 63 changed files with 13,702 additions and 3 deletions.
15 changes: 15 additions & 0 deletions .classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.7.0_07 (x64)"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="test"/>
<classpathentry kind="lib" path="guava-13.0.jar" sourcepath="C:/Users/sarzt/workspace/guava-libraries/guava/src">
<attributes>
<attribute name="javadoc_location" value="http://docs.guava-libraries.googlecode.com/git-history/release/javadoc/"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
<classpathentry combineaccessrules="false" kind="src" path="/soot"/>
<classpathentry kind="output" path="bin"/>
</classpath>
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
*.jar
*.war
*.ear
/bin
28 changes: 28 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>soot-ifds</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
</natures>
</projectDescription>
42 changes: 39 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,40 @@
incremental-ifds
================
incremental-ifds / REVISER
===========================

This repository contains REVISER as presented in our paper submitted to OOPSLA 2013. REVISER
is an extended version of the HEROS IDE solver which is able to incrementally update analysis
results.

If you have any questions or concerns, please feel free to use the issue tracker or contact us
at [email protected].

Running the Benchmarks
------------------------

The simplest way to run the JUnit test cases and benchmarks we conducted for out OOPSLA paper+
is to run the "runDynamicTest.sh" shell script. It creates one output log file and one error
log file for each test case.

The test cases carrying a "_Rerun" suffix first run the solver on the old version of the target
code, then replace the code with the modified version and finally run the solver again. This can
be seen as the base case.

The test cases ending with "_Propagate" first run the initial computation on the old version of
the target code, then replace the code with the modfified version before they incrementally
update the analysis results. These test cases run much faster than the "_Rerun" ones or than
computing the analysis results twice with the old unchanged version of the HEROS solver.

For running the PDFsam tests, please use the "runPdfsam.sh" script.

Note that our test cases are configured to run with a maximum heap size of 35 GB by default.
Depending on your machine configuration, you may have to change the scripts. We recommend giving
the test cases as much memory as possible for not obfuscating the performance results with
unnecessary garbage collector cycles.

Important Version Note
------------------------

Note that REVISER is built on top of Soot 2.5.0 and may not work with newer versions. We plan
to integrate REVISER into the official HEROS branch as soon as possible. Our scripts thus
include the Soot 2.5.0 JAR file which is also part of this repository.

Work repository for the incremental IFDS solver
28 changes: 28 additions & 0 deletions runDynamicTests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/sh

java -Xmx35g -cp bin:guava-13.0.jar:soot-2.5.0.jar:junit-4.10.jar soot.jimple.interproc.ifds.test.SingleJUnitTestRunner soot.jimple.interproc.ifds.test.IFDSTestReachingDefinitionsDynamic#simpleTestJU_Rerun > output_simpleTestJU_Rerun.log 2> error_simpleTestJU_Rerun.log
java -Xmx35g -cp bin:guava-13.0.jar:soot-2.5.0.jar:junit-4.10.jar soot.jimple.interproc.ifds.test.SingleJUnitTestRunner soot.jimple.interproc.ifds.test.IFDSTestReachingDefinitionsDynamic#simpleTestJU_Propagate > output_simpleTestJU_Propagate.log 2> error_simpleTestJU_Propagate.log

java -Xmx35g -cp bin:guava-13.0.jar:soot-2.5.0.jar:junit-4.10.jar soot.jimple.interproc.ifds.test.SingleJUnitTestRunner soot.jimple.interproc.ifds.test.IFDSTestReachingDefinitionsDynamic#addLocalJU_Rerun > output_addLocalJU_Rerun.log 2> error_addLocalJU_Rerun.log
java -Xmx35g -cp bin:guava-13.0.jar:soot-2.5.0.jar:junit-4.10.jar soot.jimple.interproc.ifds.test.SingleJUnitTestRunner soot.jimple.interproc.ifds.test.IFDSTestReachingDefinitionsDynamic#addLocalJU_Propagate > output_addLocalJU_Propagate.log 2> error_addLocalJU_Propagate.log

java -Xmx35g -cp bin:guava-13.0.jar:soot-2.5.0.jar:junit-4.10.jar soot.jimple.interproc.ifds.test.SingleJUnitTestRunner soot.jimple.interproc.ifds.test.IFDSTestReachingDefinitionsDynamic#redefineVarJU_Rerun > output_redefineVarJU_Rerun.log 2> error_redefineVarJU_Rerun.log
java -Xmx35g -cp bin:guava-13.0.jar:soot-2.5.0.jar:junit-4.10.jar soot.jimple.interproc.ifds.test.SingleJUnitTestRunner soot.jimple.interproc.ifds.test.IFDSTestReachingDefinitionsDynamic#redefineVarJU_Propagate > output_redefineVarJU_Propagate.log 2> error_redefineVarJU_Propagate.log

java -Xmx35g -cp bin:guava-13.0.jar:soot-2.5.0.jar:junit-4.10.jar soot.jimple.interproc.ifds.test.SingleJUnitTestRunner soot.jimple.interproc.ifds.test.IFDSTestReachingDefinitionsDynamic#removeStmtJU_Rerun > output_removeStmtJU_Rerun.log 2> error_removeStmtJU_Rerun.log
java -Xmx35g -cp bin:guava-13.0.jar:soot-2.5.0.jar:junit-4.10.jar soot.jimple.interproc.ifds.test.SingleJUnitTestRunner soot.jimple.interproc.ifds.test.IFDSTestReachingDefinitionsDynamic#removeStmtJU_Propagate > output_removeStmtJU_Propagate.log 2> error_removeStmtJU_Propagate.log

java -Xmx35g -cp bin:guava-13.0.jar:soot-2.5.0.jar:junit-4.10.jar soot.jimple.interproc.ifds.test.SingleJUnitTestRunner soot.jimple.interproc.ifds.test.IFDSTestReachingDefinitionsDynamic#removeAssignmentJU_Rerun > output_removeAssignmentJU_Rerun.log 2> error_removeAssignmentJU_Rerun.log
java -Xmx35g -cp bin:guava-13.0.jar:soot-2.5.0.jar:junit-4.10.jar soot.jimple.interproc.ifds.test.SingleJUnitTestRunner soot.jimple.interproc.ifds.test.IFDSTestReachingDefinitionsDynamic#removeAssignmentJU_Propagate > output_removeAssignmentJU_Propagate.log 2> error_removeAssignmentJU_Propagate.log

java -Xmx35g -cp bin:guava-13.0.jar:soot-2.5.0.jar:junit-4.10.jar soot.jimple.interproc.ifds.test.SingleJUnitTestRunner soot.jimple.interproc.ifds.test.IFDSTestReachingDefinitionsDynamic#addCallNoAssignmentJU_Rerun > output_addCallNoAssignmentJU_Rerun.log 2> error_addCallNoAssignmentJU_Rerun.log
java -Xmx35g -cp bin:guava-13.0.jar:soot-2.5.0.jar:junit-4.10.jar soot.jimple.interproc.ifds.test.SingleJUnitTestRunner soot.jimple.interproc.ifds.test.IFDSTestReachingDefinitionsDynamic#addCallNoAssignmentJU_Propagate > output_addCallNoAssignmentJU_Propagate.log 2> error_addCallNoAssignmentJU_Propagate.log

java -Xmx35g -cp bin:guava-13.0.jar:soot-2.5.0.jar:junit-4.10.jar soot.jimple.interproc.ifds.test.SingleJUnitTestRunner soot.jimple.interproc.ifds.test.IFDSTestReachingDefinitionsDynamic#addCallAssignmentJU_Rerun > output_addCallAssignmentJU_Rerun.log 2> error_addCallAssignmentJU_Rerun.log
java -Xmx35g -cp bin:guava-13.0.jar:soot-2.5.0.jar:junit-4.10.jar soot.jimple.interproc.ifds.test.SingleJUnitTestRunner soot.jimple.interproc.ifds.test.IFDSTestReachingDefinitionsDynamic#addCallAssignmentJU_Propagate > output_addCallAssignmentJU_Propagate.log 2> error_addCallAssignmentJU_Propagate.log

java -Xmx35g -cp bin:guava-13.0.jar:soot-2.5.0.jar:junit-4.10.jar soot.jimple.interproc.ifds.test.SingleJUnitTestRunner soot.jimple.interproc.ifds.test.IFDSTestReachingDefinitionsDynamic#removeStmtFromLoopJU_Rerun > output_removeStmtFromLoopJU_Rerun.log 2> error_removeStmtFromLoopJU_Rerun.log
java -Xmx35g -cp bin:guava-13.0.jar:soot-2.5.0.jar:junit-4.10.jar soot.jimple.interproc.ifds.test.SingleJUnitTestRunner soot.jimple.interproc.ifds.test.IFDSTestReachingDefinitionsDynamic#removeStmtFromLoopJU_Propagate > output_removeStmtFromLoopJU_Propagate.log 2> error_removeStmtFromLoopJU_Propagate.log

java -Xmx35g -cp bin:guava-13.0.jar:soot-2.5.0.jar:junit-4.10.jar soot.jimple.interproc.ifds.test.SingleJUnitTestRunner soot.jimple.interproc.ifds.test.IFDSTestReachingDefinitionsDynamic#redefineReturnJU_Rerun > output_redefineReturnJU_Rerun.log 2> error_redefineReturnJU_Rerun.log
java -Xmx35g -cp bin:guava-13.0.jar:soot-2.5.0.jar:junit-4.10.jar soot.jimple.interproc.ifds.test.SingleJUnitTestRunner soot.jimple.interproc.ifds.test.IFDSTestReachingDefinitionsDynamic#redefineReturnJU_Propagate > output_redefineReturnJU_Propagate.log 2> error_redefineReturnJU_Propagate.log
3 changes: 3 additions & 0 deletions runPdfsam.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

java -ea -Xmx35g -cp bin:guava-13.0.jar:soot-2.5.0.jar:junit-4.10.jar soot.jimple.interproc.ifds.test.SingleJUnitTestRunner soot.jimple.interproc.ifds.test.IFDSTestPDFsam#newVersionSH_Propagate > output_newVersionSH_Propagate.log 2> error_newVersionSH_Propagate.log
10 changes: 10 additions & 0 deletions src/soot/jimple/interproc/ifds/DontSynchronize.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package soot.jimple.interproc.ifds;

import static java.lang.annotation.ElementType.FIELD;

import java.lang.annotation.Target;

/** Semantic annotation stating that the annotated field can remain unsynchronized.
* This annotation is meant as a structured comment only, and has no immediate effect. */
@Target(FIELD)
public @interface DontSynchronize{ String value() default ""; }
51 changes: 51 additions & 0 deletions src/soot/jimple/interproc/ifds/EdgeFunction.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
package soot.jimple.interproc.ifds;


/**
* An edge function computes how a V-type value changes when flowing from one
* super-graph node to another. See Sagiv, Reps, Horwitz 1996.
*
* <b>NOTE:</b> Methods defined on this type may be called simultaneously by different threads.
* Hence, classes implementing this interface should synchronize accesses to
* any mutable shared state.
*
* @param <V> The type of values to be computed along flow edges.
*/
public interface EdgeFunction<V> {

/**
* Computes the value resulting from applying this function to source.
*/
V computeTarget(V source);

/**
* Composes this function with the secondFunction, effectively returning
* a summary function that maps sources to targets exactly as if
* first this function had been applied and then the secondFunction.
*/
EdgeFunction<V> composeWith(EdgeFunction<V> secondFunction);

/**
* Inverts this edge function. The semantics is: e1.composeWith
* (e2).composeWith(e2.invert()).equals(e1)==true. Implementors
* must provide functions "composeWith" and "invert" that adhere
* to this invariant.
* @return The inverse of this edge function
*/
EdgeFunction<V> invert();

/**
* Returns a function that represents that (element-wise) join
* of this function with otherFunction. Naturally, this is a
* symmetric operation.
* @see JoinLattice#join(Object, Object)
*/
EdgeFunction<V> joinWith(EdgeFunction<V> otherFunction);

/**
* Returns true is this function represents exactly the same
* source to target mapping as other.
*/
public boolean equalTo(EdgeFunction<V> other);

}
Loading

0 comments on commit 8fc4302

Please sign in to comment.