Google
 

Trailing-Edge - PDP-10 Archives - decuslib20-03 - decus/20-0078/maint/tdi.mem
There is 1 other file named tdi.mem in the archive. Click here to see a list.











                               CHAPTER 1

          SIMULA FOR DEC SYSTEM 10             TD, SYSTEM DESC
SIMULA FOR DEC SYSTEM 10             TD, SYSTEM DESC             I.1-1

740911    780302      6                           Olof Bjorner








I       SYSTEM DESCRIPTION
        ------------------


I	INTRODUCTION


I.1.1	Background
        ----------

        SIMULA (earlier called SIMULA 67 to be  distinguished  from  its
        precursor  SIMULA  I)  is  a  powerful  high  level  programming
        language which contains Algol 60 as a subset.  It was  conceived
        at  the  Norwegian  Computing  Centre  (NCC) in Oslo and defined
        during 1966 and 1967.  In 1974,  when  DECsystem-10  SIMULA  was
        initiated,  SIMULA implementations existed on CDC, IBM, Iris and
        Univac computers and  several  implementations  have  been  made
        since  then  (up  to  1978).   SIMULA  has facilities for string
        manipulation (TEXT), list manipulation (reference variables  and
        classes,  standard  class  SIMSET) and discrete event simulation
        (standard class SIMULATION).  The  defining  documents  are  the
        revised  Algol  60  report  and the Common Base Language report,
        published by NCC.

        The DECsystem-10 SIMULA system was designed and implemented  for
        the installation at the Stockholm Data Centre (QZ) in Stockholm.
        This data centre is used for interactive program development and
        interactive  simulation  studies by the Swedish National Defence
        Research Institute (FOA), and for research and education at  the
        universities  in  the  Stockholm area.  The installation is also
        available to commercial customers.

        In connection with the procurement of the DECsystem-10 computer,
        FOA  decided  that  SIMULA  would  be  the best choice for their
        applications.  FOA already used, and  had  parcipitated  in  the
        development of, SIMULA for IBM 360/370.

        A design study for a SIMULA system was carried out by CAP Ltd in
        Reading,  England.  The result is published as a FOA report, see
        reference documents below.
SIMULA FOR DEC SYSTEM 10             TD, SYSTEM DESC             I.1-2

740911    780302      6                           Olof Bjorner








        The CAP report was used as basis for the actual  implementation,
        which  was  undertaken  as a joint venture involving FOA and the
        swedish software house ENEA DATA (Engmans Elektronik)  ENEA  had
        full   technical   and  economic  project  responsibility.   The
        manpower effort for the main project  included  eight  full-time
        systems  programmers,  five  of them employed by ENEA (including
        the project leader), two FOA employees and one  programmer  from
        QZ.   The  development  time  was 20 months excluding vacations,
        which gives an implementation effort of roughly 14 man-years.

        Following the successful  conclusion  of  the  main  project  in
        December  1975, ENEA kept one man as trouble-shooter for some 18
        months on a service contract.  During the  two  years  1975  and
        1976,  FOA  also hired ENEA to do some work on extensions to the
        system,   notably   error   recovery   at   run-time   and   the
        implementation of HIDDEN-PROTECTED feature for safer programming
        of application packages.  Since the end of the main project, FOA
        has  kept  one  systems  programmer full time on corrections and
        development work.

        The SIMULA system has been tested thoroughly, using a test batch
        consisting  of more than 2000 SIMULA programs from CDC, NCC, KTH
        (Royal Institute of Technology, Stockholm) and FOA.

        During  most  of  the  development  effort,   the   DECsystem-10
        installation  at  QZ  consisted  of  a  KI10  CPU with 128K core
        memory, a drum for swapping, disk packs and the usual peripheral
        equipment  (no card punch).  The SIMULA system is thus developed
        on a  KI10  system  and  does  not  run  unmodified  on  a  KA10
        configuration.   The  present  QZ system is a 1090 system with a
        KL10B CPU, bigger disk packs, no drum.  The SIMULA  system  runs
        unmodified  on  the  KL10  CPU.  Possibly, incompatibilities may
        arise with KI10 installations in the future.  KA10 modifications
        are discussed in section I.7.

        A modification for the DECsystem-20 was made  by  Lars  Enderin,
        FOA,  during  December  1976  and  January 1977 at the DEC Large
        System Group facilities in Marlborough, Mass., USA.  There  have
        not  been  sufficient  funds and manpower available to bring the
        DECsystem-20 version  to  the  same  level  of  reliability  and
        functionality as the DECsystem-10 version, however.
