# Uses of Class
org.apache.sysds.parser.DMLProgram

Packages that use DMLProgram
Package
Description
org.apache.sysds.api.mlcontext
org.apache.sysds.hops.codegen
org.apache.sysds.hops.fedplanner
org.apache.sysds.hops.ipa
org.apache.sysds.hops.rewrite
org.apache.sysds.lops.rewrite
org.apache.sysds.parser
org.apache.sysds.parser.dml
org.apache.sysds.resource
org.apache.sysds.runtime.compress.workload
org.apache.sysds.runtime.controlprogram
org.apache.sysds.runtime.controlprogram.parfor.opt
org.apache.sysds.utils

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

Methods in org.apache.sysds.api.mlcontext that return DMLProgram
Modifier and Type
Method
Description
`DMLProgram`
ScriptExecutor.`getDmlProgram()`
Obtain the program

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

Methods in org.apache.sysds.hops.codegen with parameters of type DMLProgram
Modifier and Type
Method
Description
`static void`
SpoofCompiler.`generateCode(DMLProgram dmlprog)`

## Uses of DMLProgram in org.apache.sysds.hops.fedplanner

Methods in org.apache.sysds.hops.fedplanner with parameters of type DMLProgram
Modifier and Type
Method
Description
`static FederatedMemoTable.FedPlan`
FederatedPlanCostEnumerator.`enumerateProgram(DMLProgram prog, FederatedMemoTable memoTable, boolean isPrint)`
Enumerates the entire DML program to generate federated execution plans.
`static void`
FederatedPlanCostEnumerator.`enumerateStatementBlock(StatementBlock sb, DMLProgram prog, FederatedMemoTable memoTable, Map<Long,FederatedMemoTable.HopCommon> hopCommonTable, Map<Long,List<Hop>> rewireTable, Map<Long,FTypes.Privacy> privacyConstraintMap, Map<Long,FTypes.FType> fTypeMap, Set<Long> unRefTwriteSet, Set<String> fnStack, int numOfWorkers, Set<Long> visitedHops)`
Enumerates the statement block and updates the transient and memoization tables.
`static void`
FederatedPlanRewireTransTable.`rewireProgram(DMLProgram prog, Map<Long,List<Hop>> rewireTable, Map<Long,FederatedMemoTable.HopCommon> hopCommonTable, Map<Long,FTypes.Privacy> privacyConstraintMap, Map<Long,FTypes.FType> fTypeMap, List<org.apache.commons.lang3.tuple.Pair<FederatedRange,FederatedData>> fedMap, Set<Long> unRefTwriteSet, Set<Long> unRefSet, Set<Hop> progRootHopSet)`
`static Map<String,List<Hop>>`
FederatedPlanRewireTransTable.`rewireStatementBlock(StatementBlock sb, DMLProgram prog, Set<Long> visitedHops, Map<Long,List<Hop>> rewireTable, Map<Long,FederatedMemoTable.HopCommon> hopCommonTable, List<Map<String,List<Hop>>> outerTransTableList, Map<String,List<Hop>> formerTransTable, Map<Long,FTypes.Privacy> privacyConstraintMap, Map<Long,FTypes.FType> fTypeMap, List<org.apache.commons.lang3.tuple.Pair<FederatedRange,FederatedData>> fedMap, Set<Long> unRefTwriteSet, Set<Long> unRefSet, Set<Hop> progRootHopSet, Set<String> fnStack, double computeWeight, double networkWeight, List<org.apache.commons.lang3.tuple.Pair<Long,Double>> parentLoopStack)`
`abstract void`
AFederatedPlanner.`rewriteProgram(DMLProgram prog, FunctionCallGraph fgraph, FunctionCallSizeInfo fcallSizes)`
Selects a federated execution plan for the given program by setting the forced execution type.
`void`
FederatedPlannerFedAll.`rewriteProgram(DMLProgram prog, FunctionCallGraph fgraph, FunctionCallSizeInfo fcallSizes)`
`void`
FederatedPlannerFedCostBased.`rewriteProgram(DMLProgram prog, FunctionCallGraph fgraph, FunctionCallSizeInfo fcallSizes)`

## Uses of DMLProgram in org.apache.sysds.hops.ipa

