Chapter 10
Keywords: pame

#
Chapter 10

Ex 10.1
  Deproceduring and dereferencing (not weakly-dereferencing).
Ex 10.2
  None.
Ex 10.3

  (a)
    Yes.
  (b)
    No (cannot widen).
  (c)
    No (cannot dereference).
  (d)
    No (cannot row).
  (e)
    No (cannot dereference).
  (f)
    No (cannot unite after rowing).

Ex 10.4

  (a)
    Row-display, structure-display, collateral clause.
  (b)
    Parallel clause.
  (c)
    Case clause.
  (d)
    Conformity clause.
  (e)
    Conditional clause.
  (f)
    Closed clause or enclosed clause.

Ex 10.5

  (a)
    Weak.
  (b)
    Meek.
Ex 10.6

  (a)
    6 (4 denotations, 1 applied-identifier, 1 closed clause).
  (b)
    5 (1 denotation, 3 applied-identifiers, 1 call).
  (c)
    5 (1 denotation, 3 applied-identifiers, 1 slice).
  (d)
    (1 denotation, 1 closed clause, 1 cast, 1 applied-identifier).

Ex 10.7
  The identifier of a structure or a name referring to a structure.
Ex 10.8
  A selection.
Ex 10.9

  (a)
    2.
  (b)
    3.
  (c)
    3.
  (d)
    4.

Ex 10.10

  (a)
    A primary.
  (b)
    A primary.
  (c)
    A secondary.
  (d)
    A primary.
  (e)
    A primary.
  (f)
    Tertiary.
  (g)
    Enclosed clause.
  (h)
    A quaternary.
  (i)
    It is not a unit.
  (j)
    A quaternary.
Ex 10.11

  (a)
    2 denotations + 2 applied-identifiers = 4 primaries. 1 closed clause. 3 formulæ = 3 tertiaries.
  (b)
    1 denotation + 3 applied-identifiers = 4 primaries. 3 formulæ = 3 tertiaries.
  (c)
    2 applied-identifiers + 1 call = 3 primaries.
  (d)
    3 denotations + 1 applied-identifier + 1 slice = 5 primaries.
  (e)
    2 denotations + 3 applied-identifiers = 5 primaries; 1 conditional clause = 1 enclosed clause, 2 formulæ = 2 tertiaries, 1 assignment = 1 quaternary.
  (f)
    2 denotations + 5 applied-identifiers = 7 primaries, 1 formula = 1 tertiary, 1 assignation = 1 quaternary, 1 case clause + 1 conditional clause = 2 enclosed clauses.
  (g)
    2 denotations + 2 applied-identifiers = 4 primaries, 2 assignments = 2 quaternaries, 1 parallel clause = 1 enclosed clause.

Ex 10.12

  (a)
    The conditional clause can yield a value of mode `REF INT` or `REF REAL`. In a firm context, these can be coerced to `INT` and `REAL`. Thus the `INT` is widened to `REAL` and the balanced clause yields a value of mode `REAL`.
  (b)
    The conditional clause in a soft context will yield `REF INT` or `REF REAL`. Neither can be coerced to the other in a strong context, so the clause cannot be balanced. The error message from the compiler arises from the coercions applied in a strong context for the attempted balancing.
  (c)
    The conformity clause yields `INT` or `REAL`. In a strong context, `INT` can be widened to `REAL`. Thus the balanced clause will yield `REAL`.
  (d)
    The conditional clause yields `INT` or whatever. In a strong context, `SKIP` will yield `INT`. Thus the balanced clause yields `INT`. However, the result will be undefined if the `SKIP` is used in the assignment.

Ex 10.13

  (a)
    Yes.
  (b)
    Yes.
  (c)
    No.
  (d)
    No.
  (e)
    Yes.
  (f)
    Yes.
  (g)
    Yes.
  (h)
    No.
  (i)
    Yes! It's an example in the “Revised Report”.