[mercury-users] Indexing & operational semantics

Peter Schachte schachte at cs.mu.OZ.AU
Wed Feb 2 16:27:56 AEDT 2000


On Wed, Feb 02, 2000 at 03:36:08PM +1100, Fergus Henderson wrote:
> The next question is what the relative precedence of `&' (parallel
> conjunction) and `&&' (sequential conjunction) should be.
> Should `a & b && c & d' associate as `(a & b) && (c & d)'
> or as `a & (b && c) & d'?
>
> For that one, Richard O'Keefe's argument about disallowing
> such expressions on the grounds that they are likely to be
> confusing is stronger.

Perhaps, but it's still going to be a nuissance to have to split an
existing clause into two separate clauses just because you want to
introduce a precondition to a clause that uses parallel conjunction.
I think it would be less draconian, and just clear, to require
explicit parenthesis.  So I guess I'm beginning to like Fergus'
approach of making precedence a partial order, which would allow
this.

>  However, that would require some
> changes to our current operator-precedence parsing method,
> so it's a bit more difficult to implement.

If you just want to forbid mixing && and & in a clause, you could do
that after parsing.

-- 
Peter Schachte                     How does a project get to be a year late?
mailto:schachte at cs.mu.OZ.AU        ... One day at a time. -- Frederick
http://www.cs.mu.oz.au/~schachte/  Brooks, _The Mythical Man Month_ 
PGP: finger schachte at 128.250.37.3  
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list