Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Things are not as simple as they seems at first. -- Edward Thorp


devel / comp.lang.prolog / Re: setof/3 ---> We are all doomed!!!

SubjectAuthor
* setof/3 ---> We are all doomed!!!Mostowski Collapse
+* Re: setof/3 ---> We are all doomed!!!Mostowski Collapse
|`* Re: setof/3 ---> We are all doomed!!!Mostowski Collapse
| `* Re: setof/3 ---> We are all doomed!!!Mostowski Collapse
|  `* Re: setof/3 ---> We are all doomed!!!Mostowski Collapse
|   `* Re: setof/3 ---> We are all doomed!!!Mostowski Collapse
|    `* Re: setof/3 ---> We are all doomed!!!Mostowski Collapse
|     `* Re: setof/3 ---> We are all doomed!!!Mostowski Collapse
|      `* Re: setof/3 ---> We are all doomed!!!Mostowski Collapse
|       +* Re: setof/3 ---> We are all doomed!!!Mostowski Collapse
|       |`* Re: setof/3 ---> We are all doomed!!!Mostowski Collapse
|       | `* Re: setof/3 ---> We are all doomed!!!Mostowski Collapse
|       |  `* Re: setof/3 ---> We are all doomed!!!Mostowski Collapse
|       |   `* Re: setof/3 ---> We are all doomed!!!Mostowski Collapse
|       |    +- Re: setof/3 ---> We are all doomed!!!Mostowski Collapse
|       |    `* Re: setof/3 ---> We are all doomed!!!Mostowski Collapse
|       |     +* Re: setof/3 ---> We are all doomed!!!Mostowski Collapse
|       |     |`* Re: setof/3 ---> We are all doomed!!!Mostowski Collapse
|       |     | +- Re: setof/3 ---> We are all doomed!!!Mostowski Collapse
|       |     | `- Re: setof/3 ---> We are all doomed!!!Mostowski Collapse
|       |     `- Re: setof/3 ---> We are all doomed!!!Mostowski Collapse
|       +- Re: setof/3 ---> We are all doomed!!!Mostowski Collapse
|       `* Re: setof/3 ---> We are all doomed!!!Mostowski Collapse
|        `* Re: setof/3 ---> We are all doomed!!!Mostowski Collapse
|         `* Re: setof/3 ---> We are all doomed!!!Mostowski Collapse
|          `- Re: setof/3 ---> We are all doomed!!!Mostowski Collapse
+* Re: setof/3 ---> We are all doomed!!!Mostowski Collapse
|`* Re: setof/3 ---> We are all doomed!!!Mostowski Collapse
| `* Re: setof/3 ---> We are all doomed!!!Mostowski Collapse
|  `- Re: setof/3 ---> We are all doomed!!!Mostowski Collapse
`* Re: setof/3 ---> We are all doomed!!!Mostowski Collapse
 `- Re: setof/3 ---> We are all doomed!!!Mostowski Collapse

Pages:12
Re: setof/3 ---> We are all doomed!!!

