if (Flattener.hasDynamicRates(str)) { System.err.println("Failure: Dynamic rates are not yet supported in the RStream backend."); System.exit(1); }
    public static void run(SIRStream str,			   JInterfaceDeclaration[] 			   interfaces,			   SIRInterfaceTable[]			   interfaceTables,			   SIRStructure[]			   structs) {	System.out.println("Entry to RStream Conversion");	structures = structs;		//rename all variables/functions in each filter to be	//exclusive over all filters...	//this must be run now, FlatIRToRS relies on it!!!	RenameAll.renameAllFilters(str);		// move field initializations into init function	//System.out.print("Moving initializers into init functions... ");	FieldInitMover.moveStreamInitialAssignments(str,						    FieldInitMover.IGNORE_ARRAY_INITIALIZERS);	//System.out.println("done.");		// propagate constants and unroll loop	System.out.println("Running Constant Prop and Unroll...");	ConstantProp.propagateAndUnroll(str);	System.out.println("Done Constant Prop and Unroll.");        // add initPath functions        EnqueueToInitPath.doInitPath(str);	// construct stream hierarchy from SIRInitStatements	ConstructSIRTree.doit(str);	//VarDecl Raise to move array assignments up	new VarDeclRaiser().raiseVars(str);	// do constant propagation on fields	if (KjcOptions.nofieldprop) {	} else {	    System.out.println("Running Constant Field Propagation...");	    FieldProp.doPropagate(str);	    System.out.println("Done Constant Field Propagation...");		//System.out.println("Analyzing Branches..");		//new BlockFlattener().flattenBlocks(str);		//new BranchAnalyzer().analyzeBranches(str);	}	//convert all file readers/writers to normal 	//sirfilters, not predefined filters	ConvertFileFilters.doit(str);	StreamItDot.printGraph(str, "before-synch.dot");	Lifter.liftAggressiveSync(str);	StreamItDot.printGraph(str, "before-partition.dot");	//mgordon: I don't know, I could forsee the linear analysis 	//and the statespace analysis being useful to Reservoir in the 	//future...but don't run it now, there is no point.	//	str = Flattener.doLinearAnalysis(str);	//      str = Flattener.doStateSpaceAnalysis(str);		//if Splitjoin to pipe is enabled, run it...	if (KjcOptions.sjtopipe) {	    SJToPipe.doit(str);	}	SIRPrinter printer1 = new SIRPrinter("entry.sir");	IterFactory.createFactory().createIter(str).accept(printer1);	printer1.close();	//VarDecl Raise to move array assignments up	new VarDeclRaiser().raiseVars(str);		//VarDecl Raise to move peek index up so	//constant prop propagates the peek buffer index	new VarDeclRaiser().raiseVars(str);	// optionally print a version of the source code that we're	// sending to the scheduler	if (KjcOptions.print_partitioned_source) {	    new streamit.scheduler2.print.PrintProgram().printProgram(IterFactory.createFactory().createIter(str));	}		System.out.println("Flattener Begin...");	executionCounts = SIRScheduler.getExecutionCounts(str);		//flatten the "graph"	GraphFlattener graphFlattener = new GraphFlattener(str);	System.out.println("Flattener End.");		//create the execution counts for other passes	createExecutionCounts(str, graphFlattener);		//VarDecl Raise to move array assignments down?	new VarDeclRaiser().raiseVars(str);		//printer1 = new SIRPrinter("beforecodegen.sir");	//IterFactory.createFactory().createIter(str).accept(printer1);	//printer1.close();	//generate the include file that has the structure definitions	StructureIncludeFile.doit(structures);	//generate the c code for the application	GenerateCCode.generate(graphFlattener.top);	//exit	System.exit(0);    }