[Soot-list] Problem with loops in ForwardBranchedFlowAnalysis

Manas Thakur manasthakur17 at gmail.com
Fri Sep 12 09:55:53 EDT 2014


Ya, I think I need to do the same. Thanks Eric.

Regards,
Manas

On 12-Sep-2014, at 6:03 pm, Bodden, Eric <eric.bodden at sit.fraunhofer.de> wrote:

> Hi again.
> 
> The ForwardBranchedFlowAnalysis API does not give any guarantees on the iteration order. This is by design. Client analyses should be instances of the "monotone framework", which then automatically yield the same result in any iteration order.
> 
> If you need a particular order then you have to implement your own data-flow solver, or you have to instantiate at the very least ForwardBranchedFlowAnalysis with a custom "orderer", see: http://www.sable.mcgill.ca/soot/doc/soot/toolkits/scalar/FlowAnalysis.html#constructOrderer()
> 
> Best wishes,
> Eric
> 
> On 12.09.2014, at 14:08, Manas Thakur <manasthakur17 at gmail.com> wrote:
> 
>> Hi Eric,
>> 
>> I am constructing a method-summary for a flow-sensitive analysis. Hence the order in which I process various statements in the program, matters.
>> 
>> I was getting improper results. So I checked the order in which Soot was processing them. I found that the statements inside a loop are skipped and processed after analysing the “return” statement of the method. That is, the target pointing to the first statement after the loop is taken, followed by the follow-through target (the one pointing inside the loop’s first statement).
>> 
>> I obtain the summary at the last point of the method, which comes wrong as the last statement processed was not the end of method, but the loop-end.
>> 
>> Regards,
>> Manas
>> 
>> On 12-Sep-2014, at 5:13 pm, Bodden, Eric <eric.bodden at sit.fraunhofer.de> wrote:
>> 
>>> Hi Manas.
>>> 
>>> Could you start from the beginning? What is your analysis supposed to compute?
>>> 
>>> Normally ForwardFlowAnalysis does all iteration automatically. Hence I don't understand at all what kind of problem you might be having.
>>> 
>>> Cheers,
>>> Eric
>>> 
>>> --
>>> Sent from my mobile
>>> 
>>> On Sep 12, 2014 10:35 AM, Manas Thakur <manasthakur17 at gmail.com> wrote:
>>> Hi,
>>> 
>>> My program (which implements ForwardBranchedFlowAnalysis) is always analyzing the contents of a loop at the end, even after processing the return statement. Due to this, I am not able to get the results at the end of a method correctly.
>>> 
>>> It just follows the targets of goto's, and jumps to the statement following the loop; after reaching the end of a method, it returns back to analyze the loop.
>>> 
>>> What should I do?
>>> 
>>> Regards,
>>> Manas
>>> 
>>> 
>> 
> 
> --
> Prof. Eric Bodden, Ph.D., http://sse.ec-spride.de/ http://bodden.de/
> Head of Secure Software Engineering  at Fraunhofer SIT, TU Darmstadt and EC SPRIDE
> Tel: +49 6151 16-75422    Fax: +49 6151 16-72051
> Room 3.2.14, Mornewegstr. 30, 64293 Darmstadt
> 



More information about the Soot-list mailing list