<7ce68670-6f54-4915-a9b0-6454f23b7e3bn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=1687&group=comp.lang.prolog#1687

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:6214:c8f:b0:491:76f9:b318 with SMTP id r15-20020a0562140c8f00b0049176f9b318mr3434858qvr.22.1660844684761;
Thu, 18 Aug 2022 10:44:44 -0700 (PDT)
X-Received: by 2002:a25:33c5:0:b0:67a:6950:c188 with SMTP id
z188-20020a2533c5000000b0067a6950c188mr3951555ybz.175.1660844684279; Thu, 18
Aug 2022 10:44:44 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border-2.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.prolog
Date: Thu, 18 Aug 2022 10:44:44 -0700 (PDT)
In-Reply-To: <7e516218-8620-48ef-98b5-5f1aa0da9a6fn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=80.218.40.218; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 80.218.40.218
References: <26510ae4-0332-4804-af7b-dff4085cbd18n@googlegroups.com>
<9daa6fd9-5222-4d6d-8f46-349b78a681dbn@googlegroups.com> <82d413d1-9235-4a83-94ba-b713c681b690n@googlegroups.com>
<cbfe4bf4-f752-469d-ac5c-087557c24c8an@googlegroups.com> <899f99f6-f6b6-4cf4-8f7b-1ad240007995n@googlegroups.com>
<ab32f3f7-8b59-48bb-890e-a45c683efd21n@googlegroups.com> <86884d18-6cfd-4b96-84e2-83ff7097e283n@googlegroups.com>
<c0be3dea-ac4e-4c7c-8e0e-5b12c6bf09c2n@googlegroups.com> <c900eb05-48b8-4fe9-8ce7-625a245c3138n@googlegroups.com>
<a11e9978-0239-4df4-a5fa-fdeb622a2a23n@googlegroups.com> <da91ed38-a6ec-4e53-9144-5eea1b9c88f7n@googlegroups.com>
<5019ab73-8f4c-4ef0-9c3e-d57f396aa1e8n@googlegroups.com> <c06d4179-ce34-48e8-80da-c345f0926157n@googlegroups.com>
<ae14cf17-5652-48f7-96a6-cdc952289145n@googlegroups.com> <7e516218-8620-48ef-98b5-5f1aa0da9a6fn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <7ce68670-6f54-4915-a9b0-6454f23b7e3bn@googlegroups.com>
Subject: Re: setof/3 ---> We are all doomed!!!
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Thu, 18 Aug 2022 17:44:44 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 50
 by: Mostowski Collapse - Thu, 18 Aug 2022 17:44 UTC

C-Prolog had this:

/* File : pl/grammar
Author : Fernando Pereira
Updated: Wednesday February 1st, 1984, 8:38:15 pm
Purpose: translation of grammar rules
*/

$t_body(!, S, S, !) :- !.
$t_body([], S, S1, S=S1) :- !.
$t_body([X], S, SR, 'C'(S,X,SR)) :- !.
$t_body([X|R], S, SR, ('C'(S,X,SR1),RB)) :- !,
$t_body(R, SR1, SR, RB).
$t_body({T}, S, S, T) :- !.
$t_body((T,R), S, SR, (Tt,Rt)) :- !,
$t_body(T, S, SR1, Tt),
$t_body(R, SR1, SR, Rt).
$t_body((T;R), S, SR, (Tt;Rt)) :- !,
$t_body(T, S, S1, T1), $t_fill(S, SR, S1, T1, Tt),
$t_body(R, S, S2, R1), $t_fill(S, SR, S2, R1, Rt).
$t_body(T, S, SR, Tt) :-
$extend([S,SR], T, Tt).

