Module Simula

Class RTS_MAIN_PROGRAM

All Implemented Interfaces:
Runnable

public final class RTS_MAIN_PROGRAM extends RTS_Process
System class MAIN_PROGRAM
  process class MAIN_PROGRAM;
             begin
                while true do detach
             end MAIN PROGRAM;
 
It is desirable that the main component of a simulation model, i.e. the "simulation" block instance, should respond to the sequencing procedures of 12.4 as if it were itself a process object. This is accomplished by having a process object of the class MAIN_PROGRAM as a permanent component of the quasi-parallel system.

The process object represents the main component with respect to the sequencing procedures. Whenever it becomes operative, the PSC (and OSC) immediately enter the main component as a result of the "detach" statement (cf. 7.3.1). The procedure "current" references this process object whenever the main component is active.

A simulation model is initialized by generating the MAIN_PROGRAM object and scheduling an active phase for it at system time zero. Then the PSC proceeds to the first user-defined statement of the "simulation" block.

Link to GitHub: Source File.

Author:
SIMULA Standards Group, Øystein Myhre Andersen
  • Constructor Details

    • RTS_MAIN_PROGRAM

      public RTS_MAIN_PROGRAM(RTS_RTObject SL)
      Create a new _MAIN_PROGRAM.
      Parameters:
      SL - staticLink
  • Method Details

    • _STM

      public RTS_MAIN_PROGRAM _STM()
      Description copied from class: RTS_RTObject
      Method representing the Statements in this Block
      This method is virtual and must be redefined in blocks.
      Overrides:
      _STM in class RTS_Process
      Returns:
      a pointer to this _RTObject
    • toString

      public String toString()
      Description copied from class: RTS_RTObject
      Returns a string representation of the object.
      Overrides:
      toString in class RTS_Process