10.07.2015 Views

Algol 68 - ACM Digital Library

Algol 68 - ACM Digital Library

Algol 68 - ACM Digital Library

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

lO0van Wijngaarden, et al.ALGOL <strong>68</strong> Revised Report 1011) WHETHER MOODS MOOD is firm MOID{k,I} :WHETHER MOODS is firm MOID{I,m}or MOOD is firm MOlD{m}.m) WHETHER MOIDI is firm MOID2{k,l,n,47f} :WHETHER MOIDI equivalent MOlD2{73a}or MOIDI unites to MOID2{64b}or MOIDI deprefs to firm MOID2{n}.n) WHETHER MOIDI deprefs to firm MOID2{m} :where (MOIDI) is (PREF MOLD3),WHETHER MOLD5 is firm MOID2{m},where MOLD3 deflexes to MOID5{47a,b,c} ;where (MOIDI) is (NONPREF), WHETHER false.{To prevent the ambiguous application of indicators, as in real x, intx;x := 0, certain restrictions are imposed on defining-indicators contained ina given reach. These are enforced by the syntactic test for "independence"of properties enveloped by a given 'LAYER' (rules a, b, c). A sufficientcondition, not satisfied in the example above, for the independence of apair of properties, each being some 'QUALITY TAX', is that the 'TAX'sdiffer (rule c). For "TAX's which are not some "TAO', this condition is alsonecessary, so that even real x, int x; skip is not a serial-clause.For two properties 'QUALITY1 TAO" and "Q[IALITY2 TAO' the test forindependence is more complicated, as is exemplified by the serial-clauseop + = (int i) bool : true, op + = (int i, j) int : 1, op + = (int i, bool j) int : 2,prio + = 6;0++0¢=2¢.Ambiguities would be present inprio+=6, += 7; 1+2x3 ¢ 7 or 97 ¢ ,inop z = (int i) int : i, mode z = int;z i ¢ formula or declaration? ¢ ; skip ,and inop ? = (union (tel real, char) a) int : I, op ? = (real a) int : 2;? loc real ¢ l or27¢.In such cases a test is made that the two 'QUALITY's are independent(rules c, d). A "MOLD TALLY' is never independent of any "QUALITY'(rule d). A 'MONO' is always independent of a 'DUO' (rules d, e, f) andboth are independent of a "DYADIC' (i.e., of a 'priority PRIO') (rules d, g,h). In the case of two 'PRAM's which are both 'MONO' or both "DUO',ambiguities could arise if the corresponding parameter modes were"firmly related", i.e., if some (pair of) operand mode(s) could be firmlycoerced to the (pair of) parameter mode(s) of either 'PRAM' (rules i, j).In the example with the two definitions of 7, the two 'PRAM's are relatedsince the modes specified by union (ref real, char) and by real are firmlyrelated, the mode specified by ref real being firmly coercible to either one.It may be shown that two modes are firmly related if one of them, orsome component "MOOD' of one of them, may be firmly coerced to theother (rules k, 1), which requires a sequence of zero or more meekcoercions followed by at most one uniting (6.4.1.a). The possibility orotherwise of such a sequence of coercions between two modes isdetermined by the predicate 'is firm' (rules m, n).A "PROPI" also renders inaccessible a 'PROP2" in an outer 'LAYER' ifthat 'PROP2' is not independent of 'PROPI'; e.g.,begin int x;begin real x; ¢ here the 'PROPI' is 'reference to real letter x'¢skipendendand likewisebegin op ? = (int i) int : 1, int k : = 2;begin op ? = (ref int i) int " 3;? k ¢ delivers 3, but ? 4 could not occur here because itsoperator is inaccessible ¢endend .}7.2. Identification in nests{This section ensures that for each applied-indicatorcorresponding property in some suitable "I,AYER' of the nest.}7.2.1. Syntaxa)b)c)there is a{PROPSETY :: PROPS ; EMPTY.PROPS :: PROP ; PROPS PROP.PROP :: DEC ; LAB ; FIELD.QUALITY :: MODE ; MOlD TALLY ; DYADIC ; label ; MODE field.TAX :: TAG ; TAB ; TAD ; TAM.]WHETHER PROP identified in NEST new PROPSETY{a,48b,542a} :where PROP resides in PROPSETY{b,c,-}, WHETHER true ;where PROP independent PROPSETY{71a,b,e},WHETHER PROP identified in NEST[a,-}.WHETHER PROPI resides in PROPS2 PROP2{a,b,48d} :WHETHER PROPI resides in PROP2{c,-}or PROPI resides in PROPS2{b,e,-}.WHETHER QUALITYI TAX resides in QUALITY2 TAX{a,b,48d} :where (QUALITYI) is (label) or (QUALITYI) is (DYADIC)or (QUALITYI) is (MODE field),WHETHER (QUALITYI) is (QUALITY2) ;where (QUALITYI) is (MOIDI TALLETY)and (QUALITY2) is (MOLD2 TALLETY),WHETHER MOIDI equivalent MOID2{73a].

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!