No (''|')/2. But also no (->)/2 and no (\+)/1.

LoL

Mostowski Collapse schrieb am Dienstag, 16. August 2022 um 02:19:36 UTC+2:
> I still don't understand why '|' even landed in DCG,
> it only causes problems. Back in the 1980's nobody
>
> used DCG like that:
>
> The first clause on the right-hand side:
> verb (change) — >
> [c] ; [ch] ; [change] ; [set] .
> is satisfied if the token is any one of the four listed
> (the ";" is Prolog's way of ex- pressing the OR relation among clauses).
> https://archive.org/details/byte-magazine-1987-08/page/n181/mode/2up
>
> And still your own folks nowadays dont use '|':
> ```
> json_ws -->
> ( parsing ->
> json_ws_greedy
> ; json_ws_lazy
> ).
> ```
> https://github.com/mthom/scryer-prolog/blob/master/src/lib/serialization/json.pl

Re: setof/3 ---> We are all doomed!!!

<d7f334fe-fb53-48cc-952c-13f2ed1d3b3an@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=1708&group=comp.lang.prolog#1708

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:620a:955:b0:6be:74ee:c66c with SMTP id w21-20020a05620a095500b006be74eec66cmr12088490qkw.511.1661907762421;
Tue, 30 Aug 2022 18:02:42 -0700 (PDT)
X-Received: by 2002:a25:7750:0:b0:692:fb4a:50e3 with SMTP id
s77-20020a257750000000b00692fb4a50e3mr13897508ybc.431.1661907762158; Tue, 30
Aug 2022 18:02:42 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.prolog
Date: Tue, 30 Aug 2022 18:02:41 -0700 (PDT)
In-Reply-To: <26510ae4-0332-4804-af7b-dff4085cbd18n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=80.218.40.218; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 80.218.40.218
References: <26510ae4-0332-4804-af7b-dff4085cbd18n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d7f334fe-fb53-48cc-952c-13f2ed1d3b3an@googlegroups.com>
Subject: Re: setof/3 ---> We are all doomed!!!
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Wed, 31 Aug 2022 01:02:42 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1814
 by: Mostowski Collapse - Wed, 31 Aug 2022 01:02 UTC

Intersting bug in Scryer Prolog, only one solution:

$ ../target/release/scryer-prolog -v
"v0.9.0-175-g6b8e6204"
$ ../target/release/scryer-prolog
?- [tictac].
true.
?- best(["x-o", "o-x", "-x-"],x,Y).
Y = ["x-o","o-x","-xx"].

But then SWI-Prolog gives me 4 solutions:

/* SWI-Prolog (threaded, 64 bits, version 8.5.14) */
?- set_prolog_flag(double_quotes, chars).
true.

?- best(["x-o", "o-x", "-x-"],x,Y).
Y = [[x, x, o], [o, -, x], [-, x, -]] ;
Y = [[x, -, o], [o, x, x], [-, x, -]] ;
Y = [[x, -, o], [o, -, x], [x, x, -]] ;
Y = [[x, -, o], [o, -, x], [-, x, x]].

Test case is here in this tar ball:

http://www.rubycap.ch/gist/bench.tar.gz

Re: setof/3 ---> We are all doomed!!!

<11835e2d-66d3-47be-9b08-3a6bfd76868cn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=1709&group=comp.lang.prolog#1709

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:620a:290d:b0:6b5:cecc:1cab with SMTP id m13-20020a05620a290d00b006b5cecc1cabmr13628226qkp.465.1661908194840;
Tue, 30 Aug 2022 18:09:54 -0700 (PDT)
X-Received: by 2002:a81:d353:0:b0:31e:2888:93a1 with SMTP id
d19-20020a81d353000000b0031e288893a1mr15800534ywl.498.1661908194439; Tue, 30
Aug 2022 18:09:54 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.prolog
Date: Tue, 30 Aug 2022 18:09:54 -0700 (PDT)
In-Reply-To: <d7f334fe-fb53-48cc-952c-13f2ed1d3b3an@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=80.218.40.218; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 80.218.40.218
References: <26510ae4-0332-4804-af7b-dff4085cbd18n@googlegroups.com> <d7f334fe-fb53-48cc-952c-13f2ed1d3b3an@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <11835e2d-66d3-47be-9b08-3a6bfd76868cn@googlegroups.com>
Subject: Re: setof/3 ---> We are all doomed!!!
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Wed, 31 Aug 2022 01:09:54 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2291
 by: Mostowski Collapse - Wed, 31 Aug 2022 01:09 UTC

And Trealla has also no problem:

$ ../tpl -v
Trealla Prolog (c) Infradig 2020-2022, v2.1.11
$ ../tpl
?- ['tictac.p'].
true.
?- best(["x-o", "o-x", "-x-"],x,Y).
Y = ["xxo","o-x","-x-"]
; Y = ["x-o","oxx","-x-"]
; Y = ["x-o","o-x","xx-"]
; Y = ["x-o","o-x","-xx"].

Mostowski Collapse schrieb am Mittwoch, 31. August 2022 um 03:02:43 UTC+2:
> Intersting bug in Scryer Prolog, only one solution:
>
> $ ../target/release/scryer-prolog -v
> "v0.9.0-175-g6b8e6204"
> $ ../target/release/scryer-prolog
> ?- [tictac].
> true.
> ?- best(["x-o", "o-x", "-x-"],x,Y).
> Y = ["x-o","o-x","-xx"].
>
> But then SWI-Prolog gives me 4 solutions:
> /* SWI-Prolog (threaded, 64 bits, version 8.5.14) */
> ?- set_prolog_flag(double_quotes, chars).
> true.
>
> ?- best(["x-o", "o-x", "-x-"],x,Y).
> Y = [[x, x, o], [o, -, x], [-, x, -]] ;
> Y = [[x, -, o], [o, x, x], [-, x, -]] ;
> Y = [[x, -, o], [o, -, x], [x, x, -]] ;
> Y = [[x, -, o], [o, -, x], [-, x, x]].
>
> Test case is here in this tar ball:
>
> http://www.rubycap.ch/gist/bench.tar.gz

Re: setof/3 ---> We are all doomed!!!

<6eba372a-6020-46f6-9bb0-354db08e195cn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=1710&group=comp.lang.prolog#1710

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:620a:4709:b0:6bb:331b:5f6a with SMTP id bs9-20020a05620a470900b006bb331b5f6amr14064754qkb.96.1661908748455;
Tue, 30 Aug 2022 18:19:08 -0700 (PDT)
X-Received: by 2002:a05:6902:2d0:b0:694:d257:4c4b with SMTP id
w16-20020a05690202d000b00694d2574c4bmr14327482ybh.316.1661908748233; Tue, 30
Aug 2022 18:19:08 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.prolog
Date: Tue, 30 Aug 2022 18:19:08 -0700 (PDT)
In-Reply-To: <11835e2d-66d3-47be-9b08-3a6bfd76868cn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=80.218.40.218; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 80.218.40.218
References: <26510ae4-0332-4804-af7b-dff4085cbd18n@googlegroups.com>
<d7f334fe-fb53-48cc-952c-13f2ed1d3b3an@googlegroups.com> <11835e2d-66d3-47be-9b08-3a6bfd76868cn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <6eba372a-6020-46f6-9bb0-354db08e195cn@googlegroups.com>
Subject: Re: setof/3 ---> We are all doomed!!!
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Wed, 31 Aug 2022 01:19:08 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2956
 by: Mostowski Collapse - Wed, 31 Aug 2022 01:19 UTC

Saw the bug first in an extremly fast tictac runtime,
and then used this fuzzer to find such a test case:

random_board([[A,B,C],[D,E,F],[H,I,J]]) :-
random_member(A, [o,-,x]),
random_member(B, [o,-,x]),
random_member(C, [o,-,x]),
random_member(D, [o,-,x]),
random_member(E, [o,-,x]),
random_member(F, [o,-,x]),
random_member(H, [o,-,x]),
random_member(I, [o,-,x]),
random_member(J, [o,-,x]).

Fuzzers are lit!

Mostowski Collapse schrieb am Mittwoch, 31. August 2022 um 03:09:56 UTC+2:
> And Trealla has also no problem:
>
> $ ../tpl -v
> Trealla Prolog (c) Infradig 2020-2022, v2.1.11
> $ ../tpl
> ?- ['tictac.p'].
> true.
> ?- best(["x-o", "o-x", "-x-"],x,Y).
> Y = ["xxo","o-x","-x-"]
> ; Y = ["x-o","oxx","-x-"]
> ; Y = ["x-o","o-x","xx-"]
> ; Y = ["x-o","o-x","-xx"].
> Mostowski Collapse schrieb am Mittwoch, 31. August 2022 um 03:02:43 UTC+2:
> > Intersting bug in Scryer Prolog, only one solution:
> >
> > $ ../target/release/scryer-prolog -v
> > "v0.9.0-175-g6b8e6204"
> > $ ../target/release/scryer-prolog
> > ?- [tictac].
> > true.
> > ?- best(["x-o", "o-x", "-x-"],x,Y).
> > Y = ["x-o","o-x","-xx"].
> >
> > But then SWI-Prolog gives me 4 solutions:
> > /* SWI-Prolog (threaded, 64 bits, version 8.5.14) */
> > ?- set_prolog_flag(double_quotes, chars).
> > true.
> >
> > ?- best(["x-o", "o-x", "-x-"],x,Y).
> > Y = [[x, x, o], [o, -, x], [-, x, -]] ;
> > Y = [[x, -, o], [o, x, x], [-, x, -]] ;
> > Y = [[x, -, o], [o, -, x], [x, x, -]] ;
> > Y = [[x, -, o], [o, -, x], [-, x, x]].
> >
> > Test case is here in this tar ball:
> >
> > http://www.rubycap.ch/gist/bench.tar.gz

Re: setof/3 ---> We are all doomed!!!

<02df5683-0bab-4c51-8e18-a18ce0bd5a09n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=1711&group=comp.lang.prolog#1711

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:620a:955:b0:6be:74ee:c66c with SMTP id w21-20020a05620a095500b006be74eec66cmr12960899qkw.511.1661938533453;
Wed, 31 Aug 2022 02:35:33 -0700 (PDT)
X-Received: by 2002:a25:e541:0:b0:696:3918:f267 with SMTP id
c62-20020a25e541000000b006963918f267mr14894156ybh.359.1661938533183; Wed, 31
Aug 2022 02:35:33 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.prolog
Date: Wed, 31 Aug 2022 02:35:32 -0700 (PDT)
In-Reply-To: <6eba372a-6020-46f6-9bb0-354db08e195cn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=80.218.40.218; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 80.218.40.218
References: <26510ae4-0332-4804-af7b-dff4085cbd18n@googlegroups.com>
<d7f334fe-fb53-48cc-952c-13f2ed1d3b3an@googlegroups.com> <11835e2d-66d3-47be-9b08-3a6bfd76868cn@googlegroups.com>
<6eba372a-6020-46f6-9bb0-354db08e195cn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <02df5683-0bab-4c51-8e18-a18ce0bd5a09n@googlegroups.com>
Subject: Re: setof/3 ---> We are all doomed!!!
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Wed, 31 Aug 2022 09:35:33 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3803
 by: Mostowski Collapse - Wed, 31 Aug 2022 09:35 UTC

Nice, Ciao Prolog can be built from GitHub.
Its blazing fast, and doesn't abort:

Test Ciao ECLiPSe
nrev 41 32
crypt 81 62
deriv 94 94
poly 66 62
qsort 79 78
tictac 174 110
queens 80 78
query 231 187
mtak 75 94
perfect 169 485
calc 82 78
Total 1’172 1’360

Was testing against ECliPSe 61 and on WSL 2.
Can ECLiPSe also be built from GitHub?

Mostowski Collapse schrieb am Mittwoch, 31. August 2022 um 03:19:10 UTC+2:
> Saw the bug first in an extremly fast tictac runtime,
> and then used this fuzzer to find such a test case:
>
> random_board([[A,B,C],[D,E,F],[H,I,J]]) :-
> random_member(A, [o,-,x]),
> random_member(B, [o,-,x]),
> random_member(C, [o,-,x]),
> random_member(D, [o,-,x]),
> random_member(E, [o,-,x]),
> random_member(F, [o,-,x]),
> random_member(H, [o,-,x]),
> random_member(I, [o,-,x]),
> random_member(J, [o,-,x]).
>
> Fuzzers are lit!
> Mostowski Collapse schrieb am Mittwoch, 31. August 2022 um 03:09:56 UTC+2:
> > And Trealla has also no problem:
> >
> > $ ../tpl -v
> > Trealla Prolog (c) Infradig 2020-2022, v2.1.11
> > $ ../tpl
> > ?- ['tictac.p'].
> > true.
> > ?- best(["x-o", "o-x", "-x-"],x,Y).
> > Y = ["xxo","o-x","-x-"]
> > ; Y = ["x-o","oxx","-x-"]
> > ; Y = ["x-o","o-x","xx-"]
> > ; Y = ["x-o","o-x","-xx"].
> > Mostowski Collapse schrieb am Mittwoch, 31. August 2022 um 03:02:43 UTC+2:
> > > Intersting bug in Scryer Prolog, only one solution:
> > >
> > > $ ../target/release/scryer-prolog -v
> > > "v0.9.0-175-g6b8e6204"
> > > $ ../target/release/scryer-prolog
> > > ?- [tictac].
> > > true.
> > > ?- best(["x-o", "o-x", "-x-"],x,Y).
> > > Y = ["x-o","o-x","-xx"].
> > >
> > > But then SWI-Prolog gives me 4 solutions:
> > > /* SWI-Prolog (threaded, 64 bits, version 8.5.14) */
> > > ?- set_prolog_flag(double_quotes, chars).
> > > true.
> > >
> > > ?- best(["x-o", "o-x", "-x-"],x,Y).
> > > Y = [[x, x, o], [o, -, x], [-, x, -]] ;
> > > Y = [[x, -, o], [o, x, x], [-, x, -]] ;
> > > Y = [[x, -, o], [o, -, x], [x, x, -]] ;
> > > Y = [[x, -, o], [o, -, x], [-, x, x]].
> > >
> > > Test case is here in this tar ball:
> > >
> > > http://www.rubycap.ch/gist/bench.tar.gz

Re: setof/3 ---> We are all doomed!!!

<e138a8ee-0627-4340-a21d-3249d99dec18n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=1738&group=comp.lang.prolog#1738

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:622a:1303:b0:343:4d9b:46de with SMTP id v3-20020a05622a130300b003434d9b46demr839182qtk.498.1662504571799;
Tue, 06 Sep 2022 15:49:31 -0700 (PDT)
X-Received: by 2002:a0d:e6cb:0:b0:340:c4ab:1f41 with SMTP id
p194-20020a0de6cb000000b00340c4ab1f41mr711546ywe.245.1662504571536; Tue, 06
Sep 2022 15:49:31 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.prolog
Date: Tue, 6 Sep 2022 15:49:31 -0700 (PDT)
In-Reply-To: <26510ae4-0332-4804-af7b-dff4085cbd18n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=80.218.40.218; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 80.218.40.218
References: <26510ae4-0332-4804-af7b-dff4085cbd18n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <e138a8ee-0627-4340-a21d-3249d99dec18n@googlegroups.com>
Subject: Re: setof/3 ---> We are all doomed!!!
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Tue, 06 Sep 2022 22:49:31 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2815
 by: Mostowski Collapse - Tue, 6 Sep 2022 22:49 UTC

Sloof Lirpa has changed his mind. He now says we don't
need library(sets) or library(ordsets), we can for example
do set union where naturally with:

?- A = [1,2,3], B=[2,3,4], setof(X, (member(X,A); member(X,B)), L).
A = [1, 2, 3],
B = [2, 3, 4],
L = [1, 2, 3, 4].

Sloof Lirpa now even makes the claim that setof/3 is
quite declarative. He gives this example, students that
have some courses:

course(berta, english).
course(berta, math).
course(berta, french).

course(carlo, math).
course(carlo, french).
course(carlo, biology).

He gives now this example of monotonicity:

?- setof(X, (course(berta, X), course(carlo, X)), L).
L = [french, math].

?- setof(X, (course(A, X), course(B, X)), L), A=berta, B=carlo.
A = berta,
B = carlo,
L = [french, math] ;
false.

Mostowski Collapse schrieb am Freitag, 12. August 2022 um 01:00:22 UTC+2:
> I had a discussion with Sloof Lirpa on Discord. He agrees
> with Markus Triskas analysis of aggregate_all/3, an
> analysis which can be transmutate to setof/3 from the
>
> ISO core standard: So we would for example:
>
> ?- setof(X, member(X, [b,a,c]), [a]).
> false.
>
> But adding a constraint (X = a) would make the query succeed:
>
> ?- X=a, setof(X, member(X, [b,a,c]), [a]).
> X = a.
>
> This non-monotonic behaviour complicates reasoning
> about programs considerably, and also makes declarative
> debugging (library(debug)) inapplicable. Are there
>
> monotonic alternatives that would be useful in at least
> some of the cases in which this non-monotonic construct is
> commonly used? It would be great to establish a more
>
> declarative alternative.

Re: setof/3 ---> We are all doomed!!!

<f5582017-aa44-48b3-8b41-a9feb5cfd73an@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=1739&group=comp.lang.prolog#1739

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:620a:178c:b0:6bb:b3a8:88f9 with SMTP id ay12-20020a05620a178c00b006bbb3a888f9mr743839qkb.759.1662504839812;
Tue, 06 Sep 2022 15:53:59 -0700 (PDT)
X-Received: by 2002:a81:a18d:0:b0:341:2437:f7c7 with SMTP id
y135-20020a81a18d000000b003412437f7c7mr745803ywg.69.1662504839565; Tue, 06
Sep 2022 15:53:59 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border-2.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.prolog
Date: Tue, 6 Sep 2022 15:53:59 -0700 (PDT)
In-Reply-To: <e138a8ee-0627-4340-a21d-3249d99dec18n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=80.218.40.218; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 80.218.40.218
References: <26510ae4-0332-4804-af7b-dff4085cbd18n@googlegroups.com> <e138a8ee-0627-4340-a21d-3249d99dec18n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <f5582017-aa44-48b3-8b41-a9feb5cfd73an@googlegroups.com>
Subject: Re: setof/3 ---> We are all doomed!!!
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Tue, 06 Sep 2022 22:53:59 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 80
 by: Mostowski Collapse - Tue, 6 Sep 2022 22:53 UTC

We could argue Sloof Lirpa change of mind was based
on a lucky coincidence. Conjunction and setof/3 worked
indeed quite declaratively. But what about Disjunction

and setof/3, can we do the same?

?- setof(X, (course(berta, X); course(carlo, X)), L).
L = [biology, english, french, math].

?- setof(X, (course(A, X); course(B, X)), L), A=berta, B=carlo.
A = berta,
B = carlo,
L = [biology, french, math] ;
A = berta,
B = carlo,
L = [english, french, math] ;
false.

Seems not to be monotonic anymore. Can we
define a new setof/3, that would be still monotonic
also for disjunction? Whats the problem in the above

exactly, any ideas?

Mostowski Collapse schrieb am Mittwoch, 7. September 2022 um 00:49:32 UTC+2:
> Sloof Lirpa has changed his mind. He now says we don't
> need library(sets) or library(ordsets), we can for example
> do set union where naturally with:
>
> ?- A = [1,2,3], B=[2,3,4], setof(X, (member(X,A); member(X,B)), L).
> A = [1, 2, 3],
> B = [2, 3, 4],
> L = [1, 2, 3, 4].
>
> Sloof Lirpa now even makes the claim that setof/3 is
> quite declarative. He gives this example, students that
> have some courses:
>
> course(berta, english).
> course(berta, math).
> course(berta, french).
>
> course(carlo, math).
> course(carlo, french).
> course(carlo, biology).
>
> He gives now this example of monotonicity:
>
> ?- setof(X, (course(berta, X), course(carlo, X)), L).
> L = [french, math].
>
> ?- setof(X, (course(A, X), course(B, X)), L), A=berta, B=carlo.
> A = berta,
> B = carlo,
> L = [french, math] ;
> false.
>
> Mostowski Collapse schrieb am Freitag, 12. August 2022 um 01:00:22 UTC+2:
> > I had a discussion with Sloof Lirpa on Discord. He agrees
> > with Markus Triskas analysis of aggregate_all/3, an
> > analysis which can be transmutate to setof/3 from the
> >
> > ISO core standard: So we would for example:
> >
> > ?- setof(X, member(X, [b,a,c]), [a]).
> > false.
> >
> > But adding a constraint (X = a) would make the query succeed:
> >
> > ?- X=a, setof(X, member(X, [b,a,c]), [a]).
> > X = a.
> >
> > This non-monotonic behaviour complicates reasoning
> > about programs considerably, and also makes declarative
> > debugging (library(debug)) inapplicable. Are there
> >
> > monotonic alternatives that would be useful in at least
> > some of the cases in which this non-monotonic construct is
> > commonly used? It would be great to establish a more
> >
> > declarative alternative.

Pages:12
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor