[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: heads and tails
On Tue, Apr 30, 2002 at 12:03:29AM -0400, Ondrej Lhotak wrote:
> We should define heads and tails differently. They should be all
> possible entry/exit points, respectively. For heads, we would have the
> first instruction (even if there is a goto to it), and the start of
> every exception handler (because they are like entry points, in that
> the flow into them is not explicit in the graph) (this is only in the
> brief unit graph). For tails, we would have all return statements, and,
> presumably, all statements that can throw an exception. I suspect this
> last one will cause problems...
this would clearly defeat the advantages of a brief-unit graph, where
we don't want exceptions to interfere with our analysis.
i'm rather for something, that only triggers, if we are in an infinite
loop. but i haven't yet figured out, what to do, if we detect one.
another question is, which part of soot should look for infinite
loops. the unitgraph-builder, or the backward-analysis? in the
backward-analysis we could combine it with a new algorithm to find a
good initial waiting-list. but then again: what to do, if we find
one...?
florian
>
> Ondrej
>
> On Mon, Apr 29, 2002 at 11:35:42PM -0400, Florian Loitsch wrote:
> > hi,
> > When using the provided Analysis-classes, one just overwrites
> > the newInitialFlow() and customizeInitialFlowGraph() to assing the
> > desired flowsets to each unit. customizeInitialFlowGraph() is used, if
> > the heads/tails should have different sets.
> > Take as example a "defined-Locals"-analysis (similary to what Javac
> > does).
> > we assign the full set to each unit except the heads, where we put the
> > empty set.
> > if we did this using the current implementation of UnitGraph.java we
> > would, imo, run into troubles: heads, according to this class, are
> > units, that have no predecessor. but we could have a "goto" back to
> > this first unit. in this case we may not even have heads... Therefore
> > we wouldn't find any non-initialized variable.
> >
> > while i haven't yet encountered this problem with heads, i've had it
> > with tails: if we have an infite loop, we will not have a tail
> > neither.
> > The problem is, that even fixing the UnitGraph.java so the first
> > element is always a head, will not fix the tails. and what is the tail
> > of an infite loop?
> > any suggestions?
> > mfg
> > florian loitsch
> > --
> > People who think they know everything are very irritating to those of us who do.
> > - Anon.
> >
--
People who think they know everything are very irritating to those of us who do.
- Anon.