Skip to content

Is findall/3 "Vienesse" despite being non-monotonic? #2545

Closed Answered by UWN
jjtolton asked this question in Q&A
Discussion options

You must be logged in to vote

Using findall/3 means that all the burden of correctness is relegated to the programmer. It is particularly cumbersome if the answers found contain variables even more so when attached with constraints. Note that Scryer (like SICStus) does not copy the constraints

?- findall(X,dif(X,1),Xs).
   Xs = [_A].

But also in the case of ground answers (thus just solutions), the code remains non-monotonic.

(I am not so happy that you call this Viennese (or not). This is about program properties only, regardless where they came from. Maybe it is better to talk about purity, but then this is also overused)

Replies: 5 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@jjtolton
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by jjtolton
Comment options

You must be logged in to vote
2 replies
@bakaq
Comment options

@jjtolton
Comment options

Comment options

You must be logged in to vote
1 reply
@jjtolton
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants