forked from kadirayk/SparseIDEClient
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
36 changed files
with
528 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
src/main/java/analysis/edgefunctions/IntegerAllBottom.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package analysis.edgefunctions; | ||
|
||
import heros.EdgeFunction; | ||
import heros.edgefunc.AllBottom; | ||
|
||
public class IntegerAllBottom extends AllBottom<Integer> { | ||
|
||
public IntegerAllBottom(Integer bottomElement) { | ||
super(bottomElement); | ||
} | ||
|
||
@Override | ||
public EdgeFunction<Integer> meetWith(EdgeFunction<Integer> otherFunction) { | ||
return this; // this should override everything | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 4 additions & 2 deletions
6
...va/target/constant/SimpleAssignment4.java → ...test/java/target/constant/Assignment.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
package target.constant; | ||
|
||
public class SimpleAssignment4 { | ||
public class Assignment { | ||
|
||
/** | ||
* Simple assignment | ||
*/ | ||
public void entryPoint() { | ||
int a = 100; | ||
int b = 200; | ||
int c = a * 4 + 13; | ||
} | ||
|
||
} |
5 changes: 4 additions & 1 deletion
5
...va/target/constant/SimpleAssignment2.java → ...est/java/target/constant/Assignment2.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
...va/target/constant/SimpleAssignment3.java → ...est/java/target/constant/Assignment3.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package target.constant; | ||
|
||
public class Assignment4 { | ||
|
||
/** | ||
* Assignment with linear value multi const | ||
*/ | ||
public void entryPoint() { | ||
int a = 100; | ||
int b = 200; | ||
int c = a * 4 + 13; | ||
} | ||
|
||
} |
5 changes: 4 additions & 1 deletion
5
...va/target/constant/SimpleAssignment5.java → ...est/java/target/constant/Assignment5.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
...va/target/constant/SimpleAssignment6.java → ...est/java/target/constant/Assignment6.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
...va/target/constant/SimpleAssignment7.java → ...est/java/target/constant/Assignment7.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
...va/target/constant/SimpleAssignment8.java → ...est/java/target/constant/Assignment8.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package target.constant; | ||
|
||
public class Branching3 { | ||
|
||
/** | ||
* different values in different branches used in the end | ||
* @param p unknown | ||
*/ | ||
void entryPoint(boolean p) { | ||
int a = 0; | ||
if (p) { | ||
a = 23; | ||
} else { | ||
a = 42; | ||
} | ||
int c = a; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package target.constant; | ||
|
||
public class Branching4 { | ||
|
||
/** | ||
* different values in different branches not used in the end | ||
* @param p unknown | ||
*/ | ||
void entryPoint(boolean p) { | ||
int a = 0; | ||
int b = 10; | ||
if (p) { | ||
a = 23; | ||
} else { | ||
a = 42; | ||
} | ||
int c = b; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package target.constant; | ||
|
||
public class Branching5 { | ||
|
||
/** | ||
* different values in different branches meet with linear op | ||
* @param p unknown | ||
*/ | ||
void entryPoint(boolean p) { | ||
int a = 0; | ||
int b = 10; | ||
if (p) { | ||
a = 23; | ||
} else { | ||
a = 42; | ||
} | ||
int c = a + 3; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package target.constant; | ||
|
||
public class Branching6 { | ||
|
||
/** | ||
* same values in different branches meet with linear op | ||
* @param p unknown | ||
*/ | ||
void entryPoint(boolean p) { | ||
int a = 0; | ||
int b = 10; | ||
if (p) { | ||
a = 23; | ||
} else { | ||
a = 23; | ||
} | ||
int c = a + 3; | ||
} | ||
|
||
} |
2 changes: 1 addition & 1 deletion
2
...st/java/target/constant/FunctionCall.java → src/test/java/target/constant/Context.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
package target.constant; | ||
|
||
public class FunctionCall { | ||
public class Context { | ||
|
||
int id(int a) { | ||
return a; | ||
|
2 changes: 1 addition & 1 deletion
2
...t/java/target/constant/FunctionCall2.java → src/test/java/target/constant/Context2.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...t/java/target/constant/FunctionCall3.java → src/test/java/target/constant/Context3.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package target.constant; | ||
|
||
|
||
public class Context4 { | ||
|
||
int increment(int a) { | ||
return a + 1; | ||
} | ||
|
||
int nestedCaller(int a){ | ||
return nestedCaller1(a); | ||
} | ||
|
||
int nestedCaller1(int a){ | ||
return increment(a); | ||
} | ||
|
||
/** | ||
* nested calls | ||
*/ | ||
public void entryPoint() { | ||
int a = 100; | ||
int b = 200; | ||
int c = increment(a); | ||
int d = nestedCaller(b); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.