Closed ArtemUntila closed 2 years ago
For the Issue class:
4. int b = 2;
5. int a = 1 + b;
If you look at the raw slice, you'll notice that line 5 becomes int a = 3. This is due to constant propagation done by soot when creating the instrumented JAR. So it conceals the dependency of 5 on 4 as b does not appear in line 5 anymore. If b is not constant, it will be in the slice. Currently, I have no way of disabling the constant propagation in soot.
As for the readme example:
4. if (args.length > 0){
7. parsed = null;
9. System.out.println(parsed.length);
the re-assignment of parsed at line 7 overwrites any value of parsed before line 7. So line 7 is not data-dependent on the definition of parsed. This is the expected behaviour.
Issue.java
:Running Slicer4J w.r.t.
Issue:6
line:slice.log
:Despite variable
a
is data-dependent on variableb
, the line with declaration of variableb
wasn't included inslice.log
.In the example from
README
the same situation is observed:In this example line with declaration of variable
parsed
also wasn't included inslice.log
.Is such behaviour expected?