org.apache.sysds.parser

## Class ForStatementBlock

- java.lang.Object
- - org.apache.sysds.parser.LiveVariableAnalysis
  - - org.apache.sysds.parser.StatementBlock
    - - org.apache.sysds.parser.ForStatementBlock

- All Implemented Interfaces:
    ParseInfo
  Direct Known Subclasses:
    ParForStatementBlock

      public class ForStatementBlock
      extends StatementBlock

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ForStatementBlock()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `VariableSet` | `analyze(VariableSet loPassed)`
    `Hop` | `getFromHops()`
    `Lop` | `getFromLops()`
    `Hop` | `getIncrementHops()`
    `Lop` | `getIncrementLops()`
    `ArrayList<String>` | `getInputstoSB()`
    `IterablePredicate` | `getIterPredicate()`
    `Hop` | `getToHops()`
    `Lop` | `getToLops()`
    `VariableSet` | `initializebackwardLV(VariableSet loPassed)`
    `VariableSet` | `initializeforwardLV(VariableSet activeInPassed)` For each statement: gen rule: for each variable read in current statement but not updated in any PRIOR statement, add to gen Handles case where variable both read and updated in same statement (i = i + 1, i needs to be added to gen) kill rule: for each variable updated in current statement but not read in this or any PRIOR statement, add to kill.
    `void` | `performConstantPropagation(HashMap<String,ConstIdentifier> currConstVars)`
    `boolean` | `requiresFromRecompilation()`
    `boolean` | `requiresIncrementRecompilation()`
    `boolean` | `requiresToRecompilation()`
    `void` | `setFromHops(Hop hops)`
    `void` | `setFromLops(Lop lops)`
    `void` | `setIncrementHops(Hop hops)`
    `void` | `setIncrementLops(Lop lops)`
    `void` | `setToHops(Hop hops)`
    `void` | `setToLops(Lop lops)`
    `boolean` | `updatePredicateRecompilationFlags()`
    `VariableSet` | `validate(DMLProgram dmlProg, VariableSet ids, HashMap<String,ConstIdentifier> constVars, boolean conditional)`

    - ### Methods inherited from class org.apache.sysds.parser.StatementBlock

      `addStatement, addStatementBlock, getBeginColumn, getBeginLine, getConstIn, getConstOut, getDMLProg, getEndColumn, getEndLine, getFilename, getHops, getLops, getName, getNumStatements, getOutputNamesofSB, getOutputsofSB, getSBID, getStatement, getStatements, getText, getUpdateInPlaceVars, isMergeableFunctionCallBlock, isNondeterministic, isRewritableFunctionCall, isSplitDag, mergeable, mergeFunctionCalls, mergeStatementBlocks, printBlockErrorLocation, printErrorLocation, printWarningLocation, raiseValidateError, raiseValidateError, requiresRecompilation, rewriteFunctionCallStatements, rHoistFunctionCallsFromExpressions, rHoistFunctionCallsFromExpressions, rHoistFunctionCallsFromExpressions, setBeginColumn, setBeginLine, setDMLProg, setEndColumn, setEndLine, setFilename, setHops, setLops, setNondeterministic, setParseInfo, setSplitDag, setStatementFormatType, setStatementFormatType, setStatements, setText, setUpdateInPlaceVars, toString, updateRecompilationFlag`

    - ### Methods inherited from class org.apache.sysds.parser.LiveVariableAnalysis

      `getGen, getKill, getWarn, liveIn, liveOut, setGen, setKill, setLiveIn, setLiveOut, setReadVariables, setUpdatedVariables, updateLiveVariablesOut, variablesRead, variablesUpdated`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.apache.sysds.parser.ParseInfo

      `ctxAndFilenameToParseInfo`

- - ### Constructor Detail

    - #### ForStatementBlock

          public ForStatementBlock()

  - ### Method Detail

    - #### getIterPredicate

          public IterablePredicate getIterPredicate()

    - #### validate

          public VariableSet validate(DMLProgram dmlProg,
                                      VariableSet ids,
                                      HashMap<String,ConstIdentifier> constVars,
                                      boolean conditional)

      Overrides:
        `validate` in class `StatementBlock`

    - #### initializeforwardLV

          public VariableSet initializeforwardLV(VariableSet activeInPassed)

      Description copied from class: `StatementBlock`
      For each statement: gen rule: for each variable read in current statement but not updated in any PRIOR statement, add to gen Handles case where variable both read and updated in same statement (i = i + 1, i needs to be added to gen) kill rule: for each variable updated in current statement but not read in this or any PRIOR statement, add to kill.
      Overrides:
        `initializeforwardLV` in class `StatementBlock`

    - #### initializebackwardLV

          public VariableSet initializebackwardLV(VariableSet loPassed)

      Overrides:
        `initializebackwardLV` in class `StatementBlock`

    - #### setFromHops

          public void setFromHops(Hop hops)

    - #### setToHops

          public void setToHops(Hop hops)

    - #### setIncrementHops

          public void setIncrementHops(Hop hops)

    - #### getFromHops

          public Hop getFromHops()

    - #### getToHops

          public Hop getToHops()

    - #### getIncrementHops

          public Hop getIncrementHops()

    - #### setFromLops

          public void setFromLops(Lop lops)

    - #### setToLops

          public void setToLops(Lop lops)

    - #### setIncrementLops

          public void setIncrementLops(Lop lops)

    - #### getFromLops

          public Lop getFromLops()

    - #### getToLops

          public Lop getToLops()

    - #### getIncrementLops

          public Lop getIncrementLops()

    - #### getInputstoSB

          public ArrayList<String> getInputstoSB()

      Overrides:
        `getInputstoSB` in class `StatementBlock`

    - #### analyze

          public VariableSet analyze(VariableSet loPassed)

      Overrides:
        `analyze` in class `StatementBlock`

    - #### performConstantPropagation

          public void performConstantPropagation(HashMap<String,ConstIdentifier> currConstVars)

    - #### updatePredicateRecompilationFlags

          public boolean updatePredicateRecompilationFlags()

    - #### requiresFromRecompilation

          public boolean requiresFromRecompilation()

    - #### requiresToRecompilation

          public boolean requiresToRecompilation()

    - #### requiresIncrementRecompilation

          public boolean requiresIncrementRecompilation()

Copyright © 2020 The Apache Software Foundation. All rights reserved.