Methods in org.apache.sysds.hops.ipa with parameters of type DMLProgram
Modifier and Type
Method
Description
`abstract boolean`
IPAPass.`rewriteProgram(DMLProgram prog, FunctionCallGraph fgraph, FunctionCallSizeInfo fcallSizes)`
Rewrites the given program or its functions in place, with access to the read-only function call graph.
`boolean`
IPAPassApplyStaticAndDynamicHopRewrites.`rewriteProgram(DMLProgram prog, FunctionCallGraph fgraph, FunctionCallSizeInfo fcallSizes)`
`boolean`
IPAPassCompressionWorkloadAnalysis.`rewriteProgram(DMLProgram prog, FunctionCallGraph fgraph, FunctionCallSizeInfo fcallSizes)`
`boolean`
IPAPassEliminateDeadCode.`rewriteProgram(DMLProgram prog, FunctionCallGraph fgraph, FunctionCallSizeInfo fcallSizes)`
`boolean`
IPAPassFlagFunctionsRecompileOnce.`rewriteProgram(DMLProgram prog, FunctionCallGraph fgraph, FunctionCallSizeInfo fcallSizes)`
`boolean`
IPAPassFlagLoopsRecompileOnce.`rewriteProgram(DMLProgram prog, FunctionCallGraph fgraph, FunctionCallSizeInfo fcallSizes)`
`boolean`
IPAPassFlagNonDeterminism.`rewriteProgram(DMLProgram prog, FunctionCallGraph fgraph, FunctionCallSizeInfo fcallSizes)`
`boolean`
IPAPassForwardFunctionCalls.`rewriteProgram(DMLProgram prog, FunctionCallGraph fgraph, FunctionCallSizeInfo fcallSizes)`
`boolean`
IPAPassInjectOOCTee.`rewriteProgram(DMLProgram prog, FunctionCallGraph fgraph, FunctionCallSizeInfo fcallSizes)`
`boolean`
IPAPassInlineFunctions.`rewriteProgram(DMLProgram prog, FunctionCallGraph fgraph, FunctionCallSizeInfo fcallSizes)`
`boolean`
IPAPassPropagateReplaceLiterals.`rewriteProgram(DMLProgram prog, FunctionCallGraph fgraph, FunctionCallSizeInfo fcallSizes)`
`boolean`
IPAPassPruneUnreachableHops.`rewriteProgram(DMLProgram prog, FunctionCallGraph fgraph, FunctionCallSizeInfo fcallSizes)`
`boolean`
IPAPassRemoveConstantBinaryOps.`rewriteProgram(DMLProgram prog, FunctionCallGraph fgraph, FunctionCallSizeInfo fcallSizes)`
`boolean`
IPAPassRemoveUnnecessaryCheckpoints.`rewriteProgram(DMLProgram prog, FunctionCallGraph fgraph, FunctionCallSizeInfo fcallSizes)`
`boolean`
IPAPassRemoveUnusedFunctions.`rewriteProgram(DMLProgram prog, FunctionCallGraph fgraph, FunctionCallSizeInfo fcallSizes)`
`boolean`
IPAPassReplaceEvalFunctionCalls.`rewriteProgram(DMLProgram prog, FunctionCallGraph fgraph, FunctionCallSizeInfo fcallSizes)`
`boolean`
IPAPassRewriteFederatedPlan.`rewriteProgram(DMLProgram prog, FunctionCallGraph fgraph, FunctionCallSizeInfo fcallSizes)`
Estimates cost and selects a federated execution plan by setting the federated output value of each hop in the program.
Constructors in org.apache.sysds.hops.ipa with parameters of type DMLProgram
Modifier
Constructor
Description
``
`FunctionCallGraph(DMLProgram prog)`
Constructs the function call graph for all functions reachable from the main program.
``
`InterProceduralAnalysis(DMLProgram dmlp)`
Creates a handle for performing inter-procedural analysis for a given DML program and its associated HOP DAGs.

## Uses of DMLProgram in org.apache.sysds.hops.rewrite

