self.getWork().accept(theVisitor);
try { self.getWork().accept(theVisitor); } catch (NonLinearException e) { LinearPrinter.println("  caught a non-linear exception -- eg the filter is non linear."); }
    public void visitFilter(SIRFilter self, SIRFilterIter iter) {	this.filtersSeen++;	LinearPrinter.println("Visiting " + "(" + self + ")");	// set up the visitor that will actually collect the data	int peekRate = extractInteger(self.getPeek());	int pushRate = extractInteger(self.getPush());	int popRate  = extractInteger(self.getPop());	LinearPrinter.println("  Peek rate: " + peekRate);	LinearPrinter.println("  Push rate: " + pushRate);	LinearPrinter.println("  Pop rate: "  + popRate);	// if we have a peek or push rate of zero, this isn't a linear filter that we care about,	// so only try and visit the filter if both are non-zero	if ((peekRate == 0) || (pushRate == 0)) {	    LinearPrinter.println("  " + self.getIdent() + " is source/sink.");	    return;	}	LinearFilterVisitor theVisitor = new LinearFilterVisitor(self.getIdent(),								 peekRate, pushRate, popRate);		// pump the visitor through the work function	// (we might need to send it thought the init function as well so that	//  we can determine the initial values of fields. However, I think that	//  field prop is supposed to take care of this.)	self.getWork().accept(theVisitor);		// print out the results of pumping the visitor	// incidentally, this output is parsed by some perl scripts to verify results,	// so it probably shouldn't be changed.	if (theVisitor.computesLinearFunction()) {	    // since printing the matrices takes so long, if debugging is not on,	    // don't even generate the string.	    if (LinearPrinter.getOutput()) {		LinearPrinter.println("Linear filter found: " + self +				      "\n-->Matrix:\n" + theVisitor.getMatrixRepresentation() +				      "\n-->Constant Vector:\n" + theVisitor.getConstantVector());	    }	    // add a mapping from the filter to its linear form.	    this.filtersToLinearRepresentation.put(self,						   theVisitor.getLinearRepresentation());	} 	// check that we have not violated the rep invariant	checkRep();    }