[Soot-list] how can associate jimple ConditionExpr to source code conditions in compound predicate

Jian Xu fightmyway at gmail.com
Wed Oct 29 00:08:11 EDT 2008


Hi:
I do coverage statistics on every condition of compound boolean expression.
Now I can get how many times the condition is true or false when be
executed. But I wonder whether soot can reflect the conditionExpt to the
source code condition.

I inspect the Jimple representation, and find condtion like if(a<b) in
source code will be like "if i0>=i1", but while(a<b) will be like "if
i0<i1". If the predicate is simple, I meaning it only have one condition, we
can know they are the same condition through they two have same
linenumbertag. But if it is compound boolean expression, such as a<b&&c>=d,
yet we don't know the variable name neither, how can we know jimple code if
i0>=i2 represent a<b or c>=d. Because the condition translate differently
between condition statement and cycle statement. The more conditions in one
predicate, the harder to distinguish them.

I think about whether this way can solute this question. The conditions
evaluated from left to right, and the predicate will have one longest
condition evaluation sequences if we don't have dead code. I think the
sequences is ordered because left-to-right rule. So I can compare the source
code with jimple code, from left to right, I will know each. But I don't
know this way is right and I wonder there is easy way in soot or information
about how Jimple do the translationg when it streamline the code?

Thank you
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20081029/383aeed0/attachment.htm


More information about the Soot-list mailing list