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.

48 van Wijngaarden, et al.2.1.4.3. Initiation, completion and terminationa) An action is either "active" or "inactive".An action becomes active when it is "initiated" {b,c} or "resumed" {g}and it becomes inactive when it is "completed" {c,d}, "terminated" {e},"halted" {f} or "interrupted" {h}.b) When a serial action is "initiated", then the first of its directactions is initiated. When a collateral action is "initiated", then all of itsdirect actions are initiated.c) When an inseparable action is "initiated", it may then be carriedout {see 2.1.4.2.e}, whereupon it is "completed".d) A serial action is "completed" when its last direct action has beencompleted. A collateral action is "completed" when all of its direct act i.ushave been completed.e) When an action A {whether serial or collateral] is "terminated.then all of its direct actions {and hence all of its descendent actions} areterminated {whereupon another action may be initiated in its place}.{Termination of an action is brought about by the elaboration of a jump(5.4.4.2) .}f) When an action is "halted", then all of its active direct actions landhence all of its active descendent actions} are halted. {An action may behalted during a "calling" of the routine yielded by the operator down(10.2.4.d), whereupon it may subsequently be resumed during a calling ofthe routine yielded by the operator up (10.2.4.e).}If, at any time, some action is halted and it is not descended from a"process" of a "parallel action" {10.2.4} of whose other process(es) therestill exist descendent active inseparable actions, then the furtherelaboration is undefined. {Thus it is not defined that the elaboration of thecollateral-clause inbegin sema sergei = level O;(par begin (down sergei; print (pokrovsky)), skip end,(read (pokrovsky); up sergei))andwill ever be completed.}g) When an action A is "resumed", then those of its direct actionswhich had been halted, consequent upon the halting of A are resumed.h) An action may be "interrupted" by an event [e.g., "overflow"] notspecified by the semantics of this Report but caused by the computer if ilsALGOL <strong>68</strong> Revised Report 49limitations {2.2.2.b} do not permit satisfactory elaboration. When an acli(mis interrupted, then all of its direct actions, and possibly its direct i)aremalso, are interrupted. {Whether, after an interruption, that action isresumed, some other action is initiated or the elaboration of the programends, is left undefined by this Report.]{The effect of the definitions given above is as follows:During the elaboration of a program (2.2.2.a) the elaboration of itsclosed-clause in the empty primal environ is active. At any given moment.the elaboration of one scene may have called for the elaboration of someother scene or of several other scenes collaterally. If and when theelaboration of that other scene or scenes has been eoml)leted, the nextstep of the elaboration of the original scene is taken, and so on until it. inturn, is completed.It will be seen that all this is analogous to the calling (21' one subroutineby another; upon the completion of the execution of the called subroutim,,the execution of the calling subroutine is continued: the semantic rulesgiven in this Report for the elaboration of the various paranotionscorrespond to the texts of the subroutines; the semantic rules may even.in suitable circumstances, invoke themselves recursively (but with adifferent construct or in a different environ on each occasion).Thus there exists, at each moment, a tree of active actions descended(2.1.4.2.b) from the elaboration of the program.}2.1.5. Abbreviations{In order to avoid some long and turgid I)hrases which would otherwisehave been necessary in the Semantics, certain abbreviations are usedfreely throughout the text of this Report.]a) The phrase "the A of B", where A and B arc paranotions, stands for"the A which is a direct descendent {1.1.3.2.f} of B".{This permits the abbreviation of "direct descendent of" to "of" or "ils",e.g., in the assignation (5.2.l.l.a) i := 1, i is "its" destination (or i is Ill(',or a, destination "of" the assignation i := 1), whereas i ix nol a (le.~tinationof the serial-clause i := 1; j := 2 (although it is a constituent dcstinalion(1.1.4.2.d) of it).}b) The phrase "C in E", where C is a construct and E is an environ.stands for "the scene composed {2.l.l.l.d} of C and E". It is sometinmseven further shortened to just "C" when it is clear which environ is meam.{Since the process of elaboration (2.1.4.l.a) may be al)plied only I[)scenes, this abbreviation appears most frequently in t'ornls such as "A hmpclauseC, in an environ El, is elaborated ... " (3.5.2) and "An assignation Ais elaborated ... " (5.2.1.2.a, where it is tile elaboration of A in anyappropriate environ that is being discussed).}

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

Saved successfully!

Ooh no, something went wrong!