[m-users.] Performance of solutions module
Peter Wang
novalazy at gmail.com
Wed Nov 7 10:20:27 AEDT 2018
On Tue, 06 Nov 2018 09:10:15 +1100 (AEDT), "Zoltan Somogyi" <zoltan.somogyi at runbox.com> wrote:
>
>
> On Mon, 5 Nov 2018 08:15:15 -0500, Charlie McGee <c4cypher at gmail.com> wrote:
> > Thank you for the clarification on this. I am still learning. I'm starting
> > to get a decent grasp of how the language works in a single solution
> > context, but I'm still learning how the compiler handles nondet code. One
> > of my biggest points of confusion/frustration is how cc_multi and cc_nondet
> > work exactly, the semantics of the comitted choice modes. Do they work in
> > terms of a greedy 'first result is good enough if called in a single
> > solution context'? I need to work on my understanding on how det code
> > works with nondet code.
>
> There are two kinds of semantics that are relevant here. One is the
> declarative semantics: what a piece of code is supposed to mean.
> The other is the operational semantics: what the compiled version
> of that code actually does. Mercury is a declarative language
> because in almost all cases, the compiler is required to ensure
> that the operational semantics matches the declarative semantics.
>
> Committed choice code is one of the main exceptions.
I've taken the liberty of copying this explanation to the wiki.
Peter
More information about the users
mailing list