next up previous contents
Next: The generated code Up: CoSy-fSDL-mode examples Previous: Live Variables: MAY dataflow

   
BusyVariables: MUST dataflow analysis

If we want to solve a MUST data-flow analysis (intersection over all predecessors), we have to use an all quantifier. The following EARS computes busy local variables, e.g. variables that are used in all successor blocks or ar used in the block itself. The change is minimal.

  
EARS BusyVariables()
{
   RANGE b <= BUSYIN; 
   RULES
   BUSYOUT(b,o) :- FORALL b1: BlockGraph.succ(b,b1), BUSYIN(b1,o);
   BUSYIN(b,o)  :- USED(b,o); 
   BUSYIN(b,o)  :- BUSYOUT(b,o);
}

In similar fashion available expressions or busy expressions can be solved.



Uwe Assmann
1998-12-22