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

Eric Bodden eric.bodden at mail.mcgill.ca
Wed Oct 29 09:20:09 EDT 2008


Hi Jian.

If you are running Soot on a program given as source code then there
could be a chance, using line number information. Search the
documentation and this list for the command line parameter
--keep-line-number.

Eric

2008/10/29 Jian Xu <fightmyway at gmail.com>:
> 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
>
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>
>



-- 
Eric Bodden
Sable Research Group, McGill University, Montréal, Canada
Got an interesting job offer? http://www.bodden.de/hire-me/


More information about the Soot-list mailing list