Previous

PART II: Fundamental Constructions

{This part presents the essential structure of programs:

· the general rules for constructing them;

· the ways of defining indicators and their properties, at each new level of construction;

· the constructs available for programming primitive actions.}

3.0. Clauses

{Clauses provide

· a hierarchical structure for programs,

· the introduction of new ranges of definitions,

· serial or collateral composition, parallelism, choices and loops.}

3.0.1. Syntax

a) *phrase : SOME unit{32d } ; NEST declaration of DECS{41a } .

b) *SORT MODE expression : SORT MODE NEST UNIT{5A } .

c) *statement : strong void NEST UNIT{5A } .

d) *MOID constant : MOID NEST DEFIED identifier with TAG{48a,b } ; MOID NEST denoter{80a } .

e) *MODE variable : reference to MODE NEST DEFIED identifier with TAG{43a,b } .

f) *NEST range : SOID NEST serial clause defining LAYER{32a } ; SOID NEST chooser CHOICE STYLE clause{34b } ; SOID NEST case part of choice using UNITED{34i } ; NEST STYLE repeating part with DEC{35e } ; NEST STYLE while do part{35f } ; PROCEDURE NEST routine text{541a,b } . {NEST-ranges arise in the definition of "identification" {7.2.2.b }.}

3.0.2. Semantics

A "nest" is a 'NEST'. The nest "of" a construct is the 'NEST' enveloped by the original of that construct, but not by any 'defining LAYER' contained in that original.

{The nest of a construct carries a record of all the declarations forming the environment in which that construct is to be interpreted.

Those constructs which are contained in a range R, but not in any smaller range contained within R, may be said to comprise a "reach". All constructs in a given reach have the same nest, which is that of the immediately surrounding reach with the addition of one extra 'LAYER'. The syntax ensures {3.2.1.b , 3.4.1.i, j, k , 3.5.1.e, 5.4.1.1.b} that each 'PROP' {4.8.1.E } or "property" in the extra 'LAYER' is matched by a defining-indicator {4.8.1.a } contained in a definition in that reach.}
 
Next