SIRFilter filt = (SIRFilter)filter;
SIRPhasedFilter filt = (SIRPhasedFilter)filter;
    private void doPropagation(SIRStream filter)    {        JMethodDeclaration[] meths = filter.getMethods();        SLIRReplacingVisitor theVisitor = new SLIRReplacingVisitor() {                    public Object visitAssignmentExpression                        (JAssignmentExpression self,                         JExpression left,                         JExpression right)                    {                        // Don't visit the left-hand side of the                        // expression.			// Visit if Array Expression --jasperln			if(left instanceof JArrayAccessExpression)			    ((JArrayAccessExpression)left).setAccessor((JExpression)((JArrayAccessExpression)left).getAccessor().accept(this));                        return new JAssignmentExpression                            (self.getTokenReference(),                             left,                             (JExpression)right.accept(this));                    }                                        public Object visitFieldExpression                        (JFieldAccessExpression self,                         JExpression left,                         String ident)                    {                        Object orig =                            super.visitFieldExpression(self, left, ident);                        if (canFieldPropagate(ident))                            return propagatedField(ident);                        else                            return orig;                    }                    public Object visitArrayAccessExpression                        (JArrayAccessExpression self,                         JExpression pfx,                         JExpression acc)                    {                        // Recurse so we have something to return.                        Object orig =                            super.visitArrayAccessExpression(self, pfx, acc);                        // Take a harder look at what we have...                        if (!(pfx instanceof JFieldAccessExpression))                            return orig;                        JFieldAccessExpression fae =                            (JFieldAccessExpression)pfx;                        if (!(fae.getPrefix() instanceof JThisExpression))                            return orig;                        // Okay, the base is a FAE with this.  Yay.                        // Save its name.                        String name = fae.getIdent();                        // Now, is the offset an integer literal?                        if (!(acc instanceof JIntLiteral))                            return orig;                        // Yay, we win (hopefully).                        int slot = ((JIntLiteral)acc).intValue();                        if (canArrayPropagate(name, slot))                            return propagatedArray(name, slot);                        else                            return orig;                    }            };        for (int i = 0; i < meths.length; i++)        {            meths[i].accept(theVisitor);            // Also run some simple algebraic simplification now.            meths[i].accept(new Propagator(findLocals(meths[i])));	    // Raise Variable Declarations to beginning of block	    //meths[i].accept(new VarDeclRaiser());        }        // If this is a filter, also run on I/O rates and other field initializers        if (filter instanceof SIRFilter)        {            SIRFilter filt = (SIRFilter)filter;            Propagator prop = new Propagator(new Hashtable());	    // pop            JExpression newPop = (JExpression)filt.getPop().accept(theVisitor);            newPop = (JExpression)newPop.accept(prop);            if (newPop!=null && newPop!=filt.getPop()) {                filt.setPop(newPop);            }	    // peek            JExpression newPeek = (JExpression)filt.getPeek().accept(theVisitor);            newPeek = (JExpression)newPeek.accept(prop);            if (newPeek!=null && newPeek!=filt.getPeek()) {                filt.setPeek(newPeek);            }	    // push            JExpression newPush = (JExpression)filt.getPush().accept(theVisitor);            newPush = (JExpression)newPush.accept(prop);            if (newPush!=null && newPush!=filt.getPush()) {                filt.setPush(newPush);            }	    // field initializers	    JFieldDeclaration[] fields = filter.getFields();	    for (int i=0; i<fields.length; i++) {		JVariableDefinition var = fields[i].getVariable();		if (var.hasInitializer()) {		    JExpression origInit = var.getValue();		    JExpression newInit = (JExpression)origInit.accept(theVisitor);		    newInit = (JExpression)newInit.accept(prop);		    if (newInit!=origInit) {			var.setValue(newInit);		    }		}	    }        }    }