[m-rev.] for review: timestamp.m: fix order-of-eval problem

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Nov 19 14:23:35 AEDT 2002


On 19-Nov-2002, Ralph Becket <rafe at cs.mu.OZ.AU> wrote:
> We've talked before about adding ordered-conjunction (P && Q).
> 
> I'm prepared to do the hacking: is there anything more to it than
> transforming
> 
> 	(P && Q)
> 
> into
> 
> 	(if P' then X1 = X1', ..., Xn = Xn', Q else false)
>
> (which should eventually be optimized back into an ordered conjunction)
> where if the Xi are the output non-locals of P then
> 
> 	P' = P[X1'/X1, ..., Xn'/Xn]

I think that transformation would not handle dynamic modes or partially
instantiated modes properly.  That transformation only works if the
initial insts of the Xi are all "free", not if they are partially
instantiated or if they have the "any" inst.

Also, at what point in the compilation process were you thinking of
doing this transformation?  If it is done before semantic analysis
is finished, then the result will be confusing error messages,
because the errors will refer to the transformed code rather than the
source code.

-- 
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