## Uses of Class
org.apache.sysds.runtime.controlprogram.Program

Packages that use Program
org.apache.sysds.api
org.apache.sysds.api.jmlc
org.apache.sysds.api.mlcontext
org.apache.sysds.hops.codegen
org.apache.sysds.hops.cost
org.apache.sysds.parser
org.apache.sysds.runtime.controlprogram
org.apache.sysds.runtime.controlprogram.context
org.apache.sysds.runtime.controlprogram.parfor.opt
org.apache.sysds.runtime.util
org.apache.sysds.utils

### Uses of Program in org.apache.sysds.api

Methods in org.apache.sysds.api with parameters of type Program
`static void` ScriptExecutorUtils.`executeRuntimeProgram(Program rtprog, ExecutionContext ec, DMLConfig dmlconf, int statisticsMaxHeavyHitters, Set<String> outputVariables)` Execute the runtime program.

### Uses of Program in org.apache.sysds.api.jmlc

Methods in org.apache.sysds.api.jmlc with parameters of type Program
`static void` JMLCUtils.`cleanupRuntimeProgram(Program prog, String[] outputs)` Removes rmvar instructions that would remove any of the given outputs.

### Uses of Program in org.apache.sysds.api.mlcontext

Methods in org.apache.sysds.api.mlcontext that return Program
`Program` ScriptExecutor.`getRuntimeProgram()` Obtain the runtime program

Methods in org.apache.sysds.api.mlcontext with parameters of type Program
`static void` MLContextUtil.`deleteRemoveVariableInstructions(Program progam)` Delete the 'remove variable' instructions from a runtime program.

### Uses of Program in org.apache.sysds.hops.codegen

Methods in org.apache.sysds.hops.codegen with parameters of type Program
`static void` SpoofCompiler.`generateCode(Program rtprog)`

### Uses of Program in org.apache.sysds.hops.cost

Methods in org.apache.sysds.hops.cost with parameters of type Program
`static double` CostEstimationWrapper.`getTimeEstimate(Program rtprog, ExecutionContext ec)`
`double` CostEstimator.`getTimeEstimate(Program rtprog, LocalVariableMap vars, HashMap<String,VarStats> stats)`

### Uses of Program in org.apache.sysds.parser

Methods in org.apache.sysds.parser that return Program
`Program` DMLTranslator.`getRuntimeProgram(DMLProgram prog, DMLConfig config)`

Methods in org.apache.sysds.parser with parameters of type Program
`void` DMLTranslator.`codgenHopsDAG(Program rtprog)`
`ProgramBlock` DMLTranslator.`createRuntimeProgramBlock(Program prog, StatementBlock sb, DMLConfig config)`

### Uses of Program in org.apache.sysds.runtime.controlprogram

Methods in org.apache.sysds.runtime.controlprogram that return Program
`Program` Program.`clone(boolean deep)`
`Program` ProgramBlock.`getProgram()`

Methods in org.apache.sysds.runtime.controlprogram with parameters of type Program
`void` ProgramBlock.`setProgram(Program prog)`

Constructors in org.apache.sysds.runtime.controlprogram with parameters of type Program
Constructor and Description
`BasicProgramBlock(Program prog)`
`ForProgramBlock(Program prog, String iterPredVar)`
`FunctionProgramBlock(Program prog, List<DataIdentifier> inputParams, List<DataIdentifier> outputParams)`
`IfProgramBlock(Program prog, ArrayList<Instruction> predicate)`
`ParForProgramBlock(int ID, Program prog, String iterPredVar, HashMap<String,String> params, ArrayList<ParForStatementBlock.ResultVar> resultVars)` ParForProgramBlock constructor.
`ParForProgramBlock(Program prog, String iterPredVar, HashMap<String,String> params, ArrayList<ParForStatementBlock.ResultVar> resultVars)`
`ProgramBlock(Program prog)`
`WhileProgramBlock(Program prog, ArrayList<Instruction> predicate)`

### Uses of Program in org.apache.sysds.runtime.controlprogram.context

Methods in org.apache.sysds.runtime.controlprogram.context that return Program
`Program` ExecutionContext.`getProgram()`

