[mercury-users] Error detection rate in Mercury vs Other Languages (esp C++ and Python)

Julien Fischer juliensf at csse.unimelb.edu.au
Sat Dec 3 18:11:29 AEDT 2011




On Sat, 3 Dec 2011, Michael Day wrote:

>> Or you can just require the switch to be complete, e.g
>> 
>> require_complete_switch [X] (
>
> Just for fun, one could argue that all switches should be det by default, and 
> a short keyword should be required to introduce a semidet switch, eg.
>
>    semidet [X] ( ... )

But what exactly do you mean by a "semidet switch"?  Is it (1) an
incomplete switch or (2) a switch in which one or more of the arms has
a body that can fail or (3) both?  Just sticking semidet in front of it
seems ambiguous.

> Admittedly, this might not fit well with semidet predicate heads that are 
> implicitly expanded into switches,

Neither does require_complete_switch, but you can get around that issue
by avoiding head unifications and using a single clause.

Julien.
--------------------------------------------------------------------------
mercury-users mailing list
Post messages to:       mercury-users at csse.unimelb.edu.au
Administrative Queries: owner-mercury-users at csse.unimelb.edu.au
Subscriptions:          mercury-users-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the users mailing list