Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-05 - 43,50337/07/gaz3.rno
There is 1 other file named gaz3.rno in the archive. Click here to see a list.
.title ^^DECsystem-10 SIMULA GAZETTE, NO. 3, VOL. 2, JANUARY 1976
.variable qz q z
.paper size 60,64;.left margin 3;.right margin 61
.NOFILL
.center
DDDD   EEEEE   CCC#
.center
D   D  E      C   C
.center
D   D  EEE    C####
.center
D   D  E      C   C
.center
DDDD   EEEEE   CCC#
.skip 5
.center
#SSSS  Y   Y   SSSS  TTTTT  EEEEE  M   M          1   000#
.center
S       Y Y   S        T    E      MM MM         11  0   0
.center
#SSS     Y     SSS     T    EEE    M M M  -----   1  0   0
.center
#   S    Y        S    T    E      M   M          1  0   0
.center
SSSS     Y    SSSS     T    EEEEE  M   M          1   000#
.skip 5
.center
#SSSS  IIIII  M   M  U   U  L      AAAAA
.center
S        I    MM MM  U   U  L      A   A
.center
#SSS     I    M M M  U   U  L      AAAAA
.center
#   S    I    M   M  U   U  L      A   A
.center
SSSS   IIIII  M   M   UUU   LLLLL  A   A
.skip 5
.center
#GGG   AAAAA  ZZZZZ  EEEEE  TTTTT  TTTTT  EEEEE
.center
G   G  A   A     Z   E        T      T    E####
.center
G      AAAAA    Z    EEE      T      T    EEE##
.center
G  GG  A   A   Z     E        T      T    E####
.center
#GGGG  A   A  ZZZZZ  EEEEE    T      T    EEEEE
.skip 5
.center
NUMBER 3 - VOLUME 2 - JANUARY 1976
.SKIP
.center
Editor: Jacob Palme
.SKIP
.center
Published by the
.center
Swedish National Defense Research Institute
.center
Section 142 (Datalogy)
.center
S-10450 Stockholm 80
.center
SWEDEN
.SKIP
.center

