Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maplist/2: Unexpected nondeterminism with clpz #1791

Closed
triska opened this issue Apr 22, 2023 · 4 comments
Closed

maplist/2: Unexpected nondeterminism with clpz #1791

triska opened this issue Apr 22, 2023 · 4 comments

Comments

@triska
Copy link
Contributor

triska commented Apr 22, 2023

With the following program:

:- use_module(library(clpz)).

all_eq(Vs, E) :- maplist(#=(E), Vs).

We have:

?- maplist(all_eq([A]), [0]).
   A = 0
;  A = 0, unexpected.

Expected: A = 0, deterministic success.

@UWN
Copy link

UWN commented Apr 22, 2023

(This is rather an issue of an unexpected, redundant answer. Excellent occasion to note that redundant should come before unexpected).

?- maplist(all_eq([A]), [0]).
   A = 0
;  A = 0, redundant, unexpected.
   A = 0.

Also note that unexpected only ensures that this second answer is unexpected. It does not state what is expected. Instead, also say A = 1 could be a valid answer. Because of this it is necessary to restate again what actually is expected.

@triska
Copy link
Contributor Author

triska commented Apr 22, 2023

Thank you a lot!

@triska
Copy link
Contributor Author

triska commented Aug 6, 2023

This issue is now unfortunately again present, so I am reopening it.

@triska
Copy link
Contributor Author

triska commented Aug 6, 2023

Thank you a lot, again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants