Skip to content

Commit 8208bd2

Browse files
authored
Merge pull request #6 from CodeShield-Security/develop
Adding Data-Flow Path & Refactoring Statement to ControlFlowEdge
2 parents 38c13cc + 462d72b commit 8208bd2

File tree

123 files changed

+1636
-2214
lines changed

Some content is hidden

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

123 files changed

+1636
-2214
lines changed

SynchronizedPDS/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<parent>
33
<groupId>de.fraunhofer.iem</groupId>
44
<artifactId>SPDS</artifactId>
5-
<version>3.0.10-SNAPSHOT</version>
5+
<version>3.1.1-SNAPSHOT</version>
66
<relativePath>../pom.xml</relativePath>
77
</parent>
88
<modelVersion>4.0.0</modelVersion>

SynchronizedPDS/src/main/java/sync/pds/solver/nodes/INode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@
1414
import wpds.interfaces.State;
1515

1616
public interface INode<Fact> extends State {
17-
public Fact fact();
17+
Fact fact();
1818
}

SynchronizedPDS/src/main/java/sync/pds/solver/nodes/NodeWithLocation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public class NodeWithLocation<Stmt, Fact, Location> implements INode<Node<Stmt,
1717
private Node<Stmt, Fact> fact;
1818

1919
public NodeWithLocation(Stmt stmt, Fact variable, Location loc) {
20-
this.fact = new Node<Stmt, Fact>(stmt, variable);
20+
this.fact = new Node<>(stmt, variable);
2121
this.loc = loc;
2222
}
2323

WPDS/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<parent>
33
<groupId>de.fraunhofer.iem</groupId>
44
<artifactId>SPDS</artifactId>
5-
<version>3.0.10-SNAPSHOT</version>
5+
<version>3.1.1-SNAPSHOT</version>
66
<relativePath>../pom.xml</relativePath>
77
</parent>
88
<modelVersion>4.0.0</modelVersion>

boomerangPDS/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<parent>
33
<groupId>de.fraunhofer.iem</groupId>
44
<artifactId>SPDS</artifactId>
5-
<version>3.0.10-SNAPSHOT</version>
5+
<version>3.1.1-SNAPSHOT</version>
66
<relativePath>../pom.xml</relativePath>
77
</parent>
88
<modelVersion>4.0.0</modelVersion>

boomerangPDS/src/main/java/boomerang/BackwardQuery.java

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,21 @@
1111
*/
1212
package boomerang;
1313

14-
import boomerang.scene.CallSiteStatement;
15-
import boomerang.scene.Statement;
14+
import boomerang.scene.ControlFlowGraph;
15+
import boomerang.scene.ControlFlowGraph.Edge;
1616
import boomerang.scene.Val;
1717

