Module Simula

Class ActivationStatement


public final class ActivationStatement extends Statement
Activation Statement.
 
 Simula Standard: 12.2 Activation statement
 
   activation-statement = activator  object-expression [ scheduling-part ]
 
      activator = ACTIVATE | REACTIVATE

      scheduling-part = AT arithmetic-expression [ PRIOR ]
                      | DELAY arithmetic-expression [ PRIOR ]
                      | BEFORE object-expression
                      | AFTER object-expression
                      
                      
                      
 The activation statement is defined by the procedure ACTIVAT in Simula Standard.
 In this implementation we use a set of methods for the same purpose:
 
   activate x;                      ==> ActivateDirect(false,x);
   activate x delay 1.34;           ==> ActivateDelay(false,x,1.34f,false);
   activate x delay 1.34 prior;     ==> ActivateDelay(false,x,1.34f,true);
   activate x at 13.7;              ==> ActivateAt(false,x,13.7f,false);
   activate x at 13.7 prior;        ==> ActivateAt(false,x,13.7f,true);
   activate x before y;             ==> ActivateBefore(false,x,y);
   activate x after y;              ==> ActivateAfter(false,x,y);
   
   reactivate x;                    ==> ActivateDirect(true,x);
   reactivate x delay 1.34;         ==> ActivateDelay(true,x,1.34f,false);
   reactivate x delay 1.34 prior;   ==> ActivateDelay(true,x,1.34f,true);
   reactivate x at 13.7;            ==> ActivateAt(true,x,13.7f,false);
   reactivate x at 13.7 prior;      ==> ActivateAt(true,x,13.7f,true);
   reactivate x before y;           ==> ActivateBefore(true,x,y);
   reactivate x after y;            ==> ActivateAfter(true,x,y);
   
 See runtime module RTS_Simulation for details.  
 
Link to GitHub: Source File.
Author:
SIMULA Standards Group, Øystein Myhre Andersen
  • Field Details

    • REAC

      private final boolean REAC
      Indicates reactivation when true, otherwise activation.
    • object1

      private Expression object1
      First object-expression in activation statement.
    • object2

      private Expression object2
      Second object-expression in activation statement.
    • time

      private Expression time
      The AT time expression.
    • prior

      private Boolean prior
      Indicates that PRIOR is present in the activation statement.
    • code

      The activation code
  • Constructor Details

    • ActivationStatement

      ActivationStatement(int line)
      Create a new ActivationStatement.
      Parameters:
      line - the source line number
  • Method Details

    • doChecking

      public void doChecking()
      Description copied from class: SyntaxClass
      Perform semantic checking.

      This must be redefined in every subclass.

      Overrides:
      doChecking in class SyntaxClass
    • toJavaCode

      public String toJavaCode()
      Description copied from class: SyntaxClass
      Generate Java code for this Syntax Class.
      Overrides:
      toJavaCode in class SyntaxClass
      Returns:
      Java code
    • edActivateDirect

      private String edActivateDirect()
      Edit direct (re)activation
      Returns:
      the resulting Java source code
    • edActivateAt

      private String edActivateAt()
      Edit (Re)Activate Process AT ...
      Returns:
      the resulting Java source code
    • edActivateDelay

      private String edActivateDelay()
      Edit (Re)Activate Process DELAY ...
      Returns:
      the resulting Java source code
    • edActivateBefore

      private String edActivateBefore()
      Edit (Re)Activate Process BEFORE ...
      Returns:
      the resulting Java source code
    • edActivateAfter

      private String edActivateAfter()
      Edit (Re)Activate Process AFTER ...
      Returns:
      the resulting Java source code
    • printTree

      public void printTree(int indent)
      Description copied from class: SyntaxClass
      Utility print syntax tree method.
      Overrides:
      printTree in class SyntaxClass
      Parameters:
      indent - number of spaces leading the lines
    • toString

      public String toString()
      Overrides:
      toString in class Object