SIMULA FOR DEC SYSTEM 10             TD, SYSTEM DESC             I.1-3

740911    780302      6                           Olof Bjorner








        The DECsystem-10  SIMULA  system  is  written  in  the  MACRO-10
        programming  language  with extensive use of macros and will run
        in a minimum of 25K words of core memory.


I.1.2	Brief system description
        ------------------------

        The  DECsystem-10  SIMULA  system  consists  of  the   following
        subsystems:

        * a three pass compiler

        * a run time system (object time system)

        * an interactive debugging system

        * utility programs and help files

        The SIMULA system runs under the TOPS-10  monitor  from  version
        5.06  and  can be used like any other language processor such as
        FORTRAN.  Modifications have been made in  the  COMPIL  program,
        the  LINK-10  program  and  in  the  SPRINT  program  (for batch
        programs).  These modifications are  described  in  section  I.3
        System  Interface.  A narrative description of the SIMULA system
        is given in section I.2.


I.1.3   Principles and organization of the technical documentation
        ----------------------------------------------------------

        The most important aims of the technical documentation  are  (1)
        to describe the implementations used and (2) to serve as a guide
        in  future   maintenance   and   development.    The   technical
        documentation  is not intended as a text on compiler writing and
        cannot be understood without basic knowledge in compiler writing
        techniques,    programming    languages   (especially   SIMULA),
        DECsystem-10 assembler  language,  monitor  interface  and  time
        sharing usage.

        The contents of the technical documentation are focussed on  the
        overall  design and philosophy of implementation.  More detailed
        information is found in  the  module  documentation.   The  most
        detailed information is found in the source code listings.  Most
        of the documentation for a specific module is thus  included  as
        source  code  comments.   Detailed  flowcharts have been avoided
SIMULA FOR DEC SYSTEM 10             TD, SYSTEM DESC             I.1-4

740911    780302      6                           Olof Bjorner








        since they seldom show the program logic better than the  source
        code  and are difficult to update.  For certain modules, overall
        flowcharts exist which show the general logic.

        The technical documentation is divided into eight main sections:


        I       SYSTEM DESCRIPTION

                Contains information common to the entire SIMULA system.


        II      THE COMPILER
                This section is further divided into three sub-sections,
                one per pass.


        III     THE RUN TIME SYSTEM


        IV      THE DEBUG SYSTEM


        V       UTILITY PROGRAMS


        VI      MODULE DOCUMENTATION


        VII     INDEX


        VIII    SOURCE LISTINGS

                Only the file names are listed in the  main  volumes  of
                the  technical  documentation.   The actual listings are
                obtained by compilation.


I.1.4   Non-technical documentation
        ---------------------------

        The  DECsystem-10  SIMULA   Language   Handbook   contains   all
        information  needed to use the SIMULA system.  Part I contains a
        tutorial description of the SIMULA language.  Part  II  contains
        all  implementation dependent information such as character set,
SIMULA FOR DEC SYSTEM 10             TD, SYSTEM DESC             I.1-5

740911    780302      6                           Olof Bjorner








        run time I/O facilities, etc.  Part III describes the  extensive
        utility  library,  LIBSIM.  All three parts are available as FOA
        reports and as RUNOFF source files and usually as RUNOFF  output
        files (SIMLH1.MAN etc.) ready for printing.

        The DECsystem-10 SIMULA Implementation Guide (created  from  the
        file  SIMIMP.RNM by RUNOFF) contains information on setting up a
        SIMULA system from a distribution tape.


I.1.5	Reference documents
        -------------------

        1.      Dahl, Myhrhaug and Nygaard:
                Common Base Language
                Norwegian Computing Centre, October 1970
                Publication No. S-22

        2.      Revised Report on the Algorithmic Language Algol 60.
                CACM Vol. 6, NO. 1, 1963.

        3.      IBM System/360 SIMULA User's Guide.
                Norwegian Computing Centre 1971.
                Publication No. S-24-0.

        4.      IBM System/360 SIMULA Programmer's Guide.
                Norwegian Computing Centre 1971.
                Publication No. S-23-0.

        5.      DECsystem-10 SIMULA Language Handbook, Part I
                FOA 1 Report No. C8398-M3(E5).

        6.      DECsystem-10 SIMULA Language Handbook, Part II
                FOA 1 Report No. C8399-M3(E5).

        7.      DECsystem-10 SIMULA Language Handbook, Part III
                FOA 1 Report No. C10045-M3(E5).

        8.      DECsystem-10 SIMULA Implementation Guide
                FOA 1 Report No. C8400-M3(E5).











                               CHAPTER 2

          SIMULA FOR DEC SYSTEM 10             TD, SYSTEM DESC
