| OCR Text |
Show <Equation Group> ::= {TYPE <Type-declaration-list> } EXPR <Constructor and function declarations> <function definitions> Result <expr> Figure 38: Equation group syntax 5.2.1 T e Declarations 115 Types are a named set of terms, where the set of terms is defined by a type expression. Type expressions are a machine-readable notation for regular trees (which were defined in Chapter 3). Type expressions are an extended form of regular trees in that we include a "tuple" type constructor symbol. The motivation behind this extension is given below. The following rules inductively yield the set of all type-expressions: 1. Any constructor c is a type expression. 2. Any variable a is a type expression. 3. If t is a type expression, then f: t is a type expression, where f is a constructor. 4. If r is a type expression, then r* is a type expression (tuple expression). 5. If t 1 , t 2 is a type expression, then t 1 + t 2 is a type expression. 6. If t[a] is a type expression with variable a occurring in t, then a $ t[a] is a type expression (type expression denoting the fix-point of the equation a = t[a]). We assume that "*" binds the strongest followed by "+" and "$". The semantics of type expressions are as explained in Chapter 3 on regular trees. |