GLIDER instructions are structured instructions characterized by a name, a list of parameters, that may be variable in length, and in many cases an associated simple or structured instruction. This last may contain certain GLIDER instructions and procedures. In this sense they are like structured instructions of general purpose languages. GLIDER instructions execute complex procedures and are translated into many basic instructions and procedure calls. They are used to create and copy messages, to manage the movements of messages, to examine and change the entry and internal lists of the nodes, to write or read files, to make graphics, etc.
In this chapter, the following conventions and definitions are used:
< >
.
Example: <variable>
means the name of a variable.|
it means
that there are other alternatives for the element. The other
alternatives are also between |
and only one of them
must be used.
Example: | LAST | FIRST |
<integer value>
is an integer variable taking only positive
values or a positive integer. <node>
means the name of a node. If the node is multiple
the name must include the index within [ ]. <list of <elements> >
means a list of the items
indicated by elements separated by commas. <list of <integer values> >
may be a list as: J, 3 ,350, h. <list of <nodes> >
may be: Machine, Carrier[j], Inspect.
where Machine, Carrier and Inspect were defined as nodes
elsewhere. Carrier was defined as a multiple node. | EL | IL|_<node> / (<name of predecessor node>)/
<list>
in the syntactical description
represents the name of
an IL (internal list) or EL (entry list) of messages of a node.<associated instruction>
is a
<Pascal instruction>
simple
or structured, that is included as part of a GLIDER instruction. The
associated instruction may include GLIDER functions and procedures and
the GLIDER instructions that are allowed in each case. It may also be a
unique GLIDER instruction or a list of GLIDER instructions and procedures
between the separators BEGIN ... END.SCAN(EL_Machine) BEGIN j := UNIF(1, 4); IF a < 5 THEN SENDTO(Carrier[j]) END;
SCAN is a GLIDER instruction (see 6.21) used to scan a list of messages
(in this case the EL of the node Machine). The associated
instruction between BEGIN ... END is executed for each scanned message. The
variable j of the message is set to the value given by the random
GLIDER function UNIF. If the value of a is less than 5 the
message is taken out of the EL and sent to the EL of the node
Carrier[j]
. Here, the associate instruction is a Pascal compound
instruction (between BEGIN ... END) which contains an assignative
instruction and an IF instruction containing a GLIDER instruction
SENDTO.
<field>
is the name of a simple or indexed variable that
was declared as a field of a message.<PASCAL instruction>
is a PASCAL instruction structured
or simple.<simple PASCAL instruction>
is an assignative instruction:<variable> := <expression>
; or a call to a procedure or a input
or output instruction or a GOTO instruction.<structured PASCAL instruction>
is a PASCAL instruction of
the type IF, CASE, WHILE, FOR, REPEAT or a compound instruction (set
of instructions delimited by BEGIN ... END ).
Where a simple PASCAL instruction is allowable, it is possible also to put
a GLIDER instruction or a GLIDER procedure.
WHILE <logical expression> DO BEGIN <GLIDER instruction>; IF <logical expression> THEN <GLIDER instruction> ELSE <GLIDER procedure>; END;
There are restrictions, that depend on the type of node and of
the GLIDER instruction, in which the GLIDER instruction
or procedure is used.
Example: In the associated instruction of a GLIDER instruction
SCAN it is not allowed to use another SCAN instruction.
Within an associated instruction, GLIDER instructions with associated
instructions are, in general, forbidden, except in the case of
the associated instruction of a RELEASE and STATE instructions.
<nest of constants>
is a set of simple INTEGER, REAL,
CHAR or STRING constants in a nest as it is used
in PASCAL to give values to indexed constants:
The whole set is included within ( );
its elements are constants or successions
corresponding to the successive values of the first
index. Each succession is included within ( ). Each
( ) is formed by constants or successions corresponding
to the successive values of the second index, etc.
Successions and values are separated by commas.4 5 0 1 0 1 7 6 2 3 3 8 1 4 3 9 6 9in which the first index, that indicates the matrix, the second the line and the third the column, is represented by:
(((4, 5, 0), (7, 6, 2), (1, 4, 3) ) , ( (1, 0, 1), (3, 3, 8), (9, 6, 9)))The element M[2, 2, 3] has the value 8.
<assignative instruction>, <expression>, <real expression>, <integer expression>, <logical expression>, <real variable>, <integer variable>, <boolean variable>, <character variable>are defined as in PASCAL.
Some of the instructions and procedures (see Chapters 6 and 7) may be used in any node. They are called common instructions and procedures. They are:
ACT, BEGINSCAN, BLOCK, ASSI, CLRSTAT, DEACT, DEBLOCK, DBUPDATE, DOEVENT, DONODE, ENDSIMUL, EXTFEL, EXTR, FILE, FREE, GRAPH, INTI, IT, LOAD, MENU, NT, OUTG, PAUSE, PUTFEL, REL, REPORT, SCAN, SORT, STAT,STOPSCAN, TAB, TITLE, TRACE, TRANS, TSIM, UNLOAD, UNTRACE, UPDATE, USE.
BEGINSCAN and STOPSCAN are included here, because they can be used in any nodes as part of the associate instruction of SCAN.
<structured GLIDER instructions>
are the following
(a brief comment about the function is indicated) :