[Soot-list] Is Stmt part of if-branch

Marc-André Laverdière marc-andre.laverdiere-papineau at polymtl.ca
Tue May 13 10:40:23 EDT 2014


Hallo,

I wanted to know if anybody worked on this lately...

Marc-André Laverdière-Papineau
Doctorant - PhD Candidate

On 08/26/2013 01:43 AM, Bernhard Berger wrote:
> Hi Thomas,
> 
> I think you can use the dominator information (see [1]) to calculate the
> results. Perhaps you can try [2].
> 
> 
> Regards,
> Bernhard
> 
> [1] http://en.wikipedia.org/wiki/Dominator_(graph_theory)
> [2]
> http://www.sable.mcgill.ca/soot/doc/soot/toolkits/graph/SimpleDominatorsFinder.html 
> Am 15.08.2013 um 19:15 schrieb Herr Thomas Vogel <vogel.thomas at me.com
> <mailto:vogel.thomas at me.com>>:
> 
>> Hi everybody,
>>
>> I' ve following issue:
>> I want to know if a statement in jimple depends on an specific IfStmt.
>> Is there any solution for solving this problem.
>>
>> For example following Java code:
>>
>> public void dependsOnIf() {
>> boolean a = true;
>> if (a) {
>> System.out.println("Depends on 'if (a)' -> if-branch.");
>> } else {
>> System.out.println("Depends on 'if (a)' -> else-branch.");
>> }
>> System.out.println("Depends on nothing.");
>> }
>>
>> Results in the following jimple code (attached is the desired result
>> as comment):
>>
>> this := @this: TaintTrackingTest /* depends on nothing */
>> a = 1 /* depends on nothing */
>> if a == 0 goto nop /* depends on nothing */
>> nop
>> temp$1 = <java.lang.System: java.io.PrintStream out>  /* depends on if
>> a == 0 */
>> virtualinvoke temp$1.<java.io.PrintStream: void
>> print(java.lang.String)>("Depends on \'if (a)\' -> else-branch.") /*
>> depends on if a == 0 */
>> goto [?= nop]
>> nop
>> temp$0 = <java.lang.System: java.io.PrintStream out> /* depends on if
>> a == 0 */
>> virtualinvoke temp$0.<java.io.PrintStream: void
>> println(java.lang.String)>("Depends on \'if (a)\' -> if-branch.") /*
>> depends on if a == 0 */
>> goto [?= nop]
>> nop
>> temp$2 = <java.lang.System: java.io.PrintStream out> /* depends on
>> nothing */
>> virtualinvoke temp$2.<java.io.PrintStream: void
>> println(java.lang.String)>("Depends on nothing.") /* depends on nothing */
>> return
>>
>> Regards, 
>> Thomas
>> _______________________________________________
>> Soot-list mailing list
>> Soot-list at sable.mcgill.ca <mailto:Soot-list at sable.mcgill.ca>
>> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
> 
> 
> 
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
> 


More information about the Soot-list mailing list