[Soot-list] ForwardBranchedFlowAnalysis visits units in the "wrong" order?

Attila Bartha at.bartha at gmail.com
Sat Nov 28 07:23:29 EST 2009


Hi Eric

Thank you for the hint, it was exactly the clue I was looking for.

By the way, I think, in the presence of loops, the order does matter to some
extent, unless you accept that your analysis finds itself in an endless
loop...
I am working on loops for quite a while now. I find it quite challenging.
Do you know any analysis specifically dealing with loops, particularly
dataflow analysis?

Attila


-----Original Message-----
From: eric.bodden at googlemail.com [mailto:eric.bodden at googlemail.com] On
Behalf Of Eric Bodden
Sent: Samstag, 28. November 2009 11:50
To: Attila Bartha
Cc: soot-list
Subject: Re: [Soot-list] ForwardBranchedFlowAnalysis visits units in the
"wrong" order?

Hi Attila.

> Thus, it visits first the units FOLLOWING the loop before visiting the
units
> IN the loop.

That can well be the case. Data-flow analyses generally do not define
any order in which nodes are visited.

> However, my analysis will only work correctly, if it visits first the loop
> body and then the code after the loop.

Then your analysis is not actually defined correctly (at least not if
you want to use it in combination with the ForwardBranchedFlowAnalysis
class). You should probably re-think your analyses. If it follows the
design principles for flow analyses (finite lattice, meat/join
operations, etc.) then the order should not actually matter.

> Is this a bug or an intended feature?

Intended.

> Is there an alternative forward analysis or a possible quick fix that
visits
> the units in the 'normal' order?

Actually there is a hack to modify the order. See:
http://www.sable.mcgill.ca/soot/doc/soot/toolkits/scalar/ForwardFlowAnalysis
.html#constructWorklist%28java.util.Map%29

But as I said, most likely there"s actually something wrong with your
analysis.

Eric



More information about the Soot-list mailing list