org.problets.domain.model.control.abstraction
Class StatementSequence

java.lang.Object
  extended by org.problets.domain.model.DomainModel
      extended by org.problets.domain.model.control.ControlModel
          extended by org.problets.domain.model.control.abstraction.Scope
              extended by org.problets.domain.model.control.abstraction.StatementSequence
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
Block

public class StatementSequence
extends Scope

Processes a sequence of statements which are NOT enclosed in braces, creates activation record for them. Does not automatically end scope upon exiting.

Author:
Amruth Kumar

Field Summary
 
Fields inherited from class org.problets.domain.model.control.abstraction.Scope
IDENTITY, MISPLACED_BREAK, MISPLACED_CONTINUE
 
Fields inherited from class org.problets.domain.model.control.ControlModel
ABORT_EXECUTION, BREAK_EXECUTION, CONTINUE_EXECUTION, END_EXECUTION, INFINITE_EXECUTION, RETURN_EXECUTION, RUN_TIME_ERROR_EXECUTION, SKIP_EXECUTION
 
Fields inherited from class org.problets.domain.model.DomainModel
BOOLEAN, BREAKPOINT, CHARACTER, DOUBLE_PRECISION_REAL, ERROR_TYPE, EVAL_STATUS, expACTION, expASSIGNMENT, expAUTO_DEALLOCATION, expCALL, expCONDITION, expDECLARATION, expDEREFERENCING, expDYNAMIC_ALLOCATION, expDYNAMIC_ALLOCATION_INITIALIZATION, expDYNAMIC_DEALLOCATION, expELSE_CLAUSE, expERROR, expEXECUTION, expIF_CLAUSE, expINITIALIZATION, expINPUT, expPARAMETER_PASSING, expPRINT, expQUESTIONABLE, expREFERENCING, expRETURN, expRUNTIME_ERROR, expSEMANTIC_ERROR, expSYNTAX_ERROR, expUPDATE, MAX_OBJECT_IDENTITY, MIN_OBJECT_IDENTITY, QUADRUPLE_PRECISION_REAL, RUNTIME_ERROR, SEMANTIC_ERROR, SIGNED_INTEGER, SIGNED_LONG, SIGNED_SHORT, SINGLE_PRECISION_REAL, SYNTAX_ERROR, UNDEFINED_TYPE, UNSIGNED_INTEGER, UNSIGNED_LONG, UNSIGNED_SHORT, WARNING
 
Constructor Summary
StatementSequence(ActivationRecord parentActivationRecord, HeapModel heap, java.lang.String inTemplate)
           
 
Method Summary
 ExecutionStatus explainProcess(RunEnv runEnv, Behavior behavior, boolean stepFlag)
          public void explainProcess(Vector explanation, Vector errors, int lineNumber); Generate the explanation for the control object
 void getCode(java.util.Vector codeText, OutputStream output)
          public void getCode(Vector codeText, String template, int lineNumber); Generate the code for the control object
static void main(java.lang.String[] args)
           
 
Methods inherited from class org.problets.domain.model.control.abstraction.Scope
getActivationRecord, getParameterCode, getPossibleErrors, newFunctionCall
 
Methods inherited from class org.problets.domain.model.control.ControlModel
getCodeLength, getName, getStartLineNumber
 
Methods inherited from class org.problets.domain.model.DomainModel
clone, getId, getIdName, grade
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatementSequence

public StatementSequence(ActivationRecord parentActivationRecord,
                         HeapModel heap,
                         java.lang.String inTemplate)
Method Detail

getCode

public void getCode(java.util.Vector codeText,
                    OutputStream output)
Description copied from class: ControlModel
public void getCode(Vector codeText, String template, int lineNumber); Generate the code for the control object

Overrides:
getCode in class ControlModel
Parameters:
codeText - - a Vector that holds the code

explainProcess

public ExecutionStatus explainProcess(RunEnv runEnv,
                                      Behavior behavior,
                                      boolean stepFlag)
Description copied from class: ControlModel
public void explainProcess(Vector explanation, Vector errors, int lineNumber); Generate the explanation for the control object

Overrides:
explainProcess in class ControlModel
Returns:
status of execution, as designated by constants in DomainModel

main

public static void main(java.lang.String[] args)