| OCR Text |
Show 103 lazy reduct i on. Section 6.2 t hen discusses a combined model supporting both functions and logic. Parallel execution strat egies are discussed in Section 6.3. The f inal section contains a discu ssion of re lated work. In what fo ll ows, we wi ll use Edinburgh DEC- 10 Prolog notation. We will sometimes use " (up arrow) for the list constructor cons, for example, w riting [A I X] as A"X for conveni enc e. The reader should think of this and other con-stru ctors as merely symbols w ithout predefin ed meanings. 6.1 The Underlying Functional Model The f unctional model desc ribed here consists of a set of f unction defini-tions where each function is defined by a set of equations. We will assume t he existence of a set of predefined primitives, e.g., some primitive boolean func-tions and ar ithmetic operations. * Furthermore, if a variable appears in t he righthand side of an equation it must appear in the lefthand side of that equa-tion. We will henceforth denote the set of function definitions by EON. Base constructors (e.g., 0, [], 0, etc.) and constructors (e.g., successor, cons, push, etc.) can be freely invented by the user. The lefthand side of an equation can have more than one set of parameters (see Example 10 below). The following examples serve to illustrate the syntax of functional declarations. Our first example deals with data type Queue which has been widely used as an example in the literature related to algebraic specifications. A queue is a first-in-first-out storage structure. The operations on the queue shown below are self-explanatory. The function add is used as a constructor, and is used to "build up" queues. * This assumption is merely for convenience, since such a set of primiti ves can in fact be defined equationally. |