Methods in org.apache.sysds.hops.rewrite with parameters of type DMLProgram
Modifier and Type
Method
Description
`static boolean`
HopRewriteUtils.`knownParamservFunctions(Hop hop, DMLProgram prog)`
`ProgramRewriteStatus`
ProgramRewriter.`rewriteProgramHopDAGs(DMLProgram dmlp)`
`ProgramRewriteStatus`
ProgramRewriter.`rewriteProgramHopDAGs(DMLProgram dmlp, boolean splitDags)`
`ProgramRewriteStatus`
ProgramRewriter.`rewriteProgramHopDAGs(DMLProgram dmlp, boolean splitDags, ProgramRewriteStatus state)`

## Uses of DMLProgram in org.apache.sysds.lops.rewrite

Methods in org.apache.sysds.lops.rewrite with parameters of type DMLProgram
Modifier and Type
Method
Description
`void`
LopRewriter.`rewriteProgramLopDAGs(DMLProgram dmlp)`

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

Methods in org.apache.sysds.parser that return DMLProgram
Modifier and Type
Method
Description
`DMLProgram`
StatementBlock.`getDMLProg()`
`abstract DMLProgram`
ParserWrapper.`parse(String fileName, String dmlScript, Map<String,String> argVals)`
Methods in org.apache.sysds.parser with parameters of type DMLProgram
Modifier and Type
Method
Description
`void`
DMLTranslator.`codgenHopsDAG(DMLProgram dmlp)`
`void`
DMLTranslator.`constructHops(DMLProgram dmlp)`
`void`
DMLTranslator.`constructHops(DMLProgram dmlp, boolean inclFuns)`
`void`
DMLTranslator.`constructLops(DMLProgram dmlp)`
`Program`
DMLTranslator.`getRuntimeProgram(DMLProgram prog, DMLConfig config)`
`boolean`
StatementBlock.`isMergeableFunctionCallBlock(DMLProgram dmlProg)`
`boolean`
StatementBlock.`isRewritableFunctionCall(Statement stmt, DMLProgram dmlProg)`
`void`
DMLTranslator.`liveVariableAnalysis(DMLProgram dmlp)`
`void`
DMLTranslator.`liveVariableAnalysis(DMLProgram dmlp, boolean inclFuns)`
`void`
DMLTranslator.`liveVariableAnalysisFunction(DMLProgram dmlp, FunctionStatementBlock fsb)`
`static ArrayList<StatementBlock>`
StatementBlock.`mergeFunctionCalls(List<StatementBlock> body, DMLProgram dmlProg)`
`static void`
DMLTranslator.`refreshMemEstimates(DMLProgram dmlp)`
`static void`
DMLTranslator.`resetHopsDAGVisitStatus(DMLProgram dmlp)`
`void`
DMLTranslator.`resetLopsDAGVisitStatus(DMLProgram dmlp)`
`ArrayList<Statement>`
StatementBlock.`rewriteFunctionCallStatements(DMLProgram dmlProg, ArrayList<Statement> statements)`
`void`
DMLTranslator.`rewriteHopsDAG(DMLProgram dmlp)`
`void`
DMLTranslator.`rewriteLopDAG(DMLProgram dmlp)`
`static Expression`
StatementBlock.`rHoistFunctionCallsFromExpressions(Expression expr, boolean root, ArrayList<Statement> tmp, DMLProgram prog)`
`static List<StatementBlock>`
StatementBlock.`rHoistFunctionCallsFromExpressions(StatementBlock current, DMLProgram prog)`
`static List<Statement>`
StatementBlock.`rHoistFunctionCallsFromExpressions(Statement stmt, DMLProgram prog)`
`void`
StatementBlock.`setDMLProg(DMLProgram dmlProg)`
`VariableSet`
ForStatementBlock.`validate(DMLProgram dmlProg, VariableSet ids, HashMap<String,ConstIdentifier> constVars, boolean conditional)`
`VariableSet`
FunctionStatementBlock.`validate(DMLProgram dmlProg, VariableSet ids, HashMap<String,ConstIdentifier> constVars, boolean conditional)`
TODO: DRB: This needs to be changed to reflect: 1) Default values for variables -- need to add R styled check here to make sure that once vars with default values start, they keep going to the right 2) The other parameters for External Functions
`VariableSet`
IfStatementBlock.`validate(DMLProgram dmlProg, VariableSet ids, HashMap<String,ConstIdentifier> constVars, boolean conditional)`
`VariableSet`
ParForStatementBlock.`validate(DMLProgram dmlProg, VariableSet ids, HashMap<String,ConstIdentifier> constVars, boolean conditional)`
`VariableSet`
StatementBlock.`validate(DMLProgram dmlProg, VariableSet ids, HashMap<String,ConstIdentifier> constVars, boolean conditional)`
`VariableSet`
WhileStatementBlock.`validate(DMLProgram dmlProg, VariableSet ids, HashMap<String,ConstIdentifier> constVars, boolean conditional)`
`void`
FunctionCallIdentifier.`validateExpression(DMLProgram dmlp, HashMap<String,DataIdentifier> ids, HashMap<String,ConstIdentifier> constVars, boolean conditional)`
Validate parse tree : Process ExtBuiltinFunction Expression is an assignment statement NOTE: this does not override the normal validateExpression because it needs to pass dmlp!
`void`
DMLTranslator.`validateFunction(DMLProgram dmlp, FunctionStatementBlock fsb)`
`void`
DMLTranslator.`validateFunction(DMLProgram dmlp, FunctionStatementBlock fsb, boolean conditional)`
`void`
DMLTranslator.`validateParseTree(DMLProgram dmlp)`
`void`
DMLTranslator.`validateParseTree(DMLProgram dmlp, boolean inclFuns)`
Constructors in org.apache.sysds.parser with parameters of type DMLProgram
Modifier
Constructor
Description
``
`DMLTranslator(DMLProgram dmlp)`

