Class ProgramBlock

    • Field Detail

      • _filename

        public String _filename
      • _beginLine

        public int _beginLine
      • _beginColumn

        public int _beginColumn
      • _endLine

        public int _endLine
      • _endColumn

        public int _endColumn
    • Constructor Detail

      • ProgramBlock

        public ProgramBlock​(Program prog)
    • Method Detail

      • getProgram

        public Program getProgram()
      • setProgram

        public void setProgram​(Program prog)
      • setStatementBlock

        public void setStatementBlock​(StatementBlock sb)
      • setThreadID

        public void setThreadID​(long id)
      • hasThreadID

        public boolean hasThreadID()
      • isThreadID

        public static boolean isThreadID​(long tid)
      • getThreadID

        public long getThreadID()
      • setExitInstruction

        public void setExitInstruction​(Instruction rmVar)
      • getExitInstruction

        public Instruction getExitInstruction()
      • getChildBlocks

        public abstract ArrayList<ProgramBlock> getChildBlocks()
        Get the list of child program blocks if nested; otherwise this method returns null.
        Returns:
        list of program blocks
      • isNested

        public abstract boolean isNested()
        Indicates if the program block is nested, i.e., if it contains other program blocks (e.g., loops).
        Returns:
        true if nested
      • execute

        public abstract void execute​(ExecutionContext ec)
        Executes this program block (incl recompilation if required).
        Parameters:
        ec - execution context
      • executePredicate

        public ScalarObject executePredicate​(ArrayList<Instruction> inst,
                                             Hop hops,
                                             boolean requiresRecompile,
                                             Types.ValueType retType,
                                             ExecutionContext ec)
        Executes given predicate instructions (incl recompilation if required)
        Parameters:
        inst - list of instructions
        hops - high-level operator
        requiresRecompile - true if requires recompile
        retType - value type of the return type
        ec - execution context
        Returns:
        scalar object
      • setBeginLine

        public void setBeginLine​(int passed)
        Specified by:
        setBeginLine in interface ParseInfo
      • setBeginColumn

        public void setBeginColumn​(int passed)
        Specified by:
        setBeginColumn in interface ParseInfo
      • setEndLine

        public void setEndLine​(int passed)
        Specified by:
        setEndLine in interface ParseInfo
      • setEndColumn

        public void setEndColumn​(int passed)
        Specified by:
        setEndColumn in interface ParseInfo
      • printBlockErrorLocation

        public String printBlockErrorLocation()
      • setParseInfo

        public void setParseInfo​(ParseInfo parseInfo)
        Set parse information.
        Parameters:
        parseInfo - parse information, such as beginning line position, beginning column position, ending line position, ending column position, text, and filename