Skip to content

Commit 1b9455b

Browse files
committed
Merge branch 'develop'
2 parents 0873a65 + acb48b6 commit 1b9455b

File tree

106 files changed

+3809
-717
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+3809
-717
lines changed

README.md

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
[![Build Status](http://soot-build.cs.uni-paderborn.de/jenkins/buildStatus/icon?job=soot/soot-master)](http://soot-build.cs.uni-paderborn.de/jenkins/job/soot/job/soot-master/)
1+
[![Build Status](http://soot-build.cs.uni-paderborn.de/jenkins/buildStatus/icon?job=soot/soot-develop)](http://soot-build.cs.uni-paderborn.de/jenkins/job/soot/job/soot-develop/)
2+
3+
# Using Soot? Let us know about it!
4+
We are regularly applying for funding to help us maintain Soot. You can help us immensely by letting us know about [**projects that use Soot**](https://github.com/Sable/soot/wiki/Users-of-Soot), both commercially or in the form of research tools.
25

36
# Soot supports Java 9 modules now!
47
Try and get involved in Soot's Java 9 bleeding edge developement. Check out the [Soot-j9](https://github.com/sable/soot/tree/java9) branch.
@@ -29,27 +32,18 @@ a dependency via Maven, Gradle, SBT, etc using the following coordinates:
2932
<dependency>
3033
<groupId>ca.mcgill.sable</groupId>
3134
<artifactId>soot</artifactId>
32-
<version>3.2.0</version>
35+
<version>3.3.0</version>
3336
</dependency>
3437
</dependencies>
3538
```
3639

37-
___Important___:
38-
If you are using a build tool other than Maven (Gradle, SBT, Ivy, etc.), you will also have to add the following repository to your build file:
39-
```.xml
40-
<repository>
41-
<id>swt-upb</id>
42-
<name>Maven repository of the Software Engineering Group at University of Paderborn</name>
43-
<url>https://soot-build.cs.uni-paderborn.de/nexus/repository/swt-upb/</url>
44-
</repository>
45-
```
4640

47-
You can also obtain older builds of the `develop` branch. A complete listing of builds can be found in [Sonatype's SNAPSHOT repository](https://oss.sonatype.org/content/repositories/snapshots/ca/mcgill/sable/soot).
41+
You can also obtain older builds of the `master` branch. A complete listing of builds can be found on [Maven Central](https://repo.maven.apache.org/maven2/ca/mcgill/sable/soot/).
4842

4943
# How do I obtain Soot without Maven?
5044

51-
All of our Soot release builds are stored in our [Nexus repository](https://soot-build.cs.uni-paderborn.de/nexus/#browse/browse/components:soot-release) and can be obtained from there.
52-
Furthermore, all releases of Soot can also be obtained [directly](https://soot-build.cs.uni-paderborn.de/public/origin/master/soot/soot-master/) in the `build` directory of the corresponding version directory. The "sootclasses-trunk-jar-with-dependencies.jar" file is an all-in-one file that also contains all the required libraries. The "sootclasses-trunk.jar" file contains only Soot, allowing you to manually pick dependencies as you need them. If you do not want to bother with dependencies, we recommend using the former.
45+
All of our Soot builds for the `master` branch are also stored up to one month in our [Nexus repository](https://soot-build.cs.uni-paderborn.de/nexus/#browse/browse:soot-release) and can be obtained from there.
46+
The latest realease build of Soot can also be obtained [directly](https://soot-build.cs.uni-paderborn.de/public/origin/master/soot/soot-master/). The "sootclasses-trunk-jar-with-dependencies.jar" file is an all-in-one file that also contains all the required libraries. The "sootclasses-trunk.jar" file contains only Soot, allowing you to manually pick dependencies as you need them. If you do not want to bother with dependencies, we recommend using the former.
5347

5448
# Building Soot yourself
5549

@@ -66,10 +60,6 @@ mailing list at: http://www.sable.mcgill.ca/mailman/listinfo/soot-list/
6660

6761
We are happy to accept arbitrary improvements to Soot in form of GitHub pull requests. Please read our [contribution guidelines](https://github.com/Sable/soot/wiki/Contributing-to-Soot) before setting up a pull request.
6862

69-
# What extensions exist to Soot?
70-
71-
We maintain a [list of extensions that can be used in combination with Soot](https://github.com/Sable/soot/wiki/Extensions-to-Soot). Feel free to add your own!
72-
7363
# Please help us improve Soot!
7464
You are using Soot and would like to help us support it in the future? Then please support us by filling out [this little web form](https://goo.gl/forms/rk1oSxFIxAH0xaf52).
7565

doc/soot_options.htm

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -696,6 +696,8 @@ <H2><A name="section_3">Output Options</A></H2>
696696
</tt><tt>7&nbsp;
697697
</tt><br><tt>1.8&nbsp;
698698
</tt><tt>8&nbsp;
699+
</tt><br><tt>1.9&nbsp;
700+
</tt><tt>9&nbsp;
699701
</tt><br></td>
700702
<td colspan="1">Force Java version of bytecode generated by Soot.</td>
701703
</tr>
@@ -1078,7 +1080,7 @@ <h2><a name="phase_1">Jimple Body Creation (jb)
10781080
</a></h2>
10791081
<p>
10801082
Jimple Body Creation creates a JimpleBody for each input
1081-
method, using either coffi, to read .class files, or the
1083+
method, using either asm, to read .class files, or the
10821084
jimple parser, to read .jimple files.
10831085

10841086
</p>
@@ -1130,15 +1132,36 @@ <h4>Accepted phase options:</h4>
11301132
<p>
11311133
Make sure that local names are stable between runs. This requires re-normalizing all
11321134
local names after the standard transformations, sorting them, and padding all local
1133-
names
1135+
names
11341136
with leading zeros up to the maximum number of digits in the local with the highest
1135-
integer
1137+
integer
11361138
value. This can negatively impact performance. This option automatically sets "sort-locals"
1137-
11381139
in "jb.lns" during the second re-normalization pass.
11391140

11401141
</p>
11411142
</li>
1143+
<li><b>Model LambdaMetafactory</b>
1144+
(model-lambdametafactory)
1145+
<br>
1146+
(default value:
1147+
<span class="value">true</span>
1148+
)
1149+
1150+
<p>
1151+
When the asm bytecode frontend is used and this option is set to true, Soot creates
1152+
an
1153+
implementation of the LambdaMetafactory for each dynamic invoke and
1154+
replaces the original dynamic invoke by a static invocation of the factory's bootstrap
1155+
method.
1156+
This allows the call-graph generation to find the lambda body reachable, i.e., call-graphs
1157+
contain paths from the invocation of a functional interface to the lambda body implementing
1158+
this
1159+
interface. Note that this procedure is not reversed when writing-out. Therefore, written-out
1160+
code will contain the created LambdaMetafactories and instrumented calls to the corresponding
1161+
bootstrap methods.
1162+
1163+
</p>
1164+
</li>
11421165
</ul>
11431166
<h2><a name="phase_1_1">Duplicate CatchAll Trap Remover (jb.dtr)
11441167
</a></h2>
@@ -1424,7 +1447,7 @@ <h4>Accepted phase options:</h4>
14241447
instruction's list of definition statements. This position is then used
14251448
to sort the locals with the same type in an ascending order. The local
14261449
names are then appended with leading zeros so that all local names have
1427-
the same length (i.e., the same number of digits) as the largest local
1450+
the same length (i.e., the same number of digits) as the largest local
14281451
name in each individual method body.
14291452

14301453
</p>
@@ -2415,7 +2438,7 @@ <h4>Accepted phase options:</h4>
24152438

24162439
<p>Normally, if a method is invoked on a class that is abstract and said class does
24172440
not have any children in the Scene, the method invoke will not be resolved to any
2418-
concrete
2441+
concrete
24192442
methods even if the abstract class or its parent classes contain a concrete declaration
24202443
of
24212444
the method. This is because without any non-abstract children it is impossible to

eclipse/ca.mcgill.sable.soot/src/ca/mcgill/sable/soot/ui/PhaseOptionsDialog.java

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,10 +230,12 @@ private void initializeEnableGroups() {
230230
addToEnableGroup("jb", getjbuse_original_names_widget(), "use-original-names");
231231
addToEnableGroup("jb", getjbpreserve_source_annotations_widget(), "preserve-source-annotations");
232232
addToEnableGroup("jb", getjbstabilize_local_names_widget(), "stabilize-local-names");
233+
addToEnableGroup("jb", getjbmodel_lambdametafactory_widget(), "model-lambdametafactory");
233234
getjbenabled_widget().getButton().addSelectionListener(this);
234235
getjbuse_original_names_widget().getButton().addSelectionListener(this);
235236
getjbpreserve_source_annotations_widget().getButton().addSelectionListener(this);
236237
getjbstabilize_local_names_widget().getButton().addSelectionListener(this);
238+
getjbmodel_lambdametafactory_widget().getButton().addSelectionListener(this);
237239

238240
makeNewEnableGroup("jb", "jb.dtr");
239241
addToEnableGroup("jb", "jb.dtr", getjbjb_dtrenabled_widget(), "enabled");
@@ -1381,6 +1383,12 @@ private boolean createNewConfig() {
13811383
if (boolRes != defBoolRes) {
13821384
getConfig().put(getjbstabilize_local_names_widget().getAlias(), new Boolean(boolRes));
13831385
}
1386+
boolRes = getjbmodel_lambdametafactory_widget().getButton().getSelection();
1387+
defBoolRes = true;
1388+
1389+
if (boolRes != defBoolRes) {
1390+
getConfig().put(getjbmodel_lambdametafactory_widget().getAlias(), new Boolean(boolRes));
1391+
}
13841392
boolRes = getjbjb_dtrenabled_widget().getButton().getSelection();
13851393
defBoolRes = true;
13861394

@@ -5117,6 +5125,16 @@ public BooleanOptionWidget getjbstabilize_local_names_widget() {
51175125
return jbstabilize_local_names_widget;
51185126
}
51195127

5128+
private BooleanOptionWidget jbmodel_lambdametafactory_widget;
5129+
5130+
private void setjbmodel_lambdametafactory_widget(BooleanOptionWidget widget) {
5131+
jbmodel_lambdametafactory_widget = widget;
5132+
}
5133+
5134+
public BooleanOptionWidget getjbmodel_lambdametafactory_widget() {
5135+
return jbmodel_lambdametafactory_widget;
5136+
}
5137+
51205138
private BooleanOptionWidget jbjb_dtrenabled_widget;
51215139

51225140
private void setjbjb_dtrenabled_widget(BooleanOptionWidget widget) {
@@ -9043,6 +9061,10 @@ private Composite Output_OptionsCreate(Composite parent) {
90439061
"1.8 8",
90449062
"\nForce Java 1.8 as output version.",
90459063
false),
9064+
new OptionData("Java 1.9",
9065+
"1.9 9",
9066+
"\nForce Java 1.9 as output version. (Experimental)",
9067+
false),
90469068
};
90479069

90489070

@@ -9406,6 +9428,17 @@ private Composite jbCreate(Composite parent) {
94069428

94079429
setjbstabilize_local_names_widget(new BooleanOptionWidget(editGroupjb, SWT.NONE, new OptionData("Stabilize local names", "p phase-option", "jb","stabilize-local-names", "\nMake sure that local names are stable between runs. This \nrequires re-normalizing all local names after the standard \ntransformations, sorting them, and padding all local names with \nleading zeros up to the maximum number of digits in the local \nwith the highest integer value. This can negatively impact \nperformance. This option automatically sets "sort-locals" in \n"jb.lns" during the second re-normalization pass.", defaultBool)));
94089430

9431+
defKey = "p phase-option"+" "+"jb"+" "+"model-lambdametafactory";
9432+
defKey = defKey.trim();
9433+
9434+
if (isInDefList(defKey)) {
9435+
defaultBool = getBoolDef(defKey);
9436+
} else {
9437+
defaultBool = true;
9438+
}
9439+
9440+
setjbmodel_lambdametafactory_widget(new BooleanOptionWidget(editGroupjb, SWT.NONE, new OptionData("Model LambdaMetafactory", "p phase-option", "jb","model-lambdametafactory", "\nWhen the asm bytecode frontend is used and this option is set to \ntrue, Soot creates an implementation of the LambdaMetafactory \nfor each dynamic invoke and replaces the original dynamic invoke \nby a static invocation of the factory's bootstrap method. This \nallows the call-graph generation to find the lambda body \nreachable, i.e., call-graphs contain paths from the invocation \nof a functional interface to the lambda body implementing this \ninterface. Note that this procedure is not reversed when \nwriting-out. Therefore, written-out code will contain the \ncreated LambdaMetafactories and instrumented calls to the \ncorresponding bootstrap methods.", defaultBool)));
9441+
94099442

94109443
return editGroupjb;
94119444
}

pom.xml

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>ca.mcgill.sable</groupId>
55
<artifactId>soot</artifactId>
6-
<version>3.2.0</version>
6+
<version>3.3.0</version>
77
<name>Soot - a J*va Optimization Framework</name>
88
<description>A Java Optimization Framework</description>
99
<url>https://sable.github.io/soot/</url>
@@ -46,7 +46,7 @@
4646
<properties>
4747
<maven.compiler.source>1.8</maven.compiler.source>
4848
<maven.compiler.target>1.8</maven.compiler.target>
49-
<xml-maven-plugin.version>1.0.1</xml-maven-plugin.version>
49+
<xml-maven-plugin.version>1.0.2</xml-maven-plugin.version>
5050
<maven-resources-plugin.version>3.0.2</maven-resources-plugin.version>
5151
<build-helper-maven-plugin.version>3.0.0</build-helper-maven-plugin.version>
5252
<maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
@@ -422,7 +422,7 @@
422422
</dependency>
423423
<!-- Local dependencies -->
424424
<dependency>
425-
<groupId>pxb.android</groupId>
425+
<groupId>de.upb.cs.swt</groupId>
426426
<artifactId>axml</artifactId>
427427
<version>2.0.0</version>
428428
</dependency>
@@ -431,15 +431,11 @@
431431
<artifactId>polyglot</artifactId>
432432
<version>2006</version>
433433
</dependency>
434-
<!-- Published from the github repo -->
435-
<!-- Built by http://soot-build.cs.uni-paderborn.de/nexus/repository/soot-snapshot/ -->
436434
<dependency>
437-
<groupId>heros</groupId>
435+
<groupId>de.upb.cs.swt</groupId>
438436
<artifactId>heros</artifactId>
439437
<version>1.1.0</version>
440438
</dependency>
441-
<!-- Uploaded to http://soot-build.cs.uni-paderborn.de/nexus/repository/soot-snapshot/
442-
from the nightly build server -->
443439
<dependency>
444440
<groupId>ca.mcgill.sable</groupId>
445441
<artifactId>jasmin</artifactId>
@@ -461,7 +457,7 @@
461457
<dependency>
462458
<groupId>junit</groupId>
463459
<artifactId>junit</artifactId>
464-
<version>4.11</version>
460+
<version>4.12</version>
465461
<scope>test</scope>
466462
</dependency>
467463
<dependency>
@@ -473,13 +469,13 @@
473469
<dependency>
474470
<groupId>org.mockito</groupId>
475471
<artifactId>mockito-all</artifactId>
476-
<version>1.10.8</version>
472+
<version>1.10.19</version>
477473
<scope>test</scope>
478474
</dependency>
479475
<dependency>
480476
<groupId>org.powermock</groupId>
481477
<artifactId>powermock-mockito-release-full</artifactId>
482-
<version>1.6.1</version>
478+
<version>1.6.4</version>
483479
<type>pom</type>
484480
<scope>test</scope>
485481
</dependency>
@@ -491,13 +487,6 @@
491487
<scope>test</scope>
492488
</dependency>
493489
</dependencies>
494-
<repositories>
495-
<repository>
496-
<id>swt-upb</id>
497-
<name>Maven repository of the Software Engineering Group at University of Paderborn</name>
498-
<url>https://soot-build.cs.uni-paderborn.de/nexus/repository/swt-upb/</url>
499-
</repository>
500-
</repositories>
501490
<distributionManagement>
502491
<snapshotRepository>
503492
<id>ossrh</id>

src/main/generated/options/soot/AntTask.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
* Soot ant task.
3535
* @author Ondrej Lhotak
3636
*/
37-
@javax.annotation.Generated(value = "Saxonica v3.0", date = "2018-08-13T11:30:58.271+02:00", comments = "from soot_options.xml")
37+
@javax.annotation.Generated(value = "Saxonica v3.0", comments = "from soot_options.xml")
3838
public class AntTask extends MatchingTask {
3939
public static final boolean DEBUG = true;
4040
private void debug(String s) {
@@ -360,6 +360,8 @@ public void setjava_version(String arg) {
360360
|| arg.equals( "7" )
361361
|| arg.equals( "1.8" )
362362
|| arg.equals( "8" )
363+
|| arg.equals( "1.9" )
364+
|| arg.equals( "9" )
363365
) {
364366
addArg("-java-version");
365367
addArg(arg);
@@ -665,6 +667,12 @@ public void setstabilize_local_names(boolean arg) {
665667
addArg("stabilize-local-names:"+(arg?"true":"false"));
666668
}
667669

670+
public void setmodel_lambdametafactory(boolean arg) {
671+
addArg("-p");
672+
addArg("jb");
673+
addArg("model-lambdametafactory:"+(arg?"true":"false"));
674+
}
675+
668676
}
669677

670678
public Object createp_jb_dtr() {

src/main/generated/options/soot/options/ABCOptions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import java.util.*;
2828

2929
/** Option parser for Array Bound Checker. */
30-
@javax.annotation.Generated(value = "Saxonica v3.0", date = "2018-08-13T11:30:57.578+02:00", comments = "from soot_options.xml")
30+
@javax.annotation.Generated(value = "Saxonica v3.0", comments = "from soot_options.xml")
3131
public class ABCOptions {
3232

3333
private Map<String, String> options;

src/main/generated/options/soot/options/AETOptions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import java.util.*;
2828

2929
/** Option parser for Available Expressions Tagger. */
30-
@javax.annotation.Generated(value = "Saxonica v3.0", date = "2018-08-13T11:30:57.578+02:00", comments = "from soot_options.xml")
30+
@javax.annotation.Generated(value = "Saxonica v3.0", comments = "from soot_options.xml")
3131
public class AETOptions {
3232

3333
private Map<String, String> options;

src/main/generated/options/soot/options/BCMOptions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import java.util.*;
2828

2929
/** Option parser for Busy Code Motion. */
30-
@javax.annotation.Generated(value = "Saxonica v3.0", date = "2018-08-13T11:30:57.578+02:00", comments = "from soot_options.xml")
30+
@javax.annotation.Generated(value = "Saxonica v3.0", comments = "from soot_options.xml")
3131
public class BCMOptions {
3232

3333
private Map<String, String> options;

src/main/generated/options/soot/options/CGGOptions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import java.util.*;
2828

2929
/** Option parser for Call Graph Grapher. */
30-
@javax.annotation.Generated(value = "Saxonica v3.0", date = "2018-08-13T11:30:57.578+02:00", comments = "from soot_options.xml")
30+
@javax.annotation.Generated(value = "Saxonica v3.0", comments = "from soot_options.xml")
3131
public class CGGOptions {
3232

3333
private Map<String, String> options;

src/main/generated/options/soot/options/CGOptions.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import java.util.*;
2828

2929
/** Option parser for Call Graph Constructor. */
30-
@javax.annotation.Generated(value = "Saxonica v3.0", date = "2018-08-13T11:30:57.578+02:00", comments = "from soot_options.xml")
30+
@javax.annotation.Generated(value = "Saxonica v3.0", comments = "from soot_options.xml")
3131
public class CGOptions {
3232

3333
private Map<String, String> options;
@@ -163,7 +163,7 @@ public boolean types_for_invoke() {
163163
* Resolve Abstract Classes with No Children --
164164
* Causes methods invoked on abstract classes to be resolved even
165165
* if there are no non-abstract children of the classes in the
166-
* Scene.
166+
* Scene..
167167
*
168168
* Normally, if a method is invoked on a class that is abstract and
169169
* said class does not have any children in the Scene, the method

src/main/generated/options/soot/options/CHAOptions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import java.util.*;
2828

2929
/** Option parser for Class Hierarchy Analysis. */
30-
@javax.annotation.Generated(value = "Saxonica v3.0", date = "2018-08-13T11:30:57.578+02:00", comments = "from soot_options.xml")
30+
@javax.annotation.Generated(value = "Saxonica v3.0", comments = "from soot_options.xml")
3131
public class CHAOptions {
3232

3333
private Map<String, String> options;

src/main/generated/options/soot/options/CPOptions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import java.util.*;
2828

2929
/** Option parser for Copy Propagator. */
30-
@javax.annotation.Generated(value = "Saxonica v3.0", date = "2018-08-13T11:30:57.578+02:00", comments = "from soot_options.xml")
30+
@javax.annotation.Generated(value = "Saxonica v3.0", comments = "from soot_options.xml")
3131
public class CPOptions {
3232

3333
private Map<String, String> options;

src/main/generated/options/soot/options/FRWOptions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import java.util.*;
2828

2929
/** Option parser for Field Read/Write Tagger. */
30-
@javax.annotation.Generated(value = "Saxonica v3.0", date = "2018-08-13T11:30:57.578+02:00", comments = "from soot_options.xml")
30+
@javax.annotation.Generated(value = "Saxonica v3.0", comments = "from soot_options.xml")
3131
public class FRWOptions {
3232

3333
private Map<String, String> options;

0 commit comments

Comments
 (0)