Methods in org.apache.sysds.runtime.controlprogram.context with parameters of type Program
`static ExecutionContext` ExecutionContextFactory.`createContext(boolean allocateVars, boolean allocateLineage, Program prog)`
`static ExecutionContext` ExecutionContextFactory.`createContext(boolean allocateVars, Program prog)`
`static ExecutionContext` ExecutionContextFactory.`createContext(LocalVariableMap vars, Program prog)`
`static ExecutionContext` ExecutionContextFactory.`createContext(Program prog)`
`void` ExecutionContext.`setProgram(Program prog)`

### Uses of Program in org.apache.sysds.runtime.controlprogram.parfor.opt

Methods in org.apache.sysds.runtime.controlprogram.parfor.opt with parameters of type Program
`static ArrayList<ProgramBlock>` ProgramRecompiler.`generatePartitialRuntimeProgram(Program rtprog, ArrayList<StatementBlock> sbs)`
`void` OptTreePlanMappingAbstract.`putRootProgram(DMLProgram prog, Program rtprog)`

### Uses of Program in org.apache.sysds.runtime.util

Methods in org.apache.sysds.runtime.util that return Program
`static Program` ProgramConverter.`parseProgram(String in, int id)`

Methods in org.apache.sysds.runtime.util with parameters of type Program
`static ForProgramBlock` ProgramConverter.`createDeepCopyForProgramBlock(ForProgramBlock fpb, long pid, int IDPrefix, Program prog, Set<String> fnStack, Set<String> fnCreated, boolean plain, boolean forceDeepCopy)`
`static void` ProgramConverter.`createDeepCopyFunctionProgramBlock(String namespace, String oldName, long pid, int IDPrefix, Program prog, Set<String> fnStack, Set<String> fnCreated, boolean plain)` This creates a deep copy of a function program block.
`static IfProgramBlock` ProgramConverter.`createDeepCopyIfProgramBlock(IfProgramBlock ipb, long pid, int IDPrefix, Program prog, Set<String> fnStack, Set<String> fnCreated, boolean plain, boolean forceDeepCopy)`
`static ArrayList<Instruction>` ProgramConverter.`createDeepCopyInstructionSet(ArrayList<Instruction> instSet, long pid, int IDPrefix, Program prog, Set<String> fnStack, Set<String> fnCreated, boolean plain, boolean cpFunctions)` Creates a deep copy of an array of instructions and replaces the placeholders of parworker IDs with the concrete IDs of this parfor instance.
`static ParForProgramBlock` ProgramConverter.`createDeepCopyParForProgramBlock(ParForProgramBlock pfpb, long pid, int IDPrefix, Program prog, Set<String> fnStack, Set<String> fnCreated, boolean plain, boolean forceDeepCopy)`
`static WhileProgramBlock` ProgramConverter.`createDeepCopyWhileProgramBlock(WhileProgramBlock wpb, long pid, int IDPrefix, Program prog, Set<String> fnStack, Set<String> fnCreated, boolean plain, boolean forceDeepCopy)`
`static ForProgramBlock` ProgramConverter.`createShallowCopyForProgramBlock(ForProgramBlock fpb, Program prog)`
`static String` ProgramConverter.`serializeProgram(Program prog, ArrayList<ProgramBlock> pbs, HashMap<String,byte[]> clsMap)`

### Uses of Program in org.apache.sysds.utils

Methods in org.apache.sysds.utils with parameters of type Program
`static Explain.ExplainCounts` Explain.`countDistributedOperations(Program rtprog)` Counts the number of compiled MRJob/Spark instructions in the given runtime program.
`static String` Explain.`display(DMLProgram prog, Program rtprog, Explain.ExplainType type, Explain.ExplainCounts counts)`
`static String` Explain.`explain(DMLProgram prog, Program rtprog, Explain.ExplainType type)`
`static String` Explain.`explain(DMLProgram prog, Program rtprog, Explain.ExplainType type, Explain.ExplainCounts counts)`
`static String` Explain.`explain(Program rtprog)`
`static String` Explain.`explain(Program rtprog, Explain.ExplainCounts counts)`