[m-dev.] cc_multi or det ?

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Aug 7 02:54:24 AEST 2001


On 06-Aug-2001, Holger Krug <hkrug at rationalizer.com> wrote:
> On Tue, Aug 07, 2001 at 02:27:52AM +1000, Fergus Henderson wrote:
> > > why don't we use `cc_multi' anywhere where we otherwise would use
> > > `det' ? Are there performance issues
> > 
> > No.
> > 
> > > or is it only because of a
> > > mismatch between declarative and operational semantics ?
> > 
> > Yes.
> 
> So why not to disallow `det' at all and rename `cc_multi' as `det',
...
> Is code verification the only reason (admittedly a good one) ?

No.  There are several restrictions on `cc_multi' code,
which mean that there are important things that you can do
with `det' code which you can't do with `cc_multi' code:

(1) You're not allowed to backtrack into goals with determinism
`cc_multi'.  In other words, a goal with determinism `cc_multi'
cannot be followed in a conjunction by a goal with determinism `semidet'.
This restriction is needed to ensure soundness.

(2) Functions aren't allowed to have determinism `cc_multi'
in their standard mode (`func(in, in, ...) = out').
This restriction is needed to preserve referential transparency.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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