[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: heads and tails
> for the very first entry in an infinite loop take the tail-set (the
> safe set) as "input"-set for the unit in the
> flow-through-function. This not only eliminates the problem, but even
> gives the best possible result.
Certainly, this is one solution. Then can we do more general things?
UnitGraph detects a loop without exits, there must be some GOTO statement
in the loop. the UnitGraph can either treat GOTO as tail unit or replace
GOTO by IF(true)GOTO and another branch goes to a RETURN which is in the
tail set.
So UnitGraph should guarantee a safe, non-empty tial set of units, so do
other graphs.
> We should probably rewrite BackwardAnalysis.java so we have something
> like newInitialTailSet(), but beside of that there should not be much
> work to do.
I think the current interface is fine, if the UnitGraph provides a
correct tail set of units.
Feng