[mercury-users] Newbie problem. :)

Peter Schachte schachte at cs.mu.OZ.AU
Thu Jun 17 17:19:52 AEST 1999


On Thu, Jun 17, 1999 at 04:45:50PM +1200, Richard O'Keefe wrote:
>
> What's more, people who think it is "daft" for an exclusion rule
> to mention predicates imported from elsewhere just haven't thought
> about it hard enough.  For example, suppose someone *else* has
> written a linear algebra package which exports a `singular(Matrix)'
> predicate.  Suppose I find it necessary to add a
> `positive_definite(Matrix)' predicate.  Why should I be forbidden
> to say that
> 
>     :- positive_definite(M), singular(M).
> 
> just because I didn't write *all* the predicates in the rule?

The problem is that if you do, and if someone later edits the linear
algebra pacakge, they don't know that their predicate has to be
mutually exclusive with someone else's.  Alright, in this case it's
probably not a problem, but in many cases is might be.  The only
sensible way I can see to allow the declaration of mutual exclusion
among predicates in multiple modules is for that declaration to be
repeated in the interface of each module that defines a predicate
involved in that exclusion.  At least then the declaration can be seen
as part of the interface for that predicate.

-- 
Peter Schachte                     History teaches us that men and nations
mailto:schachte at cs.mu.OZ.AU        behave wisely once they have exhausted
http://www.cs.mu.oz.au/~schachte/  all other alternatives.
PGP: finger schachte at 128.250.37.3      -- Abba Eban 
--------------------------------------------------------------------------
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