[m-dev.] Proposal: Sometimes it's safe to assume det=cc_multi

Ralph Becket rbeck at microsoft.com
Tue Aug 7 18:47:46 AEST 2001


> From: Holger Krug [mailto:hkrug at rationalizer.com]
> Sent: 07 August 2001 08:21
> 
> OK, I have to be more specific.
> 
> What if the compiler (determinism checker) derives something like:
> 
>   :- pred mypred(..., t , ...).
>   :- mode mypred(..., di, ...) is cc_multi.
> 
> in a place where the user has declared:
> 
>   :- mode mypred(..., di, ...) is det.

I think the compiler is right to flag an error here.

`cc_multi' says that a predicate may have several solutions, but you'll
only ever see one of them (I can't guarantee I'll see the same result 
on different executions of my program).

`det' says that a predicate has exactly one solution.

To me it's an important piece of documentation that helps me understand
the code.

- Ralph
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list