10.07.2015 Views

Algol 68 - ACM Digital Library

Algol 68 - ACM Digital Library

Algol 68 - ACM Digital Library

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

52 van Wijngaarden, et al.also particular-programs of a language B, and if each such particularprogramfor which a meaning is defined in A has the same definedmeaning in B, then A is said to be a "sublanguage" of B, and B a"superlanguage" of A.{Thus a sublanguage of ALGOL <strong>68</strong> might be defined by omitting somepart of the syntax, by omitting some part of the standard-prelude, and/orby leaving undefined something which is defined in this Report, so as toenable more efficient solutions to certain classes of problem or to permitimplementation on smaller machines.Likewise, a superlanguage of ALGOL <strong>68</strong> might be defined by additionsto the syntax, semantics or standard-prelude, so as to improve efficiency(by allowing the user to provide additional information) or to permit thesolution of problems not readily amenable to ALGOL <strong>68</strong>.}A model is said to be an implementation of a sublanguage if it does notrestrict the use of the sublanguage in other respects than those mentionedabove.{See 9.3.c for the term "implementation of the reference language".}{A sequence of symbols which is not a particular-program but can beturned into one by deleting or inserting a certain number of symbols andnot a smaller number could be regarded as a particular-program with thatnumber of syntactical errors. Any particular-program that can be obtainedby deleting or inserting that number of symbols may be termed a"possibly intended" particular-program. Whether a particular-program orone of the possibly intended particular-programs has the effect its authorin fact intended it to have is a matter which falls outside this Report.}{In an implementation, the particular-program may be "compiled", i.e.,translated into an "object program" in the code of the physical machine.Under certain circumstances, it may be advantageous to compile parts ofthe particular-program independently, e.g., parts which are common toseveral particular-programs. If such a part contains applied-indicatorswhich identify defining-indicators not contained in that part, thencompilation into an efficient object program may be assured by precedingthe part by a sequence of declarations containing those definingindicators.}{The definition of specific sublanguages and also the specification ofactions not definable by any program (e.g., compilation or initiation of theelaboration) is not given in this Report. See, however, 9.2 for thesuggested use of pragmats to control such actions.}PART IIFundamental Constructions{This part presents the essential structure of programs:• the general rules for constructing them:ALGOL <strong>68</strong> Revised Report 53• the ways of defining indicators and their properties, at each new levelof construction;• the constructs available for programming primitive actions.}3~. 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. Syntaxa) *phrase : SOME unit{32d} ; NEST declaration of I)ECS{41a}.b) * SORT MODE expression : SORT MODE NEST UNIT{SA}.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{48a,b}.f) * NEST range : SOID NEST serial clause defining LAYER{32a} ;SOID NEST chooser CHOICE STYLE clause{34b} ;SOlD 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. SemanticsA "nest" is a 'NEST'. The nest "of" a construct is the 'NEST" envelopedby 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 formingthe environment in which that construct is to be interpreted.Those constructs which are contained in a range R, but not in anysmaller range contained within R, may be said to comprise a "reach". Allconstructs in a given reach have the same nest, which is that of theimmediately 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.}3.1. Closed clauses{Closed.clauses are usually used to construct units from serial-clausesas, e.g.,(real x; read (x); x) in(real x; read (x); x) + 3.14.}

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!