sj.setInit(SIRStream.makeEmptyInit());
    public static SIRPipeline addSyncPoints(SIRSplitJoin sj, PartitionGroup partition) {	// check what we're getting	checkSymmetry(sj);	Utils.assert(partition.size()==((SIRPipeline)sj.get(0)).size());	// make result pipeline	SIRPipeline result = new SIRPipeline(sj.getParent(), 					     sj.getIdent()+"_par",					     JFieldDeclaration.EMPTY(),					     JMethodDeclaration.EMPTY());	result.setInit(SIRStream.makeEmptyInit());	for (int i=0; i<partition.size(); i++) {	    // new i'th splitjoin.  Replace init function in <sj>	    // before we clone the methods	    sj.setInit(SIRStream.makeEmptyInit());	    SIRSplitJoin newSJ = new SIRSplitJoin(result, 						  sj.getIdent()+"_"+i,						  (JFieldDeclaration[])ObjectDeepCloner.deepCopy(sj.getFields()),						  (JMethodDeclaration[])ObjectDeepCloner.deepCopy(sj.getMethods()));	    // new pipe's for the i'th splitjoin	    for (int j=0; j<sj.size(); j++) {		SIRPipeline origPipe = (SIRPipeline)sj.get(j);		// reset init function in origPipe before we clone it		origPipe.setInit(SIRStream.makeEmptyInit());		SIRPipeline pipe = new SIRPipeline(newSJ,						   origPipe.getIdent()+"_"+i+"_"+j,						   (JFieldDeclaration[])ObjectDeepCloner.deepCopy(origPipe.getFields()),						   (JMethodDeclaration[])ObjectDeepCloner.deepCopy(origPipe.getMethods()));		// add requisite streams to pipe		for (int k=partition.getFirst(i); k<=partition.getLast(i); k++) {		    pipe.add(origPipe.get(k), origPipe.getParams(k));		}		// add pipe to the sj for the current partition		newSJ.add(pipe, sj.getParams(j));		// try lifting in case we can		Lifter.eliminatePipe(pipe);	    }	    // make the splitter and joiner for <newSJ>.  In the end	    // cases, this is the same as for <sj>; otherwise it's	    // the template RR splits and joins	    SIRSplitter split = (i==0 ? 				 sj.getSplitter() : 				 SIRSplitter.createUniformRR(newSJ, new JIntLiteral(1)));	    SIRJoiner join = (i==partition.size()-1 ? 			      sj.getJoiner() : 			      SIRJoiner.createUniformRR(newSJ, new JIntLiteral(1)));	    newSJ.setSplitter(split);	    newSJ.setJoiner(join);	    // add sj for this partition to the overall pipe	    StreamItDot.printGraph(newSJ, "newsj" + i + ".dot");	    result.add(newSJ);	}	// replace in parent	sj.getParent().replace(sj,result);	return result;    }