= (SchedStream)toplevel.accept(new SIRSchedBuilder());  Scheduler scheduler = new SimpleHierarchicalScheduler(schedStream);
= (SchedStream)toplevel.accept(new SIRSchedBuilder(scheduler));  scheduler.useStream(schedStream);
    public static Schedule schedule(SIRStream toplevel, 				    JClassDeclaration flatClass) {	// get a representation of the stream structure	SchedStream schedStream 	    = (SchedStream)toplevel.accept(new SIRSchedBuilder());	// make a scheduler	Scheduler scheduler = new SimpleHierarchicalScheduler(schedStream);	// compute a schedule	Schedule schedule = (Schedule)scheduler.computeSchedule();	// make work function implementing the schedule	JMethodDeclaration work = buildToplevelWork(schedule, toplevel);	// add <work> to <flatClass>	flatClass.addMethod(work);	// add <work> to <toplevel>	toplevel.addMethod(work);	// return schedule for future reference	return schedule;    }