fw.write("\t" + RawExecutionCode.structReceivePrefix +
fw.write("\t" + RawExecutionCode.structReceivePrefix + network +
    private void createPushPopFunctions(SIRStructure[] structs,					FileWriter fw,					String network) throws Exception    {	assert network.equals("Static") || network.equals("Dynamic");	//which network we are using	boolean dynamic = false;	if (network.equals("Dynamic"))	    dynamic = true;	//create the pop functions	for (int i = 0; i < structs.length; i++) {	    SIRStructure current = structs[i];	    fw.write("inline " + current.getIdent() + " pop" + network + 		     current.getIdent() + "() {\n");	    fw.write("\t" + current.getIdent() + " temp;\n");	    for (int j = 0; j < current.getFields().length; j++) {		fw.write("\t//" + current.getFields()[j].getType() + "\n");		if (current.getFields()[j].getType().isArrayType()) {		    System.out.println(((CArrayType)current.getFields()[j].getType()).getDims());		    assert false;		}		else if (current.getFields()[j].getType().isClassType()) {		 		    fw.write("\ttemp." + current.getFields()[j].getVariable().getIdent() +			     " = pop" + current.getFields()[j].getType() + "();\n");		}		else {		    fw.write("\t" + Util.networkReceivePrefix(dynamic));		    fw.write("temp." + current.getFields()[j].getVariable().getIdent());		    fw.write(Util.networkReceiveSuffix(dynamic, current.getFields()[j].getType()) + "\n");		}	    }	    fw.write("\treturn temp;\n}\n");	    //create the pop functions that take a pointer argument	    //these are more efficent, we use these when we can	    fw.write("inline void " + RawExecutionCode.structReceivePrefix + network + 		     current.getIdent() + "(" + 		     current.getIdent() + "* temp) {\n");	    for (int j = 0; j < current.getFields().length; j++) {		if (current.getFields()[j].getType().isArrayType()) {		    assert false;		}		else if (current.getFields()[j].getType().isClassType()) {		    //if this is struct field, call the struct's popPointer method		    fw.write("\t" + RawExecutionCode.structReceivePrefix + 			     current.getFields()[j].getType() +			     "(&temp->" + current.getFields()[j].getVariable().getIdent() +			     ");\n");		}		else {		    fw.write("\t" + Util.networkReceivePrefix(dynamic));		    fw.write("temp->" + current.getFields()[j].getVariable().getIdent());		    fw.write(Util.networkReceiveSuffix(dynamic, current.getFields()[j].getType()) + "\n");		}	    }	    fw.write("}\n");	    	    //create the push functions	    	    fw.write("inline void push" + network + current.getIdent() + "(" + current.getIdent() +		     "* temp) {\n");	    	    if (network.equals("Dynamic")) {		//we must generate the header for the dynamic network send...		fw.write(Util.CGNOINTVAR + " = " + FlatIRToC.DYNMSGHEADER + ";\n");	    }	    for (int j = 0; j < current.getFields().length; j++) {		//if this field is a struct type, use its method to push the field		if (current.getFields()[j].getType().isArrayType()) {		    System.out.println(((CArrayType)current.getFields()[j].getType()).getDims()[0]);		    assert false;		}		else if (current.getFields()[j].getType().isClassType()) {		    fw.write("push" + network + current.getFields()[j].getType() + "(&temp->" +			     current.getFields()[j].getVariable().getIdent() + ");\n");		}		else {		    fw.write("\t" + Util.networkSendPrefix(dynamic, current.getFields()[j].getType()));		    fw.write("temp->" + current.getFields()[j].getVariable().getIdent());		    fw.write(Util.networkSendSuffix(dynamic) + ";\n");		}	    }	    fw.write("}\n");	}    }