Page:AIM-379.djvu/4

 Environment operations  Formal procedure parameters Declarations within blocks Assignments to local variables Pattern matching   Side effects  Assignments to global (or ) variables</li> <li>Input/output</li> <li>Assignments to array elements</li> <li>Assignments to other data structures</li> </ul> </li> <li>Process synchronization <ul style="list-style-type:none"> <li>Semaphores</li> <li>Critical regions</li> <li>Monitors</li> <li>Path expressions</li> </ul> </li> </ul> Often attempts are made to reduce the number of operations of each type to some minimal set. Thus, for example, there have been proofs that sequential blocks, - -, and  -  form a complete set of control operations. One can even do without - -, though the technique for eliminating it seems to produce more rather than less complexity. {Note No IF-THEN-ELSE} A minimal set should contain primitives which are not only universal but also easy to describe, simple to implement, and capable of describing more complex constructs in a straightforward manner. This is why the semaphore is still commonly used; its simplicity makes it easy to describe more complex synchronization operators. The expositors of monitors and path expressions, for example, go to great lengths to describe them in terms of semaphores [Hoare 74] [Campbell 74]; but it would be difficult to describe either of these "high-level" synchronization constructs in terms of the other.

With the criteria of simplicity, universality, and expressive power in mind, let us consider some choices for sets of control and environment operators. Side effects and process synchronization will not be treated further in this paper.

Function Invocation: The Ultimate Imperative
The essential characteristic of a control operator is that it transfers control. It may do this in a more or less disciplined way, but this discipline is generally more conceptual than actual; to put it another way, "down underneath,,  , and   all compile into  s and  s". This is why many people resist the elimination of  from high-level languages; just as the semaphore seems to be a fundamental synchronization primitive, so the   seems to be a fundamental control primitive from which, together with , any more complex one can be constructed if necessary. (There has been a recent controversy over the nested - -  as well. Alternatives such as repetitions of tests or decision tables have been examined. However, there is no denying that  - -  seems to be the simplest conditional control operator easily capable of expressing all others.)

One of the difficulties of using, however, is that to communicate information from the code gone from to the code gone to it is necessary to use global variables. This was a fundamental difficulty with the CONNIVER language [McDermott 74], for example; while CONNIVER allowed great flexibility in its control structures, the passing around of data was so undisciplined as to be completely unmanageable. It would be nice if we had