106 van Wijngaarden, et al.'HEAD's were 'union of', the equivalence is determined by examining thecorresponding components, according to the following scheme:rule 'TAll,ETY' componentsd 'FIELDS mode" 'FIEI,I)S'e "PARAMETERS yielding MOll)" 'PARAME'I'I.:I{~" and "MOll)"f 'FIELDS FIEI,I)' 'FIEI,I)S" and "I,'IEI,I)'f 'PARAMETERS PARAMETER" 'PARAMETERS" and "PARAMETER'i 'MODE field TAG' 'MOI)E" and "TA(;"j 'MODE parameter' 'MODE"In the case of unions, the "TAILETY's are of the form 'MOOI)SI mode' and'MOODS2 mode'. Since 'MOOD's within equivalent unions may commute.as in the modes specified by union (real, int) and union (int, real), theequivalence is determined by checking that "MOOI)SI' is a subset of"MOOI)S2' and that 'MOODS2' is a subset of 'MOOI)SI', where the subsettest, of course, invokes the equivalence test recursively (rules k,l,m,n,o,p).A 'MOLD' is developed (rule c) into the form "HEAD TAII,EI"~' bydetermining that(i) it is already of that form: in which case markers ('yin' and 'yang')may be placed in its 'SAFE' for the later determination of well-formedness(see 7.4) :(if) it is some 'MU definition of MODE': in which case "MU has MOI)E' isstored in its 'SAFE' (provided that this particular "MU" is not therealready) and the "MOI)E' is developed:(iii) it is some 'MU application': in which case there must be some 'MIIhas MODE' in its 'SAFE' already. That 'MODE" is then developed after awell-formedness check (see 7.4) consisting of the determination that thereis at least one 'yin" and at least one "yang' in the 'SAFE" which is morerecent than the "MU has MODE'.}{Before a pair of 'TAILETY's is tested for equivalence, it isremembered in the 'SAFE" that the original pair of "MOII)'s is being tested.This is used to force a shortcut to "WHETHER true" if these 'MOlD'sshould ever be tested again for equivalence lower down the productiontree. Since the number of pairs of component 'MOlD's that can be derivedfrom any two given 'MOlD's is finite, it follows that the testing processterminates.It remains to be shown that the process is correct. Consider theunrestricted (possibly infinite) production tree that would be obtained ifthere were no shortcut in the syntax (by omitting the first alternativetogether with the first member of the other alternative of rule b). If two'MOlD's are not equivalent, then there exists in their mode trees ashortest path from the top node to some node exhibiting a difference.Obviously, the reflection of this shortest path in the unrestrictedproduction tree cannot contain a repeated test for the equivalence of anypair of 'MOlD's, and therefore none of the shortcuts to "WHETHER true" inALGOL <strong>68</strong> Revised Report 107the restricted production tree can occur on this shortest path.Consequently, the path to the difference must be present also in the(restricted) production tree produced by the syntax. If the testing processdoes not exhibit a difference in the restricted tree, then no difference canbe found in any number of steps; i.e., the "MOll)'s are equivalent.}7.4. Well-formedness{A mode is well formed if(i) the elaboration of an actual-declarer specifying that mode is a finiteaction (i.e., any value of that mode can be stored in a finite memory)and(if) it is not strongly coercible from itself (since this would lead toambiguities in coercion).}7.4.1. Syntaxa) WHETHER (NOTION) shields SAFE to SAFE{73c} :where (NOTION) is (PLAIN)or (NOTION) is (FLEXETY ROWS of)or (NOTION) is (union of) or (NOTION) is (void),WHETHER true.b) WHETHER (PREF) shields SAFE to yin SAFE{73e} : WHETHER true.e) WHETHER (structured with) shields SAFE to yang SAFE{73c} :WHETHER true.d) WHETHER (procedure with) shields SAFE to yin yang SAFE{73c} :WHETHER true.[As a by-product of mode equivalencing, modes are tested for. wellformedness(7.3.1.c). All nonrecursive modes are well formed. Forrecursive modes, it is necessary that each cycle in each spelling of thatmode (from 'MU definition of MODE" to "MU application') passes throughat least one "HEAD' which is yin, ensuring condition (i) and one (possiblythe same) 'HEAD" which is yang, ensuring condition (if). Yin 'HEAD's are"PREF' and 'procedure with'. Yang "HEAD's are 'structured with' and'procedure with'. The other 'HEAD's, including "FLEXETY ROWS of" and'union of', are neither yin nor yang. This means that the modes specifiedby a, b and c inmode a = struct (int n, role next), b = struct (proc b next), c = proc (c) care all well formed. However, mode d = [1 : 10] d, e = union (int, e) is nota mode-declaration.}{TaD produced the one.The one produced the two.The two produced the three.And the three produced the ten thousandthings.The ten thousand things carry the yin andembrace the yang, and through theblending of the material force they achieveharmony.Tao-te Ching, 42,Lao Tzu.}
108 van Wijngaarden, et al.ALGOL <strong>68</strong> Revised Report109PART IVElaboration-independent constructions{Examples:a) 4096c) 4}b) 409<strong>68</strong>. Denotations{Denotations, e.g., 3.14 or "abc", are constructs whose Yields areindependent of any action. In other languages, they are sometimes termed"literals" or "constants".}8.0.1. Syntaxa) MOlD NEST denoter{SD,A341i} : pragment{92a} sequence option,MOlD denotation{810a,811a,g12a,813a,814a,815a,82a,b,c,83a,-}.{The meaning of a denotation is independent of any nest.}8.1. Plain denotations{Plain-denotations are those of arithmetic values, truthcharacters and the void value, e.g., 1, 3.14, true, "a" and empty.}8.1.0.1. SyntaxA) SIZE :: long ; short.B) *NUMERAL :: fixed point numeral ; variable point numeralfloating point numeral.a) SIZE INTHEAL denotation{a,80a} ..SIZE symbol{94d}, INTREAL denotation{a,811a,812a}.b) *plain denotation : PLAIN denotation{a,811a,812a,813a,814a}void denotation{815a}.{Example:a) long 0 }8.1.0.2. Semanticsvalues,The yield W of an INTREAL-denotation is the "intrinsic value" {8.1.1.2,8.1.2.2.a,b} of its constituent NUMERAL;• it is required that W be not greater than the largest value of mode'INTREAL' that can be distinguished {2.1.3.1.d}.{An INTREAL-denotation yields an arithmetic value {2.1.3A.a}, butarithmetic values yielded by different INTREAL-denotations are notnecessarily different (e.g., 123.4 and 1.234~o+2). }8.1.1. Integral denotations8.1.1.1. Syntaxa) integral denotation{80a,810a} : fixed point numeral{b}.b) fixed point numeral{a,812c,d,f,i,A341h} : digit cypher{e} sequence.c) digit cypher{b} : DIGIT symbol{94b},8.1.1.2. SemanticsThe intrinsic value of a fixed.point-numeral N is the integer of whichthe reference-language form of N {9.3.b} is a decimal representation.8.1.2. Real denotations8.1.2.1.a)b)c)d)e)f)g)h)i)J)Syntax{Examples:real denotation{80a,810a} :variable point numeral{b} ; floating point numeral{e}.variable point numeral{a,f} :integral part{c} option, fractional part{d}.integral part[b} : fixed point numeral{811b}.fractional part{b} : point symbol{94b}, fixed point numerai{811b}.floating point numeral{a} : stagnant part{f}, exponent part{g}.stagnant part{e} :fixed point numeral{811b} ; variable point numeral{b}.exponent part{e} : times ten to the power choice{h}, power of ten{i}.times ten to the power choice{g} :times ten to the power symbol{94b} ; letter c symbol{94a}.power of ten{g} : plusminus{j} option, fixed point numeral{811b}.plusminus{i} : plus symbol{94c} ; minus symbol{94c}.a) 0.00123 • 1.23e-3c) 0e) 1.23e-3g) e-3i) -38.1.2.2. Semanticsb) 0.00123d) .00123f) 123 • 1.23h) xo•ej) +•-}a) The intrinsic value V of a variable-point-numeral N is determinedas follows:• let I be the intrinsic value of the fixed-point-numeral of its constituentintegral-part, if any, and be 0 otherwise:• let F be the intrinsic value of the fixed-point-numeral of its fractionalpartP divided by 10 as many times as there are digit-cyphers contained inP;• V is the sum in the sense of numerical analysis of I and F.b) The intrinsic value Y of a floating-point-numeral N is determined asfollows:
- Page 2 and 3:
van Wijngaarden, et al.1.1.4.2. Par
- Page 4: Acknowledgements{Habent sua fata li
- Page 8 and 9: 14 van Wijngaarden, et al.0.3.4. Mo
- Page 10 and 11: . . . . . . . 4 " ' 0 . . . . . . .
- Page 12 and 13: 22 van Wijngaarden, et al.• let P
- Page 14 and 15: 26 van Wijngaarden, et al.{Since so
- Page 16 and 17: 30 van Wijngaarden, et aLloperandfo
- Page 18 and 19: 34 van Wijngaarden, et al.j) WHETHE
- Page 20 and 21: 38 van Wijngaarden, et al.A protono
- Page 22 and 23: 42 van Wijngaarden, et al.d) If N i
- Page 24 and 25: 46 van Wijngaarden, et al.c) {There
- Page 26 and 27: 50 van Wijngaarden, et al.c) The ph
- Page 28 and 29: 54 van Wijngaarden, et al.3.1.1. Sy
- Page 30 and 31: 58 van Wijngaarden, et al.where (RO
- Page 32 and 33: 62 van Wijngaarden, et al.1) SOlD N
- Page 34 and 35: 66 van Wijngaarden, et al.ALGOL 68
- Page 36 and 37: 70 van Wijngaarden, et el.For each
- Page 38 and 39: 74 van Wijngaarden, et al.If 'MODE"
- Page 40 and 41: 78 J van Wijngaarden, et al.C) SECO
- Page 42 and 43: 82 van Wijngaarden, et al.ALGOL 68
- Page 44 and 45: 86 van Wijngaarden. et al.ALGOL 68
- Page 46 and 47: 90 van Wijngaarden, et al.5.4.4.1.
- Page 48 and 49: 94van Wijngaarden, et al.ALGOL 68 R
- Page 50 and 51: 98 van Wijngaarden, et al.Assignati
- Page 52 and 53: 102 van Wijngaarden, et at.{A nest,
- Page 56 and 57: 110 van Wijngaarden, et al.ALGOL 68
- Page 58 and 59: 114van Wijngaarden, et al.ALGOL 68
- Page 60 and 61: 118 van Wijngaarden, et al.ALGOL 68
- Page 62 and 63: 122 van Wijngaarden, et al.style ii
- Page 64 and 65: 126 van Wijngaarden, et al.b) The c
- Page 66 and 67: 130van Wijngaarden, et al.ALGOL 68
- Page 68 and 69: 134van Wijngaarden, et al.ALGOL 68
- Page 70 and 71: 138d)e)f)g)h)i)J)k)1)m)n)van Wijnga
- Page 72 and 73: 142 van Wijngaarden, et al.physics
- Page 74 and 75: 146 van Wijngaarden, et al.gg) On s
- Page 76 and 77: 150van Wijngaarden, et al.ALGOL 68
- Page 78 and 79: 154/van Wijngaarden, et al.ALGOL 68
- Page 80 and 81: 158 van Wijngaarden, et el.fi;ref p
- Page 82 and 83: 162van Wijngaarden, et al.ALGOL 68
- Page 84 and 85: 166van Wijngaarden, et al.ALGOL 68
- Page 86 and 87: 170/van Wijngaarden, etal.ALGOL 68
- Page 88 and 89: 174J)K)L)M)N)O)P)a)b)c)d)e)van Wijn
- Page 90 and 91: 178/van Wijngaarden, et al.ALGOL 68
- Page 92 and 93: 182 van Wijngaarden, et al.• let
- Page 94 and 95: 186van Wijngaarden, et al./ALGOL 68
- Page 96 and 97: 190 van Wijngaarden, etal.composed
- Page 98 and 99: 194h)i)J)van Wijngaa(rden, et al.pr
- Page 100 and 101: 198 van Wijngaarden, et al.¢ strin
- Page 102 and 103: 202tvan Wijngaarden, et al.ALGOL 68
- Page 104 and 105:
206 van Wijngaa~den. et al.10.3.6.1
- Page 106 and 107:
210 van Wijngaarden, et al.!ALGOL 6
- Page 108 and 109:
214 van Wijngaarden, et al.inoperat
- Page 110 and 111:
218fvan Wijngaarden, et al.¢ move
- Page 112 and 113:
222 van Wijngaarden, etaL{overflow}
- Page 114 and 115:
226 van Wijngaarden, et al.ALGOL 68
- Page 116 and 117:
230max int 10.2.1.cmax real 10.2.l.
- Page 118 and 119:
234 van Wijngaarden, et al.ALGOL 68