[m-users.] Determinism woes...
Mark Brown
mark at mercurylang.org
Fri Jul 5 22:16:46 AEST 2019
Hi Richard,
On Fri, Jul 5, 2019 at 9:43 PM Richard O'Keefe <raoknz at gmail.com> wrote:
>
> Some Prolog systems offer a so-called "soft cut".
> For example, in SWI Prolog, GNU Prolog, Jekejeke Prolog, and I think Yap:
>
> %% A B
> ?- ((X = 1 ; X = 2) *-> Y = yes ; Y = no).
> X = 1,
> Y = yes ;
> X = 2,
> Y = yes.
>
> The soft cut removed the choice point at B but not the choice point at A.
> Colour me stupid, but I've never quite figured out what this *means*.
Quite right, as it doesn't have a meaning. Consider:
?- X = 3, ((X = 1 ; X = 2) *-> Y = yes ; Y = no).
X = 3,
Y = no.
This solution isn't an instance of any of the ones above, yet it ought
to be because I have only added a conjunct. So the "soft" cut doesn't
have a declarative meaning that is independent of the mode.
Mark
More information about the users
mailing list