## Uses of DMLProgram in org.apache.sysds.parser.dml

Methods in org.apache.sysds.parser.dml that return DMLProgram
Modifier and Type
Method
Description
`DMLProgram`
DMLParserWrapper.`doParse(String fileName, String dmlScript, String sourceNamespace, Map<String,String> argVals)`
This function is supposed to be called directly only from DmlSyntacticValidator when it encounters 'import'
`DMLProgram`
DMLParserWrapper.`parse(String fileName, String dmlScript, Map<String,String> argVals)`
Parses the passed file with command line parameters.

## Uses of DMLProgram in org.apache.sysds.resource

Methods in org.apache.sysds.resource with parameters of type DMLProgram
Modifier and Type
Method
Description
`static void`
ResourceCompiler.`replaceFilename(DMLProgram dmlp, HashMap<String,String> replaceVars)`

## Uses of DMLProgram in org.apache.sysds.runtime.compress.workload

Methods in org.apache.sysds.runtime.compress.workload with parameters of type DMLProgram
Modifier and Type
Method
Description
`static Map<Long,WTreeRoot>`
WorkloadAnalyzer.`getAllCandidateWorkloads(DMLProgram prog)`

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

Methods in org.apache.sysds.runtime.controlprogram that return DMLProgram
Modifier and Type
Method
Description
`DMLProgram`
Program.`getDMLProg()`
Methods in org.apache.sysds.runtime.controlprogram with parameters of type DMLProgram
Modifier and Type
Method
Description
`void`
Program.`setDMLProg(DMLProgram prog)`
Constructors in org.apache.sysds.runtime.controlprogram with parameters of type DMLProgram
Modifier
Constructor
Description
``
`Program(DMLProgram prog)`

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

Methods in org.apache.sysds.runtime.controlprogram.parfor.opt with parameters of type DMLProgram
Modifier and Type
Method
Description
`static LocalVariableMap`
ProgramRecompiler.`getReusableScalarVariables(DMLProgram prog, StatementBlock parforSB, LocalVariableMap vars)`
`static boolean`
ProgramRecompiler.`isApplicableForReuseVariable(DMLProgram prog, StatementBlock parforSB, String var)`
This function determines if an parfor input variable is guaranteed to be read-only across multiple invocations of parfor optimization (e.g., in a surrounding while loop).
`void`
OptTreePlanMapping.`putRootProgram(DMLProgram prog, Program rtprog)`

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

Methods in org.apache.sysds.utils with parameters of type DMLProgram
Modifier and Type
Method
Description
`static String`
Explain.`display(DMLProgram prog, Program rtprog, Explain.ExplainType type, Explain.ExplainCounts counts)`
`static String`
Explain.`explain(DMLProgram prog)`
`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)`