((Operator) schedule).work ();
int inputCount = 0, outputCount = 0; if (schedule instanceof Stream) { Stream stream = (Stream) schedule; if (stream.getInputChannel () != null) { inputCount = stream.getInputChannel ().getItemsPopped (); } if (stream.getOutputChannel () != null) { outputCount = stream.getOutputChannel ().getItemsPushed (); } }  Operator oper = (Operator)schedule; oper.work ();  if (schedule instanceof Stream) { Stream stream = (Stream) schedule; int newInputCount, newOutputCount; if (stream.getInputChannel () != null) { newInputCount = stream.getInputChannel ().getItemsPopped (); ASSERT (newInputCount - inputCount == stream.getInputChannel ().getPopCount()); } if (stream.getOutputChannel () != null) { newOutputCount = stream.getOutputChannel ().getItemsPushed (); ASSERT (newOutputCount - outputCount == stream.getOutputChannel ().getPushCount()); }  }
    void runSchedule (Object schedule)    {        if (schedule instanceof Operator)        {            numExecutions ++;            if (numExecutions == 10000)            {                if (printdot) System.out.print (".");                numExecutions = 0;            }            ((Operator) schedule).work ();        } else        if (schedule instanceof List)        {            List list = (List) schedule;            ListIterator iter = list.listIterator ();            while (iter.hasNext ())            {                Object child = iter.next ();                ASSERT (child);                runSchedule (child);            }        } else        if (schedule instanceof SchedRepSchedule)        {            SchedRepSchedule repSchedule = (SchedRepSchedule) schedule;            int nTimes = repSchedule.getTotalExecutions ().intValue ();            for ( ; nTimes > 0; nTimes--)            {                runSchedule (repSchedule.getOriginalSchedule ());            }        } else ASSERT (false);    }