[mercury-users] Mutual Exclusivity & Exhaustiveness

Lars Yencken lljy at students.cs.mu.oz.au
Thu Jan 3 10:54:32 AEDT 2002


Hi everyone

I'm digging up the topic of mutual exclusivity and exhaustiveness
declarations again, in the interest of actually developping them. For
past posts on this topic, do a search for determinism detection on the
mailing lists. The declarations I had in mind were quite simple, like
these below:

:- exclusive X < A, X = A, X > A.

:- exhaustive X < A, X = A, X > A.

Places where these declarations would be useful have currently been
hacked around using if-then-else's. This change would allow the
programmer to state the exclusiveness/exhaustiveness explicitly rather
than assuming it and continuing. The actual implementation of it will
have the compiler do the if-then-else rearranging instead.

It should aslo handle declarations like the following, where many
different predicates of different variables are used, although I
imagine it to be more rare that an example like this will be used:

:- exclusive foo(X,Y,_A), bar(X,Y), bat(_B), mop(Y,_C).

Does anyone have any suggestions or comments? I'm also stumped for a
good way of declaring both at once.

Thanks

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