[mercury-users] cost/benefit analysis of non-determinism in Mercury

Michael Day mikeday at yeslogic.com
Wed Jan 28 07:05:51 AEDT 2004

> One of Mercury's distinguishing characteristics is its support for
> non-determinism.  However, my gut feeling is that people using Mercury for
> writing real, large programs use non-determinism very little.  Can anyone
> estimate the number of predicates in the Mercury compiler (or other large
> Mercury programs) have a non-deterministic procedure?

That is an interesting question! In our code base:

grep "is det"        = 1031
grep "is semidet"    =  270
grep "is erroneous"  =    4
grep "is multi"      =    3
grep "is nondet"     =    2
grep "is failure"    =    1

Note that the det count is actually greatly underestimated due to 
functions with a default determinism.

> Drifting off-topic, I wonder how many people have been put off learning
> Mercury because they thought it was like Prolog?  Ie. pigeon-holed it as a
> "logic/AI" language, rather than a general-purpose language.  In my
> experience, lots of people are very dismissive of Prolog.

I have seen many people react in this way.

Best regards,


YesLogic Prince prints XML!

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