DataFlowEquations eq )
{
Iterator vertices = graph.getVertices().iterator();
while ( vertices.hasNext() )
{
Vertex v = (Vertex) vertices.next();
inValues.put( v, new BitSet() ); // Initialize everything to
outValues.put( v, new BitSet() ); // empty
}
boolean isOK = true;
while ( isOK )
{
vertices = graph.getVertices().iterator();
isOK = false;
while ( vertices.hasNext() )
{
Vertex v = (Vertex) vertices.next();
BitSet out = new BitSet();
out.or( (BitSet) inValues.get( v ) );
out.or( eq.generates( v ) );
out.andNot( eq.kills( v ) );
/*
System.err.println("Old Out: " + v + ":" + outValues.get( v ));
System.err.println("New Out: " + v + ":" + out);
*/
if ( !out.equals( outValues.get( v ) ) )
{
isOK = true;
outValues.put( v, out );
Iterator outbound = graph.getOutbound( v ).iterator();
while ( outbound.hasNext() )
{
Vertex target = graph.getTarget( (Edge) outbound.next() );
BitSet in = (BitSet) inValues.get( target );
in.or( out );
inValues.put( target, in );
/*