SIMULA FOR DEC SYSTEM 10             TD, SYSTEM DESC             I.2-1

741008    780302      6                           Stefan Arnborg








I.2	NARRATIVE DESCRIPTION

        The objective of the SIMULA system is to implement the  abstract
        computation  process  defined  by  a  SIMULA  source text and to
        provide a large set of support functions.  Among the latter are

          i)    Documentation aids:  program listing and cross reference
                listing.

         ii)    Maintenance  aids:   separate  compilation  of  external
                classes and procedures.

        iii)    Testing aids:  diagnostic information and an interactive
                debug subsystem.

         iv)    Inter-system communication:   File  handling  by  object
                program, procedures written in FORTRAN and MACRO-10.


        The  computation  process  and   the   support   functions   are
        implemented in a straightforward way:

          i)    The SIMULA compiler takes as its main input one or  more
                source  modules  specified  in  its  command string.  If
                there are external  modules  referenced  in  the  source
                module,  the  corresponding  attribute  files  are  also
                input.

         ii)    The computation process defined in the source program is
                translated   to   an   equivalent  OBJECT  PROGRAM  with
                associated control blocks.  If compile  time  errors  or
                warning  conditions  have been detected, diagnostics are
                output  on  the  terminal.   On  request  the   compiler
                produces a program listing with a cross reference table.

        iii)    The object program is output as a REL file, and  if  the
                source  module  was itself a separate class or procedure
                definition, an attribute file (extension  ATR)  is  also
                output.

         iv)    The object program, i.e. REL  files  produced  from  the
                main  program  source module(s) and all external modules
                referred from the  main  module  are  loaded  into  core
                memory  by  the  LINK  program.   LINK also searches the
                SIMULA REL file library SIMLIB and  fetches  subroutines
                referenced   from  the  object  program  modules.   This
SIMULA FOR DEC SYSTEM 10             TD, SYSTEM DESC             I.2-2

741008    780302      6                           Stefan Arnborg








                process creates an executable binary MACHINE PROGRAM  in
                memory  which  can  be  saved by a monitor command as an
                executable program file.

          v)    Before the computation starts, the user may request  the
                interactive  debug package SIMDDT by issuing the REENTER
                command instead of the START command following the  LOAD
                command.   This  causes the self-relocating debug system
                to be loaded into core.  Otherwise,  the  debug  package
                can be loaded after execution starts when it is needed.

         vi)    When the machine program starts  execution,  an  initial
                reentrant  high  segment  (operating  system or run time
                system)  SIMRn2  (n   =   version   number)   containing
                additional  support  routines is fetched from the system
                area.  The execution then proceeds.   The  initial  high
                segment  is  replaced  by  another  high  segment SIMRn1
                containing the most frequent support routines as soon as
                the  initial  execution  phase  is  over.  SIMRn2 may be
                swapped in several times during execution  and  will  be
                replaced  by  SIMRn1 when some other function is needed.
                SIMRn1 and SIMRn2 are collectively named SIMRTS.  It  is
                also  possible  to load SIMRTS with the program (see iv)
                in which  case  no  swapping  in  of  high  segments  is
                necessary.

        vii)    If an illegal condition is detected during execution, an
                appropriate  diagnostic message is written on the user's
                TTY.  The debug package  SIMDDT  then  expects  commands
                issued  by  the  user  to  find  the  cause of the error
                (dumping the values of certain  variables,  etc.).   The
                user  may  continue  execution  after some errors and in
                these cases the line
                TO CONTINUE TYPE PROCEED
                will be typed on the user's TTY after the error message.

        viii)   The debug package SIMDDT is similar in capacity  to  DDT
                but  is entirely source language oriented.  The user may
                specify  breakpoints  and  conditions  for  stopping  at
                breakpoints.   When stopped at a breakpoint the user may
                request type-out of variables and certain system  status
                information,  change  variables  and  proceed  from  the
                current breakpoint.  Unlike DDT,  SIMDDT  cannot  modify
                the   program,   however,   except   for   insertion  of
                breakpoints.
SIMULA FOR DEC SYSTEM 10             TD, SYSTEM DESC             I.2-3