1818
public class BackwardQuery extends Query {
19-
protected BackwardQuery(Statement stmt, Val variable) {
20-
super(stmt, variable);
19+
protected BackwardQuery(ControlFlowGraph.Edge edge, Val variable) {
20+
super(edge, variable);
2121
}
2222

2323
@Override
2424
public String toString() {
2525
return "BackwardQuery: " + super.toString();
2626
}
2727

28-
public static BackwardQuery make(Statement stmt, Val variable) {
29-
return new BackwardQuery(
30-
(stmt instanceof CallSiteStatement)
31-
? ((CallSiteStatement) stmt).getReturnSiteStatement()
32-
: stmt,
33-
variable);
28+
public static BackwardQuery make(Edge edge, Val variable) {
29+
return new BackwardQuery(edge, variable);
3430
}
3531
}

boomerangPDS/src/main/java/boomerang/Boomerang.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@
1212
package boomerang;
1313

1414
import boomerang.scene.CallGraph;
15+
import boomerang.scene.ControlFlowGraph.Edge;
1516
import boomerang.scene.DataFlowScope;
1617
import boomerang.scene.Field;
17-
import boomerang.scene.Statement;
1818
import boomerang.scene.Val;
1919
import sync.pds.solver.OneWeightFunctions;
2020
import sync.pds.solver.WeightFunctions;
2121
import wpds.impl.Weight;
2222

2323
public class Boomerang extends WeightedBoomerang<Weight.NoWeight> {
2424

25-
private OneWeightFunctions<Statement, Val, Field, Weight.NoWeight> fieldWeights;
26-
private OneWeightFunctions<Statement, Val, Statement, Weight.NoWeight> callWeights;
25+
private OneWeightFunctions<Edge, Val, Field, Weight.NoWeight> fieldWeights;
26+
private OneWeightFunctions<Edge, Val, Edge, Weight.NoWeight> callWeights;
2727

2828
public Boomerang(CallGraph callGraph, DataFlowScope scope) {
2929
super(callGraph, scope);
@@ -34,34 +34,34 @@ public Boomerang(CallGraph callGraph, DataFlowScope scope, BoomerangOptions opt)
3434
}
3535

3636
@Override
37-
protected WeightFunctions<Statement, Val, Field, Weight.NoWeight> getForwardFieldWeights() {
37+
protected WeightFunctions<Edge, Val, Field, Weight.NoWeight> getForwardFieldWeights() {
3838
return getOrCreateFieldWeights();
3939
}
4040

4141
@Override
42-
protected WeightFunctions<Statement, Val, Field, Weight.NoWeight> getBackwardFieldWeights() {
42+
protected WeightFunctions<Edge, Val, Field, Weight.NoWeight> getBackwardFieldWeights() {
4343
return getOrCreateFieldWeights();
4444
}
4545

4646
@Override
47-
protected WeightFunctions<Statement, Val, Statement, Weight.NoWeight> getBackwardCallWeights() {
47+
protected WeightFunctions<Edge, Val, Edge, Weight.NoWeight> getBackwardCallWeights() {
4848
return getOrCreateCallWeights();
4949
}
5050

5151
@Override
52-
protected WeightFunctions<Statement, Val, Statement, Weight.NoWeight> getForwardCallWeights(
52+
protected WeightFunctions<Edge, Val, Edge, Weight.NoWeight> getForwardCallWeights(
5353
ForwardQuery sourceQuery) {
5454
return getOrCreateCallWeights();
5555
}
5656

57-
private WeightFunctions<Statement, Val, Field, Weight.NoWeight> getOrCreateFieldWeights() {
57+
private WeightFunctions<Edge, Val, Field, Weight.NoWeight> getOrCreateFieldWeights() {
5858
if (fieldWeights == null) {
5959
fieldWeights = new OneWeightFunctions<>(Weight.NO_WEIGHT_ONE);
6060
}
6161
return fieldWeights;
6262
}
6363

64-
private WeightFunctions<Statement, Val, Statement, Weight.NoWeight> getOrCreateCallWeights() {
64+
private WeightFunctions<Edge, Val, Edge, Weight.NoWeight> getOrCreateCallWeights() {
6565
if (callWeights == null) {
6666
callWeights = new OneWeightFunctions<>(Weight.NO_WEIGHT_ONE);
6767
}

boomerangPDS/src/main/java/boomerang/ForwardQuery.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111
*/
1212
package boomerang;
1313

14-
import boomerang.scene.Statement;
14+
import boomerang.scene.ControlFlowGraph;
1515
import boomerang.scene.Val;
1616

1717
public class ForwardQuery extends Query {
1818

19-
public ForwardQuery(Statement stmt, Val variable) {
20-
super(stmt, variable);
19+
public ForwardQuery(ControlFlowGraph.Edge edge, Val variable) {
20+
super(edge, variable);
2121
}
2222

2323
@Override

boomerangPDS/src/main/java/boomerang/ForwardQueryArray.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111
*/
1212
package boomerang;
1313

14-
import boomerang.scene.Statement;
14+
import boomerang.scene.ControlFlowGraph.Edge;
1515
import boomerang.scene.Val;
1616
import com.google.common.base.Objects;
1717

1818
public class ForwardQueryArray extends ForwardQuery {
1919

2020
private final Integer index;
2121

22-
public ForwardQueryArray(Statement stmt, Val variable, Integer index) {
22+
public ForwardQueryArray(Edge stmt, Val variable, Integer index) {
2323
super(stmt, variable);
2424
this.index = index;
2525
}

boomerangPDS/src/main/java/boomerang/ForwardQueryMultiDimensionalArray.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*/
1212
package boomerang;
1313

14-
import boomerang.scene.Statement;
14+
import boomerang.scene.ControlFlowGraph.Edge;
1515
import boomerang.scene.Val;
1616
import com.google.common.base.Objects;
1717

@@ -20,7 +20,7 @@ public class ForwardQueryMultiDimensionalArray extends ForwardQueryArray {
2020
private final Integer index2;
2121

2222
public ForwardQueryMultiDimensionalArray(
23-
Statement stmt, Val variable, Integer index1, Integer index2) {
23+
Edge stmt, Val variable, Integer index1, Integer index2) {
2424
super(stmt, variable, index1);
2525
this.index2 = index2;
2626
}

0 commit comments

Comments
 (0)