Appendix 613
the attribute-list. This is an abbreviation technique that permits writing the attribute names only once for a list of values, each of which has several subattributes.
EXAMPLE operation-times: = (add-time, store-time) has values
(10 m s, 6 m s), (20 m s. 20 m s), etc.
8.8 attribute = x-name
This is a single special attribute, defined for each entity x. See GC 10.10 for definition.
8.9 attribute = index / #
where value(index) = + integer ÷ - integer
if x is a list (more generally, of form z o z . . .)
The elements of a list (or other sequence) are automatically in ex by their number from the front (+ integer) or the end -
integer) of the list. This index can be used as an attribute.
EXAMPLE x : = (Ma, Mb, Mc, Md)
x(index: 3) = x( # : 3) = x(3) = Mc
x .4 = x . -1 = Md
9. Null symbol and optional expression
9.1 Let Æ be the null expression
class(Æ ) = the null class
Æ may occur as the defining expression in an assignment or as a member of an alternation:
x : = Æ
x÷ Æ ÷ y
Æ may occur as a member of a set or list, in which case it may be deleted from the set or list.
x, Æ , y is equivalent to x, y
9.2 If x is any expression, define the optional expression
*x to be (x÷ Æ )
Thus, if *x occurs in any expression, it means that either x can occur there or Æ
, that is, x has an optional occurrence.
EXAMPLE (1, *2,3, *4) = (1,2,3,4)÷
(1,3,4)÷
(1, 2,3)÷
(1,3)
10. Names
10.1 Names are expressions distinguished by two things:
1 They are composed of strings of characters, which are not themselves expressions.
2 They are written without spaces between the characters.
10.2 There is a special class of expressions called name-expressions, which are used to define names.
1 Name-expressions all have names that a e of the form x-name, where x is a name.
2 Name-expressions are written with spaces, which are to be removed in generating strings of characters from them.
3 Name-expressions occur only in conjunction with name-expression names, either as an assignment:
x-name : = name-expression
or s an attribute-value:
x-name: name-expression
Thus, it can always be determined when a name-expression occurs.
EXAMPLE
Q-name : = A B (1÷ 2) defines Q-nameAB1 and AB2 are the two possible Q-names.
10.3 Alphabets are defined as the alternates of their characters, e.g.,
digit : = 0÷ 1÷ 2÷ 3÷ 4÷ 5÷ 6÷ 7÷ 8÷ 9
Capital letters, small letters, marks, and characters, as laid out in GC 3.3, are defined similarly.
10.4 If x is any set of characters, then
x-string
is a string of such characters of indefinite length (at least one) with no spaces between.
EXAMPLE
digit-string contains 1, 1354, 65487, etc.COMMENT
Note that expression-variables are being extended to cover sets of characters and character strings, even though these are not always expressions.10.5 name : = simple-name ÷ compound-name ÷ number-name÷ x-name
10.6 simple-name : = primitive-name ÷ phrase-name ÷ hyphen-name
primitive-name : = (capital-letter ÷ small-letter ÷ digit)-string
phrase-name : = primitive-name_ primitive-name. ..
hyphen-name : = phrase-name_ phrase-name...
Single-names are strings of letters and digits or phrases made up of such strings with space concatenation marks (_
) (phrase-names) or with hyphens