741008    780302      6                           Stefan Arnborg








        Appropriate modifications have been inserted in the  COMPIL  and
        LINK CUSP's so that the entire process above, or part of it, can
        be performed by the monitor commands

        COMPILE, LOAD, EXECUTE and DEBUG.

        Corresponding modifications have been made to the  TOPS-20  EXEC
        processor and to LINK-20.

        The SPRINT processor for batch input streams has  been  modified
        to accept a $SIMULA card.

        The entire  system  is  written  in  MACRO-10  using  a  set  of
        UNIVERSAL  files  which define global constants and macros.  The
        macros facilitate reading and checking of code  and  consist  of
        two  groups.   One  group  of  macros define program structure -
        loops (LOOP, WHILE), conditional  statements  (IF-THEN-ELSE-FI),
        procedure definition and call (PROC, SAVE, RETURN, EPROC, EXEC).
        The other group of macros define  data  access  enabling  record
        fields  to  be  referenced by name only, making sure the correct
        accessing instruction is used independently of the placement  of
        the  field  within  a word and the offset of the word within the
        record.

        The possibility  of  sharing  reentrant  code  via  the  TOPS-10
        monitor  has  been  exploited and most of the code of the SIMULA
        system is located in three sharable compiler high  segments  and
        two run time system high segments.

        Code in the low segment is code generated by the compiler, which
        is  reentrant  as  long  as  no breakpoints are set, and library
        routines of which some are not reentrant.

        The  main  program  is  not  reentrant  since  it  contains  the
        outermost  data  block.   Except  from  any  SIMDDT breakpoints,
        however,  external  modules  created  from   SIMULA   code   are
        reentrant.

        SIMDDT is  self-relocating  and  can  be  executed  anywhere  in
        memory.   The data segments internal to SIMDDT must be writable.
        They should be easy to separate from the program code.
SIMULA FOR DEC SYSTEM 10             TD, SYSTEM DESC               I.2-4

741008    780302      6                           Stefan Arnborg








 +-               -+ 1) 2)                +-               -+  2) -----
 ! DSK-----------+ !                      ! DSK-----------+ !       !
 ! ! ATR file(s) !---+             +------->!  ATR file   ! !       !
 ! +-------------+ ! !             !      ! +-------------+ !       !
 +-               -+ !             !      +-               -+  3)   !
   DSK-----------+   +->EXE----------+    ! DSK/LPT-------+ !       !
   ! SIM file(s) !----->!            !----->!prog listing ! !       !
   +-------------+      !   SIMULA   !    ! +-------------+ !       !
                    +-->!            !--+ +-               -+    COMPILE
   TTY-----------+  !   +------------+  !   DSK-----------+         !
   !  commands   !--+            !      +-->!  REL file   !         !
   +-------------+               !          +-------------+         !
                                 !        +-               -+ 3)    !
                                 !        ! TTY-----------+ !       !
                                 +--------->! diagnostics ! !       !
                                          ! +-------------+ !       !
                                          +-               -+ 3)  -----
   DSK-----------+  primary               ! DSK/LPT-------+ !       !
   ! REL file(s) !--+ input             +-->!  load map   ! !       !
   +-------------+  !                   ! ! +-------------+ !       !
                    !   EXE----------+  ! +-               -+       !
   TTY-----------+  +-->!            !--+   +-------------+         !
   !   commands  !----->!  LINK-10   !----->! machine prog!       LOAD
   +-------------+  +-->!            !--+   ! in core     !         !
                    !   +------------+  !   +-------------+         !
   DSK-----------+  ! library           !   TTY-----------+         !
   !   SIMLIB    !--+ search            +-->! diagnostics !         !
   +-------------+                          +-------------+         !
                        EXE----------+                            -----
                        !   SIMRTS   !      +-------------+         !
   +-------------+      !  operating !      ! user        !         !
   !  user       !      !   system   !  +-->! output(s)   !         !
   !  input(s)   !--+   +------------+  !   +-------------+         !
   +-------------+  !         !!        !                           !
                    !   +------------+  !   DSK-----------+         !
   TTY-----------+  +-->!  machine   !--+   !  user DA    !        RUN
   ! system      !<---->!  program   !<---->!  file(s)    !         !
   ! interface   !      +------------+      +-------------+         !
   ! dialogue    !    +-      !!                            -+ 3)   !
   +-------------+    ! ABS----------+                       !      !
                      ! !  SIMDDT    !      TTY-----------+  !      !
                      ! !  debug     !<---->!   debug     !  !      !
                      ! !  system    !      !   dialogue  !  !      !
                      ! +------------+      +-------------+  !      !
   System overview    +-                                    -+      !
   ---------------                                                -----
   1) If source has external declaration. 2) If source is a global
      class or procedure. 3) Optional.