[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
heads and tails
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.