## 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.resource
org.apache.sysds.resource.cost
org.apache.sysds.resource.enumeration
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.resource

Methods in org.apache.sysds.resource that return Program
`static Program` ResourceCompiler.`compile​(String filePath, Map<String,​String> args)`
`static Program` ResourceCompiler.`compile​(String filePath, Map<String,​String> args, HashMap<String,​String> replaceVars)`
`static Program` ResourceCompiler.`doFullRecompilation​(Program program)` Recompiling a given program for resource optimization.

Methods in org.apache.sysds.resource with parameters of type Program
`static Program` ResourceCompiler.`doFullRecompilation​(Program program)` Recompiling a given program for resource optimization.

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

Methods in org.apache.sysds.resource.cost with parameters of type Program
`static double` CostEstimator.`estimateExecutionTime​(Program program, CloudInstance driverNode, CloudInstance executorNode)` Entry point for estimating the execution time of a program.

Constructors in org.apache.sysds.resource.cost with parameters of type Program
`CostEstimator​(Program program, CloudInstance driverNode, CloudInstance executorNode)`

### Uses of Program in org.apache.sysds.resource.enumeration

Methods in org.apache.sysds.resource.enumeration with parameters of type Program
`static TreeSet<Long>` InterestBasedEnumerator.`getMemoryEstimates​(Program currentProgram, boolean outputOnly, double memoryFactor)` Extracts the memory estimates which original size is larger than `MINIMUM_RELEVANT_MEM_ESTIMATE`
`static boolean` PruneBasedEnumerator.`hasSparkInstructions​(Program program)` Checks for Spark instruction in the given runtime program.
`Enumerator.Builder` Enumerator.Builder.`withRuntimeProgram​(Program program)`

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

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

Constructors in org.apache.sysds.runtime.controlprogram with parameters of type Program
`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, boolean allocateLineage, Program prog, Types.ExecMode mode)`
`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` OptTreePlanMapping.`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)`