.page
.fill
This Gazette was produced using the RUNOFF system
for layout and text production on a DECsystem-10 computer.
.skip
Printed by the Swedish National Defense Research Institute,
Reproduction section.
.page
.fill
.center
RELEASE 3 OF SIMULA READY NOW
.skip
The SIMULA maintenance group at the Swedish National Defense
Research Institute and the Swedish software house ENEA have
prepared release 3 of DECsystem-10 SIMULA. About twenty bugs have
been corrected and a large number of new facilities have been
added.
.skip
The new facilities were prepared in close cooperation
with the SIMULA DEVELOPMENT GROUP which consists of representatives
for all SIMULA implementations on different computers. We thus
hope to ensure transportability of SIMULA programs between
computers of different make.
.skip
The work was mainly done by Lars Enderin, Reidar Karlsson,
Mats Ohlin, Jacob Palme and Ingrid Wennerstr`m.
.p 0,2,10;.center
NEW FACILITY FOR MODULE PROTECTION
.skip
To ensure reliability of a large program, it is important
to divide the program into modules with a well-defined and well-protected
interface between the modules.
This is especially important if different modules are written by
different programmers or by the same programmer at different times.
.skip
The HIDDEN-PROTECTED feature of SIMULA is such a device. It makes it
possible to write a separately compiled CLASS in such a way that
the CLASS can only be accessed from other modules through a few
well-protected gateways.
.skip
HIDDEN-PROTECTED is described fully in appendix A.
.p 0,2,10;.center
NEW FACILITIES IN SIMDDT
.skip
A number of useful new features have been added to the SIMULA
Debugging System (SIMDDT). You can now look at more
information easier using SIMDDT.
The new facilities are described in Appendix B.
.p 0,2,10;.center
A LIBRARY OF UTILITY PROGRAMS
.skip
A library of separately compiled CLASSes and PROCEDUREs is
now available for SIMULA programmers. Some examples of what
you can find in the package:
.left margin 5
.skip;.indent -2
>#An improved version of the SAFEIO package for safe
conversational terminal interface.
.skip;.indent -2
>#Utility routines for inserting a help facility into 
the conversational terminal communication, where the appropriate
help message at each point in the program can be selected from
a file containing several help messages.
.skip;.indent -2
>#Routines for accessing date, time etc.
.skip;.indent -2
>#Routines to allow the writing of real-time programs in SIMULA
(e.g_. programs which can communicate simultaneously
with more than one user terminal.)
.skip;.indent -2
>#Routines for binary (un-formatted) i/o.
.skip;.indent -2
>#Routines for record-oriented i/o.
.skip;.indent -2
>#Routines for file handling.
.skip;.indent -2
>#A utility package of routines for character string (TEXT) handling.
with routines for searching, splitting, concatenating, hashing etc_. on
TEXTs.
.skip;.indent -2
>#Routines for in-core sorting and summation.
.paper size 60,64;.left margin 3;.right margin 61
.skip
More information about the utility program library is
given in appendix C and in the DECsystem-10 SIMULA Language Handbook
part III.
.p 0,2,10;.center
BETTER FACILITY FOR LONG TEXT CONSTANTS
.skip
You can now end a TEXT constant with " on one line and continue
with " on the next line, e.g_.:
.skip
#####outtext("this is a"
.break
#####" multi-line text constant");
.skip
This eliminates the previous problems with significant blanks
at the end of lines, which are easy to remove by mistake.
.p 0,2,10;.center
TOPS-10 MONITOR SIMULATED IN SIMULA
.skip
Rollins Turner at DEC in Maynard has written a simulation
program for the TOPS-10 monitor on the DECsystem-10,
using SIMULA. The model takes a transcript of user
interactions from an actual system as its input.
It accepts values for hardware and software parameters,
and simulates the processing of a stream of requests.
.skip
The model can e.g_. be used to compare the value of getting
more core or more swapping disks without actually getting
the new hardware.
.p 0,2,10;.center
SIMULA EVALUATED BY DEC
.skip
Turner has also made an evaluation of SIMULA for DEC.
Here are some quotations from his evaluation:
.skip
"I am convinced that SIMULA is an excellent product..."
.skip
"I found the textbook, SIMULA BEGIN, fairly good. There is
a lot of room for improvement, but it is as good as any similar
book I have studied..."
.skip
"I found that the compiler works exactly as advertised..."
.skip
"Compilations were quite fast..."
.skip
"The flow of control during execution is not at all obvious
from the source code. The control structures available in SIMULA
allows you to write code that is much closer in form to the
processes being modeled. I believe that this is a very important
advantage of SIMULA, but it does create some difficulty
for the novice."
.skip
"The error diagnostics produced by the SIMULA compiler were adequate..."
.skip
"The run time error detection and general security features of the
language were incredibly good. While I made a number of errors in
logic and control, in no case did a program run wild. Each time
an absurd situation came up, the run time system caught it and
gave me an error message that lead directly to the cause of the
problem."
.skip
"The interactive debugging facility in SIMULA, SIMDDT, seems
adequate but not outstanding."
.skip
"CONCLUSIONS: I am now a SIMULA fan..."
.p 0,2,10;.center
SIMDBM WILL BE DISTRIBUTED WITH RELEASE 3
.skip
The distribution tape for DECsystem-10 SIMULA release 3 will
contain the CODASYL-type DBMS system SIMDBM, which is written
entirely in SIMULA.
.p 0,2,10;.center
NEW MANUALS
.skip
Two new manuals on DECsystem-10 SIMULA will soon be
ready. One is part III of the DECsystem-10 SIMULA Language
Handbook, which will describe the utility program library in
more detail than in appendix C to this gazette.
The other is the DECsystem-10 SIMULA Reference card,
a concise compilation of the most important reference
information necessary when writing SIMULA programs on
the DECsystem-10.
.p 0,2,10;.center
DEMO PROGRAMS ON THE DISTRIBUTION TAPE
.skip
The distribution tape for Release 3 of SIMULA will contain
a few demonstration programs which can be used to illustrate
SIMULA to interested people. The programs are described in
DEMO.HLP, their names are QASETE.SIM, STAT1E.SIM, STAT2E.SIM
and STATEX.RNO.
.p 0,2,10;.center
TEXT EDITOR WRITTEN IN SIMULA
.skip
At the duPont laboratories in Wilmington, Delaware, a text editor
is being converted from PL/I to SIMULA.
.p 0,2,10;.center
NOW 52 INSTALLATIONS OF DECSYSTEM-10 SIMULA
.skip
The DECsystem-10 SIMULA system has now been delivered
to 52 computer installations. We hope that you have all
successfully implemented the system and that it is working.
.p 0,2,10;.center
HOW TO ORDER THE NEW RELEASE OF SIMULA
.skip
Copies of the new release and manuals can be ordered either
from the Swedish National Defense Research Institute or from
the DECUS Library. If you write to the DECUS library, please
state explicitly that you want release 3 and not any previous release,
since some people have sometimes received old releases from DECUS
when they made their order before the tape with the new release
had arrived and been duly registered in the DECUS library.
.skip
The KA10 version of SIMULA should however never be ordered
from DECUS or from Sweden, but rather from the University of Western
Ontario in Canada.
.skip
.test page 19
Addresses:
.skip
.nofill
.test page 6
Swedish National Defense Research Institute
SIMULA Maintenance
Section 142
S-10450 Stockholm 80
SWEDEN
.skip
.test page 6
DECUS Library
Digital Equipment Computer Users Society
Maynard
Massachusetts 01754
U. S. A.
.skip
.test page 5
The Computer Center
University of Western Ontario
London, Ontario
CANADA
.skip
.fill
.test page 28
.p 0,2,10;.center
ALL HANDBOOKS NOW AVAILABLE IN RUNOFF FORMAT
.skip
All the three DECsystem-10 SIMULA Language Handbooks
are now available in runoff format on the SIMULA
distribution tape. Copying is allowed for use with
a DECsystem-10 computer. We thank DEC and Ashley Grayson
for the conversion of part I of the handbook to
machine-readable format.
.p 0,2,10;.center
PRICES AND ORDERING NUMBERS
.skip
.nofill
.right margin 64
.tab stops 32,47
	Price in	Price in
	Swedish Kronor	Dollars	
	when ordering	when ordering	
Entity	from Sweden	from DECUS
.tab stops 32,37,47,51
		No.		No.
1200' MT with full SIMULA
system and manual files 
User supplied tape	150		25	10-223A
We deliver tape	220		45	10-223A
.skip
Handbook part I	50	C8398	12	10-223B
.skip
Handbook part II	40	C8399	12	10-223C
.skip
Handbook part III	40	C10045	 
.skip
Reference Card	15	C10039	 
.skip
Implementation guide	20	C8400	 
.skip
Technical documentation	1200	 	 
.paper size 60,64;.left margin 3;.right margin 61
.fill
.skip
The prices quoted do not include postage. Please indicate
with your order if you want the material shipped by air
or surface.
.skip
The handbooks part I, II and III and the Implementation guide
are also available as runoff files on the magtape. Copying is
allowed but only for use with the DECsystem-10 computer.
.skip
NOTE: These prices are #n#o#t# valid for use on the DECsystem-20!
SIMULA on the DEC 20 may become an unbundled product.
.skip
NOTE 2: The MAG-tape with KA10 SIMULA from the University
of Western Ontario in Canada costs 100 Canadian Dollars.
The KA10 tape corresponds (February 1976) to release 1C of KI10 SIMULA.
.SUBTITLE APPENDIX A:##HIDDEN PROTECTED SPECIFICATIONS
.page
.variable foa a b
.center
APPENDIX A:##HIDDEN PROTECTED SPECIFICATIONS
.center
--------------------------------------------
.index ^^HIDDEN PROTECTED protection feature\\
.index ^^PROTECTED protection feature\\
.index ^^Security\\
.index ^^Protection\\
.index ^^Segmentation of programs\\
.index ^^HIDDEN specification\\
.B 1
The HIDDEN PROTECTED feature is a feature to increase the reliability and
security of large software packages by dividing
.index ^^Security by module protection\\
the package into smaller submodules and controlling the interface
between the submodules.
.B 1
Many programming errors occur because a programmer, when writing code
in one submodule, is not aware of the effect of that code on other
submodules. If the interface between the modules is controlled,
the compiler and program can automatically guard against many such
programming errors.
.B 1
This is especially important when several programmers are working
on the same project, or when one programmer writes a
program using one or several packages developed previously 
by someone else.
.B 1
The natural submodule in SIMULA is a CLASS. This CLASS is sometimes
separately compiled
(See Chapter 4 of the DECsystem-10 SIMULA Language Handbook Part I).
However, programs using a separately compiled CLASS do not
ordinarily use all its attributes directly.

Some attributes are internal
to the CLASS and only used by code inside the CLASS.
Other attributes are "ports of entry" to the CLASS. Often,
these "ports of entry" are PROCEDURE attributes to the CLASS,
since PROCEDUREs can include code to check the correctness
of the input parameters before performing the requested
actions.
.B 1
The simplest use of the HIDDEN PROTECTED specification is to declare as
HIDDEN PROTECTED those attributes which are not to be accessible outside
the body of the CLASS. Suppose for example
.index ^^CLASS body, protection of access to\\
that we have a CLASS "data#base" where the user of the CLASS
need only access the features of the CLASS through the attribute
PROCEDUREs "put" and "get". All other attributes of the CLASS
are then declared HIDDEN PROTECTED as in the following simplified excerpt:
.B 1
.nofill;.nojustify
.test page 16
.IF FOA;.NUMBER 157;.PS 80,80;.PAGE;
.ENDIF FOA
    CLASS data__base;
    HIDDEN PROTECTED diskdata, has__been__read, filesize,
    filepos, internal;
    BEGIN
        REF (directfile) diskdata;
        BOOLEAN has__been__read;
        INTEGER filesize, filepos;
        PROCEDURE internal; COMMENT this PROCEDURE is
        only used internally inside the class
        data__base;;
        PROCEDURE PUT; COMMENT port accessible from
        outside the CLASS ...;;
        PROCEDURE GET; COMMENT port accessible from
        outside the CLASS ...;;
        COMMENT etc. ;
    END of data__base;
.fill;.justify

.p 0,1,5
If most of the attributes of a CLASS are to be HIDDEN PROTECTED,
and only a few attributes are to be non-protected ports, then it is
easier to list the non-protected attributes. This can be done using
the NOT HIDDEN PROTECTED specification. The CLASS in the example
above could then instead begin:
.p 0,1,4
.nofill
    CLASS data_base;
    NOT HIDDEN PROTECTED put, get;
    BEGIN ...
.fill
.p 0,1,5
The NOT HIDDEN PROTECTED specification indicates that all attributes
which can be specified HIDDEN PROTECTED at that place in the program,
and which are not listed in the specification, are specified to be
HIDDEN PROTECTED.
.p 0,1,2
The syntax of the HIDDEN PROTECTED specification is:
.nojustify;.skip 1
.left margin 23
.indent -15
<protection#part> ::= <empty> ! <protection#part>
<protection#specification> ;
.skip
.indent -15
<protection#specification> ::= ( HIDDEN ! PROTECTED !
                           HIDDEN PROTECTED ! PROTECTED HIDDEN )
                           <attribute#list>
.skip 1
.indent -15
<attribute#list> ::= <attribute#identifier> ! <attribute#list> , <attribute#identifier>
.skip 1
.left margin 3;.justify;.skip 1
The <protection#specification> is placed in front of the CLASS body,
after the parameter specifications and in front of the VIRTUAL
specifications. The syntax of the class declaration in SIMULA
is thus changed from
.left margin 8;.skip 1;.nofill;.test page 16
<main#part> ::= CLASS <class#identifier>
               <formal#parameter#part> ;
               <value#part> <specification#part>
               <virtual#part> <class#body>
.indent -5;.skip 1
into
.skip 1
<main#part> ::= CLASS <class#identifier>
               <formal#parameter#part> ;
               <value#part> <specification#part>
               <protection#part>
               <virtual#part> <class#body>
.left margin 3;.fill
.p 0,2,10
.center
^^SEMANTICS OF THE HIDDEN PROTECTED SPECIFICATION
.B 1
Attributes declared PROTECTED are only visible
inside the body of the
class where they have been specified PROTECTED, and inside the body
of subclasses to this class and inside the body of blocks prefixed
.index ^^Subclass, protection against\\
with this class or a subclass to it.
.B 1
Note that inside this body, the attributes are visible not only
by direct access but also by remote access (dot notation or
INSPECT statements) to other objects of the CLASS.
.B 1
If an identifier in the source program, outside this scope,
would without PROTECTED refer to the PROTECTED variable,
that identifier will instead act as if the PROTECTED variable
cannot be seen, it will thus either refer to a statically enclosing
identifier with the same name, or it will give the compile time
error message "UNDECLARED IDENTIFIER".
.IF FOA;.NUMBER 158;.PS 80,80;.PAGE;
.ENDIF FOA
.B 1
Attributes declared HIDDEN are invisible in subclasses
to the class where the HIDDEN specification occurs and in blocks prefixed
with this class or subclasses to it.
.B 1
The combined specification HIDDEN PROTECTED will thus make 
the variables invisible everywhere except in the body of the
class containing the HIDDEN PROTECTED specification.
.B
A VIRTUAL
attribute may only be specified PROTECTED in the same CLASS heading
where the VIRTUAL specification is placed.
If a VIRTUAL attribute is declared HIDDEN, the effect is that
procedures with the same name in subclasses will not
take part in the virtual match. They will instead act as ordinary
(non-virtual) procedures.
.B 1
Attributes of a class may only be specified PROTECTED
in the heading of the class where the attribute is declared.
Attributes of a class may, however, be declared HIDDEN in a
subclass to it.
Such a HIDDEN specification will only be valid for subclasses
to the class where the HIDDEN specification is placed.
.B
An attribute may not be specified HIDDEN except when it is specified
PROTECTED in the same class or in a
superclass.
.B
If a HIDDEN specification contains an identifier
which is ambiguous, because the same identifier has been
used for different attributes within the prefix chain,
then the HIDDEN specification will take effect for all
these attributes with the same name.
.B
All HIDDEN
specifications at the start of a certain CLASS must either be
of the NOT kind or of
the positive kind. Mixed specifications are illegal. The same is true for the
PROTECTED specifications. However, HIDDEN and PROTECTED may be of different
kind.
.p 0,2,10
.IF FOA;.NUMBER 159;.PS 80,80;.PAGE;
.ENDIF FOA
.center
EXAMPLES OF USE OF THE HIDDEN PROTECTED SPECIFICATION
.B 1
.nofill
Example i: WRITE-PROTECTED ATTRIBUTES
.fill
.B
The attributes "length", "width" and "height" of the following
CLASS can be given values when a new CLASS object is generated,
but can never be changed in an existing CLASS object.
.B
The attribute "density" can only be changed through the procedure
"set_density" which checks that the new value is within a legal range.
.B
The attribute values can all be used outside the CLASS body, but
not redefined, since the externally accessible ports are all PROCEDUREs.
.nofill
.p 0,1,19
    CLASS box (internal__length, internal__width,
        internal__height, internal density);
    REAL internal__length, internal__width,
        internal__height, internal__density;
    NOT HIDDEN PROTECTED length, width, height,
        density, set__density;
    BEGIN
.left margin 11
REAL PROCEDURE length; length:= internal__length;
REAL PROCEDURE width; width:= internal__width;
REAL PROCEDURE height; height:= internal__height;
REAL PROCEDURE density; density:= internal__density;
PROCEDURE set__density(new__density);
IF new__density < 0 OR new__density > 10 THEN abort
ELSE internal__density:= new__density;
.B
set__density(internal__density); COMMENT to check initial value;
_...
.left margin 3
    END;
.fill
.p 0,2,21
.IF FOA;.NUMBER 160;.PS 80,80;.PAGE;
.ENDIF FOA
Example ii: SIMSET AS IN SIMULA COMMON BASE
.nofill
.p 0,1,19
CLASS simset;
BEGIN
    CLASS linkage;
    PROTECTED i__suc, i__pred;
    BEGIN
        REF (linkage) i__suc, i__pred;
    END;
    linkage CLASS link;
    HIDDEN i__suc, i__pred;
    BEGIN
        PROCEDURE out;
        BEGIN
            IF i__suc =/= NONE THEN
            BEGIN
            END;
        END;
    END;
END;
.fill
.B
As is seen above, the internal, HIDDEN attributes i__suc and i__pred
are invisible outside LINKAGE, except within the subclasses LINK
(and HEAD, analoguous to LINK) since they are declared PROTECTED
in LINKAGE, but declared HIDDEN in LINK (and HEAD).
.p 0,2,27
Example iii: INVISIBLE, NOT FORBIDDEN
.B
This example shows that PROTECTED attributes are invisible rather
than forbidden:
.nofill
.B
BEGIN
.left margin 7
INTEGER b;
.b
CLASS a; HIDDEN PROTECTED b;
BEGIN INTEGER b;
END;
.b
a CLASS asub;
BEGIN
    b:= 3; COMMENT legal, but refers to the b outside a;
END;
.b
INSPECT NEW a DO
BEGIN
    b:= 1; COMMENT legal, but refers to the b outside a;
END;
.b
a BEGIN
    b:= 2; COMMENT legal, but refers to the b outside a;
END;
.left margin 3
END;
.fill
.p 0,2,17
.IF FOA;.NUMBER 161;.PS 80,80;.PAGE;
.ENDIF FOA
Example iv: LABELS CAN ALSO BE HIDDEN
.index ^^Label, hiding of\\
.nofill
.B
BEGIN
.left margin 7
CLASS a;
HIDDEN PROTECTED la;
BEGIN
    INNER;
.index ^^INNER, example with protection\\
    la: lb:
END;
.b
a CLASS b;
BEGIN
    GOTO la; COMMENT illegal;
    GOTO lb; COMMENT legal;
END;
.left margin 3
END;
.p 0,2,15
.fill
Example v: PROTECTING THE NAME OF A CLASS.
.B
.nofill
BEGIN
    CLASS a;
    HIDDEN PROTECTED b;
    BEGIN
        REF (b) bl;
        CLASS b;
        BEGIN INTEGER i;
        END;
       bl:- NEW b;
    END of a;
    INSPECT NEW a DO outint(bl.i); COMMENT legal;
END;
.B
.fill
Class a has a local class B which is HIDDEN and PROTECTED.
This protects against all statements where the name of
the local class appears. Thus, the following is impossible
outside the body of a:
.B
> Creation of new objects of the class b using the NEW statement.
.B
> Declaration of references to b.
.B
> Use of the WHEN clause in the INSPECT statement.
.B
Nevertheless, it is possible to access the attributes of the
instance of the class b referred to by the reference variable
b1 in the class a, since b1 is not HIDDEN PROTECTED.
.p 0,2,26
.fill
.IF FOA;.NUMBER 162;.PS 80,80;.PAGE;
.ENDIF FOA
Example vi: PROTECTING THE "NEW" COMMAND OF SIMULA.
.B
.nofill
BEGIN
    CLASS c; HIDDEN PROTECTED b;
    BEGIN BOOLEAN b;
        CLASS d;
        BEGIN
            IF b THEN abort;
        END;
        COMMENT here, "NEW d" will not cause any error;
        b:= TRUE;
    END;
    INSPECT NEW c DO NEW d; COMMENT causes error!!!;
END;
.B
.fill
If you want to protect just the "NEW" command and nothing
else, this construct can be used. Note however that the construct
in example v causes compile time error, the construct in example
vi causes run time error.
.B
Class c has a boolean attribute B which is used to indicate
if the statement part is executed. Such an attribute may
be used to inhibit instance generation of a local class
through a programmed runtime check like that on line 6.
The "NEW d" phrase on line 12 will result in a call on the
"abort" procedure.
.subtitle APPENDIX B:##NEW FACILITIES IN SIMDDT
.fill;.justify
.paper size 60,64;.left margin 3;.right margin 61
.page
.center
APPENDIX B:##NEW FACILITIES IN SIMDDT
.center
-------------------------------------
.skip 2
For completeness, this appendix also lists the new facilities
entered into SIMDDT with release 2 of SIMULA.
.test page 22
.p 0,2,8;.center
CONCISE SUMMARY OF NEW AND OLD FACILITIES
.skip
.nofill
.left margin 0
.paper size 60,73
.right margin 73
a) set up to 20 breakpoints in the program   [STOP] AT [module:] nn..
b) continue from a breakpoint                PROCEED
c) display the current breakpoint settings   [STOP] BREAKS
d) remove a breakpoint setting               REMOVE [AT n]
e) change the contents of a variable         INPUT x:=..
f) display the contents of a variable        OUTPUT x,..
g) display all variables in the storage pool VARIABLES [/switches]
h) display the dynamic operating chain       CHAIN
i) display all scheduled processes           SCHEDULED
k) switch output to a disk file e.g. a.bug   USE a.bug
l) display the source program                DISPLAY [module:] mm[-nn]
m) move SIMDDT viewpoint : to object x       INSPECT x
      to SIMDDT interrupt point              INSPECT/START
      to CLASS or PROCEDURE generation point INSPECT/RETURN
      to viewpoint before last RETURN        INSPECT/RESET
      to statically enclosing block          INSPECT/UP
n) close open files                          [STOP] CLOSE
o) read SIMDDT control file e.g. x.cmd       @x.cmd
p) terminate execution                       EXIT
.paper size 60,64;.left margin 3;.right margin 61
.fill;.skip
For a full description of the new and old facilities in SIMDDT,
see SIMDDT.HLP or the new edition of the DECsystem-10 SIMULA
Language Handbook part II. The new edition of the handbook
is available on the SIMULA distribution tape under the filename
SIMULA.MAN and printed copies will be available from DECUS
or the Swedish National Defense Research Institute in a couple of
months.
.p 0,2,8;.center
YOU CAN NOW SEE DATA NOT DIRECTLY ACCESSIBLE
.skip
The initial version of SIMDDT only allowed you to use the OUTPUT
command of SIMDDT on variables which were directly accessible
at the point of the program where execution was interrupted.
.skip
The new SIMDDT statement "INSPECT" allows you to look at other
data. INSPECT/RETURN lets you look at data where the current
procedure was called, INSPECT/UP lets you look at the enclosing
block, INSPECT/START returns your viewpoint to where SIMDDT was
entered, INSPECT X, where X is a reference variable, lets you
look at the class object to which X currently refers.
.skip
The INSPECT command can be used recursively, e.g_. two
INSPECT/RETURN commands will move you two steps down the OPERATING CHAIN
(Chain of procedures calling each other, classes attaching
each other etc.)
.p;.center
YOU CAN LOOK AT THE SOURCE PROGRAM WHILE DEBUGGING
.skip
You often need to look at the source program during a debugging
session. If you get an error interrupt at line 234 in your program,
you may want to look at the source lines surrounding 234 before deciding
what SIMDDT commands to use. You may also
want to look at the program to decide at what line to put a SIMDDT breakpoint.
.skip
The DISPLAY statement allows you to do this. You type e.g_.
.break
DISPLAY ROUT:224-234
.break
to look at line 224-234 in the separately compiled module called ROUT.
.p;.center
SIMPLE WAY TO OUTPUT ALL ATTRIBUTES OF A CLASS OBJECT
.skip
The new SIMDDT identifier * refers to the set of attributes of a
certain block. You can e.g_. write "OUTPUT X.*"
to output all attributes of the class object to which the
reference variable X currently refers.
.p;.center
YOU CAN SKIP ARRAYS AND TEXTS AND STOP GARBAGE COLLECTION
.skip
When you output data to your terminal during a debugging session,
you may want to shorten the
listing by suppressing arrays and text values. This can
be done with the new switches /-ARRAY and /-TEXT. These
switches can be affixed to the OUTPUT, VARIABLES and ALL
commands of SIMDDT. Example: "OUTPUT P.*/-ARRAY" will
output all attributes of the object to which P refers except
those attributes which are arrays.
.skip
This means that the previous SIMDDT command NOARRAYS is
replaced by VARIABLES/-ARRAY.
.skip
The switch /-GC signifies that you do not want any garbage collection
before executing the ALL or VARIABLES command. This way you may
get a longer listing, but the listing may contain certain data
which was no longer accessible in any way from your program, but
which still might help you with your debugging.
.p;.center
THE OPERATOR QUA CAN NOW BE USED WITH SIMDDT
.skip
You can e.g_. write "OUTPUT X QUA MYCLASS.*". Previously, if X was qualified
by a superclass to MYCLASS (e.g_. LINK in SIMSET) you could
only see the attributes of LINK.
Now you can see all the attributes of your own class MYCLASS.
.p;.center
NEW WAY OF HANDLING OPEN FILES
.skip 1
In the first release of DECsystem-10 SIMULA, all open files
were automatically closed at the end of program execution.
This is however against the definition of the SIMULA language.
In release 3, an error message will be given if any file
except SYSIN and SYSOUT is open at program end. You will
be allowed to decided which files to close.
.skip
If you want nothing closed, exit with
CTRL-C. If you want all files closed, use the SIMDDT command
CLOSE. If you want to decide individually for each file
whether to close it, use the SIMDDT command STOP CLOSE.
.skip
IF you want the program to handle all file closing,
insert appropriate calls to the procedure CLOSE into your
SIMULA program.
.p;.center
YOU CAN GET THE VALUES OF BUILT-IN FUNCTIONS WITH SIMDDT
.skip
You can get the values of the following SIMULA functions
with SIMDDT: SYSIN, SYSOUT, FIRST, LAST, SUC, PRED, PREV,
EVTIME, MAIN, TIME, CURRENT, NEXTEV.
.skip
Example: "OUTPUT SYSOUT.IMAGE".
.skip
Note: If execution is interrupted in a separately compiled
module, you have to move to the main program with one or
more INSPECT/RETURN commands if you want to look at SYSIN and SYSOUT.
.p;.center
MISCELLANEOUS NEW SIMDDT FEATURES
.skip
When you try to open a file, and that file cannot be opened,
a special dialogue is entered with the user terminal. You can now
transfer temporarilly from this dialogue to SIMDDT by pushing ALTMODE
(ESCAPE). From SIMDDT, the PROCEED command will return you to the
file opening dialogue again.
.skip
SIMDDT can read a number of SIMDDT commands from a
file with the @file.ext command of SIMDDT.
.skip
If SIMDDT is producing a long listing, you can interrupt this
listing faster than with CTRL-O by typing CTRL-C twice followed by
REENTER.
.skip
When SIMDDT is outputting TEXT values, all non-printable characters
are now output with _^ followed by a letter. E.g_. formfeed
is output as _^L instead of outputting a formfeed to your terminal.
This is especially useful for display terminals where formfeed
would otherwise blank the screen.
.subtitle APPENDIX C:##UTILITY PROGRAM LIBRARY
.variable notready q z
.variable help h i
.paper size 60,64;.left margin 3;.right margin 61
.page
.center
APPENDIX C:##UTILITY PROGRAM LIBRARY
.center
------------------------------------
.skip
For a complete, up-to-date listing of the library, see
LIBSIM.HLP. For a fuller descriptions of the routines
in the library, see the DECsystem-10 SIMULA Language
Handbook part III, and, in some cases, .HLP, .MAN,
_.DOC, .RNH, .RNM, .RND or .RNO files on the particular
program of interest.
.skip
Letter codes in this list:
.skip
_..=repetition#of#parameter, R=REAL, L=LONG#REAL, I=INTEGER,
C=CHARACTER, T=TEXT,
X=REF, B=BOOLEAN, G=LABEL, a=ARRAY, P=PROCEDURE, K=CLASS, M=MAIN PROGRAM.
.skip
The first column for each program indicates type of result
for function procedures, K for separately compiled classes,
M for main programs(not in LIBSIM).
The following letters indicate type of parameters.
.left margin 25
.tab stops 2,10,25
.nojustify
.skip
.ifnot help
.test page 8
.endif help
.indent -25
1.#UTILITY PACKAGES:
.skip
.test page 3
.indent -25
K	T,T	SAFEIO	Safe conversational terminal i/o. See SAFEIO.HLP
and SAFEIO.MAN
.indent -25
K	T	SAFEI	SAFEIO without file handling facilities
.indent -25
K		SAFMIN	Small, simplified version of SAFEI
.indent -25
K	T,T	SIMEIO	Same as SAFEIO though prefixed with SIMULATION
.indent -25
K	T	SIMEI	Same as SAFEI though prefixed with SIMULATION
.indent -25
K		SIMMIN	Same as SAFMIN though prefixed with SIMULATION
.indent -25
K		SIMDBM	CODASYL DBTG type DBMS system. Consists of
the external classes DBMTXT, DBM, DBMSET och DBMDA1 and the main
programs FETCH and PREP
.indent -25
K	I,I	STORE	Simple text-oriented DBMS
.indent -25
K		FIGURE	Plot package for Tektronix plotter.
GRAPHI, COSYS, COSYSF and RUBOUT are also part of this package.
See FIGURE.HLP.
.if qz
.indent -25
K		CALSIM	Curve plotting on calcomp 835 plotter.
See CALSIM.HLP
.endif qz
.if notready
?	?	VISTA	[NOT READY] Full control of infoton vista terminal display
screen, e.g. to produce moving pictures
.endif notready
.indent -25
K	T	DAHELP	Give user help message when running SIMULA program.
Uses direct-access file to store help messages. See DAHELP.HLP
.indent -25
B	T,T,I,I	SQHELP	Give user help message when running SIMULA program.
Uses sequential file to store help messages
.indent -25
K	I	DECOM	(Subclass to SAFEI) Interpret input command of the format
.break
outfil.ext/switch1/switch2... =infil.ext/switch3/switch4...
.skip 1
.ifnot help
.test page 8
.endif help
.indent -25
2.#SIMULA SOURCE CODE CONVERSION PROGRAMS:
.break
[These are main programs, and thus not in LIBSIM]
.skip
.test page 3
.indent -25
M		SIMED	Prettyprinting, cleaner layout, indentation or BEGIN-END, no semantic change of program
.indent -25
M		SIMSTR	Automatic structure abstract of source program
.indent -25
M		SIMEXP	Combines separately compiled modules into one module
.indent -25
M		SIMIBM	Conversion to IBM Simula
.indent -25
M		IBMSIM	Conversion from IBM Simula
.indent -25
M		CDCSIM	Conversion from CDC Simula
.indent -25
M		FQCRED	Adds frequency counting to a SIMULA program
.indent -25
M		FQCLST	Edits SIMULA source program with frequency measurements
.skip;.test page 14
.indent -25
3.#DIRECTFILE HANDLING PROGRAMS
.skip
.indent -25
M		DIRED	Edits a directfile
.indent -25
M		MAKEDF	Produce a directfile from a sequential file
.indent -25
M		FETCH	General-purpose SIMDBM Data Base Manipulator
.indent -25
M		MAKHLP	Create help file for use with DAHELP.
.skip
.ifnot help
.test page 8
.endif help
.indent -25
4.#PROCEDURES NOT WRITEABLE IN SIMULA:
.skip
.fill
.test page  8
4.1 TIME AND DATE
.skip
.indent -25
T		TODAY	Give TEXT with date: yyyy-mm-dd
.indent -25
I		DAYNO	Number of this day in current year
.indent -25
T		DAYTIME	Give TEXT with hh:mm:ss
.indent -25
	RCIX	OUTTIME	Converts simulated time to hh:mm:ss.cc format
and prints it on a given outfile
.indent -25
R		CLOCKTIME	Give LONG REAL with time of day in seconds
.indent -25
R		CPTIME	Give LONG REAL with CPU time in seconds
.if notready
.indent -25
?	?	TIMELIMIT	[NOT READY] Set time limit for current execution
.endif notready
.p 0,1,6
4.2 REAL TIME
.skip
.indent -25
B	X	INPUTCHECK	Anything to read on file X?
.indent -25
	R	SLEEP	Delay execution for R real seconds
.indent -25
I	Xa	INPUTWAIT	Sleep until anything to read
.skip
.test page 20
4.3 INPUT/OUTPUT
.skip
.indent -25
I	X	LINECOUNT	Return LINESPERPAGE setting
.indent -25
I	X	FILENAME	Give TEXT with FILE object generation parameter
.indent -25
C		GETCH	Input character, do not wait for carriage return
.if notready
.indent -25
C	X	INSINGLECHAR	[NOT READY] Input character, do not wait for carriage return
.endif notready
.indent -25
	ILRCPa.. READ	Read many values in standard format
.indent -25
	ILRCTPa.. WRITE	Write many values in standard format
.indent -25
I	X,RLICBTXa.. OUTPUT	Binary output
.indent -25
I	X,RLICBTXa.. INPUT	Binary input
.indent -25
I	RLICBTXa.. PUTSIZE	How much will OUTPUT write?
.if notready
.indent -25
B	X,I	BYPASS	[NOT READY] Bypass I number of characters in a file
.endif notready
.if notready
.indent -25
B	X,LRIC	LOOK	[NOT READY] Binary one-word lookahead in input
.endif notready
.indent -25
B	T	SCRATCHFILE	Delete file on secondary storage
.indent -25
X	T	FINDINFILE	NEW INFILE, but no error if file does not exist
.indent -25
X	T,B	FINDDIRECTFILE	NEW DIRECTFILE but no error if not found or not updateable
.indent -25
X	T	FINDOUTFILE	NEW OUTFILE, but no error if write protected
.indent -25
X	T	FINDPRINTFILE	NEW PRINTFILE, but no error if write protected
.indent -25
I	X	LASTLOC	Highest written line in a DIRECTFILE
.if notready
.indent -25
I	X	MAXLOC	[NOT READY] Highest writeable line in a DIRECTFILE
.endif notready
.if notready
.indent -25
	X	CLOSEOPEN	[NOT READY] Close and immediately open a file
.endif notready
.indent -25
	X	DOTYPEOUT	Reset CTRL-O bit to resume terminal output
.indent -25
I	I,X,I	TRMOP	Modify monitor-terminal interface
.skip
.test page 7
4.4 CONTROLLED ERROR HANDLING
.skip
.if notready
.indent -25
	I,I	MASKERROR	[NOT READY] Continue for certain kind of forthcoming error
.endif notready
.if notready
.indent -25
	I,G	JUMPERROR	[NOT READY] Goto label for certain kind of forthcoming error
.endif notready
.if notready
.indent -25
I	I	SENSEERROR	[NOT READY] How many masked errors have occurred
.endif notready
.if notready
.indent -25
	I	RESETERROR	[NOT READY] Inhibit MASKERROR action
.endif notready
.indent -25
	B	ENTERDEBUG	Transfer to SIMULA debugging system
.indent -25
	T	ABORT	User program generated error interrupt
.if notready
.indent -25
	I	FORSIM	Traps i/o calls from FORTRAN external procedures
.skip
.test page 5
4.5 SCHEDULING
.skip
.if notready
.indent -25
	B	SUBMIT	[NOT READY] Enter file into input batch stream
.endif notready
.if notready
.indent -25
	T	RUN	[NOT READY] Run a new program under the current job
.endif notready
.if notready
.skip
.test page 7
4.6.1 PRIMARY MEMORY HANDLING
.skip
.if notready
.indent -25
I	I	FREEBITS	[NOT READY] Force garbage collection, return maximal free area size
.endif notready
.if notready
.skip
.test page 7
4.6.2 VIRTUAL MEMORY CONTROL
.if notready
.skip
.indent -25
B	I	COREGUIDE	[NOT READY] Set physical guideline
.endif notready
.if notready
.indent -25
B	I	CORELIMIT	Set physical limit
.endif notready
.if notready
.indent -25
	XP..	SWAP	[NOT READY] Swap out given module from main store
.endif notready
.if notready
.skip
.test page 7
4.7 SAVE-RESTORE FACILITY
.skip
.if notready
.indent -25
	X	SAVE	[NOT READY] Save current main memory onto file
.endif notready
.if notready
.indent -25
	X	RESTORE	[NOT READY] Resume execution from save file
.endif notready
.skip
.test page 13
4.8 ENVIRONMENT ENQUIRY
.skip
.indent -25
I		MAXINT	Largest positive INTEGER
.indent -25
R		MAXREAL	Largest positive REAL
.if notready
.indent -25
R	R	ADDEPS	[NOT READY] Smallest number greater than argument
.endif notready
.if notready
.indent -25
R	R	SUBEPS	[NOT READY] Greatest number smaller than argument
.endif notready
.if notready
.indent -25
L	L	ADDLEPS	[NOT READY] ADDEPS for LONG REAL argument
.endif notready
.if notready
.indent -25
L	L	SUBLEPS	[NOT READY] SUBEPS for LONG REAL argument
.endif notready
.if notready
.indent -25
L	LR,LR	APPROX	[NOT READY] Return integer value corresponding to numbers of bits differing in two arguments
.endif notready
.if notready
.indent -25
T		IMPLEMENTATION	[NOT READY] CPU manufacturer and model
.endif notready
.if notready
.indent -25
T		LOGINFO	[NOT READY] Project number etc.
.endif notready
.if notready
.indent -25
I	a	DIMENSIONS	[NOT READY] Number of dimensions (subscripts) of ARRAY
.endif notready
.skip
.test page 5
4.9 PACKING INTO PARTS OF WORDS
.skip
.indent -25
B	IRLa,I,IRLCBTa,I,.. PACK	Pack many variables of varying type (not REF)
.indent -25
B	IRLa,I,IRLCBTa,I,.. UNPACK	Reverse of pack
.if notready
.skip
.test page 5
4.10 MIN AND MAX
.skip
.if notready
.indent -25
I	Ia..	IMIN	| Varying number of parameters
.indent -25
I	Ia..	IMAX	| [NOT READY] INTEGERs, REALs, LONG REALs, ARRAYs
.indent -25
LR	LRa.. RMIN	|  IMIN and IMAX return INTEGER results
.indent -25
LR	LRa.. RMAX	|  RMIN and RMAX return [LONG] REAL ##results
.endif notready
.skip
.if notready
.indent -25
I	Ia	ILIND	| Find G(reatest) or L(east) argument in an array.
.indent -25
I	Ia	IGIND	| [NOT READY]
.indent -25
R	Ra	RLIND	| Return index for the first argument  which is
.indent -25
R	Ra	RGIND	| >= (G) or <= (L) all other elements.
.indent -25
L	La	LLIND	| x is I(nteger array), R(eal array),
.indent -25
L	La	LGIND	| L(ong real array) or T(ext array).
.indent -25
T	Ta	TLIND	|
.indent -25
T	Ta	TGIND	|
.endif notready
.skip
.fill
.ifnot help
.test page 8
.endif help
.indent -25
5.#PROCEDURES (ALMOST) WRITEABLE IN SIMULA:
.skip
5.1 PARTITIONING OF TEXTS
.skip
.indent -25
T	T	REST	Subtext after POS
.indent -25
T	T	FRONT	Subtext before POS
.indent -25
T	T,I	FROM	Subtext after argument position
.indent -25
T	T,I	UPTO	Subtext before argument position
.indent -25
T	T	FRONTSTRIP	Subtext without leading blanks
.indent -25
T	T	GETITEM	Subtext = next identifier, number or delimiter after POS
.indent -25
T	X	INITEM	GETITEM on INFILE
.if notready
[NOT READY FOR DIRECTFILES]  or DIRECTFILE
.endif notready
.indent -25
C	T,I	FETCHAR	Return indexed CHARACTER from a TEXT
.indent -25
	T,I,C	DEPCHAR	Deposit a character at indicated position
.indent -25
	T,I,I	TSUB	Perform SUB returning NOTEXT instead of error
.skip
.ifnot help
.test page 8
.endif help
5.2 SEARCHING AND TESTING OF TEXTS
.skip
.indent -25
T	T,C	SCANTO	Next occurrence of CHARACTER in TEXT
.indent -25
T	C	SKIP	Skip all characters equal to argument from pos and on
.indent -25
T	T1,T2	FRONTCOMPARE	Does rest of TEXT T1 begin with subtext = T2?
.indent -25
T	T1,T2	UPCOMPARE	Same as FRONTCOMPARE, but upper and lower
case characters are regarded as equal
.indent -25
T	T1,T2	SEARCH	Find first subtext = T2 after POS in T1
.if notready
.indent -25
I	T	GETTYPE	[NOT READY] Does a TEXT contain REAL, INTEGER, IDENTFIER or what ITEM?
.endif notready
.indent -25
I	T	CHECKREAL	Checks if GETREAL can be performed
.indent -25
I	T	CHECKINT	Checks if GETINT can be performed
.indent -25
I	T	CHECKFRAC	Checks if GETFRAC can be performed
.indent -25
I	T,I	HASH	Compute hash value from text in interval [0:I-1]
.indent -25
C	T,T	FINDTRIGGER	Next occurrence of any character in a given string
.indent -25
B	T,I,Ta,I MENU	Search for unambiguous text in a text array
.indent -25
B	T,Ta,I,I,I LOOKUP	Perform binary search in sorted text array
.skip
.ifnot help
.test page 8
.endif help
5.3 OPERATIONS ON TEXTS
.skip
.indent -25
T	T,T	CONC2	Concatenation of TEXTs, two parameters
.indent -25
T	T..	CONC	Concatenation of TEXTs, variable no. of parameters
.indent -25
	T1,T2	PUTTEXT	Copies value of T2 after POS in T1
.indent -25
T	T	UPCASE	Convert lower case letters to upper case
.indent -25
T	C,I	MAKETEXT	NEW text with all I characters equal to C
.indent -25
T	T,C	COMPRESS	Remove given character from text
.indent -25
I	T	STARTPOS	Return starting position for a (sub)text
.indent -25
	T,T,T,T	SPLIT	Split up a text at given delimiter
.indent -25
I	T,T,T,T	SPLITA	Split up a text and store the parts in a text array
.indent -25
B	T,T,T	CHANGE	Replace old (sub)string with new string in a master text
.indent -25
L	T	SCANREAL	GETREAL but safe from bad data interrupt
.indent -25
I	T	SCANINT	GETINT but safe from bad data interrupt
.indent -25
I	T	SCANFRAC	GETFRAC but safe from bad data interrupt
.indent -25
I	T,Ra,I	GETARRAY	Reads from a text real values into a REAL ARRAY
.indent -25
I	T,Ia,I	GETINTARRAY	Ditto INTEGER ARRAY
.indent -25
I	T,Ra,I	GETLONGARRAY	Ditto LONG REAL ARRAY
.indent -25
T	T,T	CHECKEXTENSION	Add defaultextension if file spec misses a dot
.skip
.ifnot help
.test page 8
.endif help
5.4 INPUT/OUTPUT
.skip
.indent -25
C	X	LOOKAHEAD	Next non-blank character readable by INCHAR
.if notready
.indent -25
	T,X	OUTLINE	[NOT READY] Output TEXT on new line(s), TEXT may be longer than image
.endif notready
.if notready
.indent -25
	T,X	BREAKOUTLINE	[NOT READY] Output TEXT on same line, TEXT may be longer than image
.endif notready
.indent -25
T	T,X	INLINE	Type out a prompting question and copy an infile image (stripped)
.skip
.ifnot help
.test page 8
.endif help
5.5 SORTING AND SUMMATION ETC.
.skip
.indent -25
I	R	ILOG	Return integer part of 10LOG(|arg|)+1;
	if 0 return 0. I.e. Number of integer digits if |arg| >= 1 else number
	of leading zeros after decimal point.
.indent -25
I	Ia,I	ISUM	Return sum of an integer array
.indent -25
L	La,I	LSUM	Return sum of long real array (almost) preserving precision
.indent -25
R	Ra,I	RSUM	Return sum of real array
.if notready
.indent -25
R	R,R,Ra,I SIGMA2	[NOT READY] Return variance, mean value of a real array
.endif notready
.indent -25
	R,R,I,R	SIGMEA	Return next variance and mean value including new observation
.indent -25
	"x"a,I	SORTxy	Sort a given array in ascending or descending order.
.break
	x = T(ext), R(eal), I(nteger) or L(ong real)
.break
	y = A(scending), D(escending) order.
.fill
.skip
.ifnot help
.test page 8
.endif help
5.6 RANDOM NUMBER GENERATION ETC.
.skip
.indent -25
R	RR	RANDOM	Random generator of random number series start
numbers
.indent -25
I		UNIQUE	Unique number to be used e.g. as start random number
.p -25,1,8
6.#SWEDISH LANGUAGE TEXT PROCESSING AND INPUT/OUTPUT
.break
[Accept _$, _#, _@ as letters.]
.skip
.indent -25
B	T,I,Ta,I MENY	Swedish language version of MENU
.left margin 5
.ifnot notready
.p 0,1,4
The Swedish National Defense Research Institute, DEC or DECUS
assume no responsibility for damage because of faults in these programs.
.endif notready
.if help
.skip
[END OF LIBSIM.HLP]
.endif help
.left margin 5
.ifnot help
.nojustify