[m-rev.] for review: unification expressions

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Dec 5 11:49:33 AEDT 2001


On 04-Dec-2001, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> 
> Fergus, is this change OK?

Not quite.

> On 23-Nov-2001, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> > --- doc/reference_manual.texi
> > +++ doc/reference_manual.texi
> > @@ -1078,2 +1078,2 @@
> > -The semantics of a unification expression is that @var{X} and @var{Y}
> > -are unified, and the expression is equivalent to the unified value.
> > +The meaning of a unification expression is that the arguments are unified,
> > +and the expression is equivalent to the unified value.
> > @@ -1081,8 +1081,4 @@
> > - at w{@code{Z = X @@ Y}} is equivalent to the conjunction
> > - at w{@code{Z = X, Z = Y}}.
> > -
> > -Unification expressions are most useful when writing switches
> > -(@pxref{Determinism checking and inference}).  The arguments
> > -of a unification expression are examined when checking for
> > -switches.  The arguments of an equivalent user-defined function
> > -would not be.
> > +The operational semantics of an expression @w{@code{X @@ Y}}
> > +is that the expression is replaced by a fresh variable @var{Z}, and
> > +immediately after @var{Z} is evaluated, the conjunction
> > + at w{@code{Z = X, Z = Y}} is evaluated.

This is not a completely correct statement;
it is wrong in the case when mode reordering occurs
or when the --strict-sequential option is not enabled.

The first part could be fixed by mentioning that this ordering
is subject to mode reordering (and then you'd better insert a
parenthetical cross-references to the section which describes
mode reordering, i.e. the Semantics chapter).

You could fix the second part by saying "The ``strict sequential''
operational semantics (@pxref{Semantics})" instead of "The operation
semantics".  Although the use of a term defined later in this way
is not ideal; maybe you can think of something better.

Maybe it would be better to move this text into the Semantics chapter?

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list