[m-users.] Just saying thank you, determinism rocks.

Volker Wysk post at volker-wysk.de
Thu Jul 29 16:53:54 AEST 2021


Hi!

Am Donnerstag, den 29.07.2021, 16:42 +1000 schrieb Zoltan Somogyi:
> 2021-07-29 16:40 GMT+10:00 "Volker Wysk" <post at volker-wysk.de>:
> > Am Mittwoch, den 28.07.2021, 20:42 +1000 schrieb Zoltan Somogyi:
> > > 2. You can quantify away all the output variables of a cc_multi
> > >     or cc_nondet computation. The different solutions of such
> > >     computations differ only in the values of its output variables,
> > >     so if you ignore all of them, the solutions are indistinguishable
> > >     from the point of the caller. A cc_multi computation whose
> > >     outputs are quantified away is det, while a cc_nondet computation
> > >     with outputs quantified away is semidet.
> > 
> > I don't know what you mean by "quantify away". Is it using "_" for the
> > output variables?
> 
> Yes.

In the language reference manual (
https://www.mercurylang.org/information/doc-latest/mercury_ref/Interfacing-nondeterministic-code-with-the-real-world.html
), there it is written:

"If you just want one solution and don’t care which, the calling predicate
should be declared nondet or multi. The nondeterminism should then be
propagated up the call tree to the point at which it can be pruned."

Shouldn't this be "... should be declared cc_nondet or cc_multi..." ?

Cheers
Volker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.mercurylang.org/archives/users/attachments/20210729/2cce3393/attachment.sig>


More information about the users mailing list