code: public String getOptimizedPlanAsJson(PackagedProgram prog, int parallelism) throws CompilerException, ProgramInvocationException {
  		PlanJSONDumpGenerator jsonGen = new PlanJSONDumpGenerator();
  		return jsonGen.getOptimizerPlanAsJSON(getOptimizedPlan(prog, parallelism));
  	}
docs: ------------------------------------------------------------------------