new JIntLiteral(0))), null);
new JIntLiteral(1))), null);
    JStatement generateSteadyStateLoop(SIRFilter filter, 				       LocalVariables localVariables)     {		//is we are rate matching generate the appropriate code	if (KjcOptions.ratematch) 	    return generateRateMatchSteadyState(filter, localVariables);	JBlock block = new JBlock(null, new JStatement[0], null);	block.addStatement(new JExpressionStatement(null, new JMethodCallExpression(null, "check_messages", new JExpression[0]), null));	//reset the simple index	if (isSimple(filter)){	    block.addStatement		(new JExpressionStatement(null,					  (new JAssignmentExpression					   (null,					    new JLocalVariableExpression					    (null, localVariables.simpleIndex),					    new JIntLiteral(-1))), null));	}	    		//add the statements to receive pop items into the buffer	block.addStatement	    (makeForLoop(receiveCode(filter, filter.getInputType(),				     localVariables),			 localVariables.exeIndex,			 new JIntLiteral(filter.getPopInt())));		JBlock workBlock = 	    (JBlock)ObjectDeepCloner.	    deepCopy(filter.getWork().getBody());	//if we are in debug mode, print out that the filter is firing	if (ClusterBackend.FILTER_DEBUG_MODE) {	    block.addStatement		(new SIRPrintStatement(null,				       new JStringLiteral(null, filter.getName() + " firing."),				       null));	}	//add the cloned work function to the block	block.addStatement(workBlock);	//	}		//	return block;		//if we are in decoupled mode do not put the work function in a for loop	//and add the print statements	if (KjcOptions.decoupled) {	    block.addStatementFirst		(new SIRPrintStatement(null, 				       new JIntLiteral(0),				       null));	    block.addStatement(block.size(), 				    new SIRPrintStatement(null, 							  new JIntLiteral(1),							  null));	    return block;	}	block.addStatement(new JExpressionStatement(null, new JMethodCallExpression(null, "send_credits", new JExpression[0]), null));		JVariableDefinition var = 	    new JVariableDefinition(null, 0, (CType)CStdType.Integer, 				    "__counter_"+nodeID, 				    new JIntLiteral(0));	JVariableDefinition var2 = 	    new JVariableDefinition(null, 0, (CType)CStdType.Integer, 				    "__number_of_iterations", 				    new JIntLiteral(0));	JVariableDeclarationStatement var_st = 	    new JVariableDeclarationStatement( null, var, null);	JStatement init_stmt = new JExpressionStatement(null,					  (new JAssignmentExpression					   (null,					    new JLocalVariableExpression					    (null, var),					    new JIntLiteral(0))), null);	JExpression relation = new JRelationalExpression(null, Constants.OPE_LT, new JLocalVariableExpression(null, var), new JLocalVariableExpression(null, var2));	JStatement incr_expr = new JExpressionStatement(null, new JPostfixExpression(null, OPE_POSTINC, new JLocalVariableExpression(null, var)), null);	return new JForStatement(null,  				 init_stmt, 				 relation,				 incr_expr,				 block,				 null);	//return the infinite loop		//return new JWhileStatement(null, 	//			   new JBooleanLiteral(null, true),	//			   block, 	//			   null);    }