Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Disk crisis, please clean up!


devel / comp.lang.prolog / Re: Cut opaqueness in ISO prolog

SubjectAuthor
* Re: Cut opaqueness in ISO prologMild Shock
`* Re: Cut opaqueness in ISO prologMild Shock
 `* Re: Cut opaqueness in ISO prologMild Shock
  `* Re: Cut opaqueness in ISO prologMild Shock
   `* Re: Cut opaqueness in ISO prologMild Shock
    `* Re: Cut opaqueness in ISO prologMild Shock
     `* Re: Cut opaqueness in ISO prologMild Shock
      `* Re: Cut opaqueness in ISO prologMild Shock
       `* Re: Cut opaqueness in ISO prologMild Shock
        `* Re: Cut opaqueness in ISO prologJulio Di Egidio
         `* Re: Cut opaqueness in ISO prologMild Shock
          +- Re: Cut opaqueness in ISO prologMild Shock
          `* Re: Cut opaqueness in ISO prologJulio Di Egidio
           +- Re: Cut opaqueness in ISO prologJulio Di Egidio
           +- Re: Cut opaqueness in ISO prologMild Shock
           `* Re: Cut opaqueness in ISO prologMild Shock
            +- Re: Cut opaqueness in ISO prologMild Shock
            `* Re: Cut opaqueness in ISO prologJulio Di Egidio
             +- Re: Cut opaqueness in ISO prologMild Shock
             `* Re: Cut opaqueness in ISO prologMild Shock
              `* Re: Cut opaqueness in ISO prologMild Shock
               +- Re: Cut opaqueness in ISO prologMild Shock
               `* Re: Cut opaqueness in ISO prologJulio Di Egidio
                +* Re: Cut opaqueness in ISO prologJulio Di Egidio
                |`- Re: Cut opaqueness in ISO prologJulio Di Egidio
                `* Re: Cut opaqueness in ISO prologMild Shock
                 +- Re: Cut opaqueness in ISO prologMild Shock
                 +- Re: Cut opaqueness in ISO prologJulio Di Egidio
                 +- Re: Cut opaqueness in ISO prologMild Shock
                 +- Re: Cut opaqueness in ISO prologMild Shock
                 `- Re: Cut opaqueness in ISO prologMild Shock

Pages:12
Re: Cut opaqueness in ISO prolog

<4a9df624-2d0f-4376-a8fa-5de46b9570e5n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:620a:45a7:b0:77a:3f9:ee1a with SMTP id bp39-20020a05620a45a700b0077a03f9ee1amr168705qkb.14.1698626982667;
Sun, 29 Oct 2023 17:49:42 -0700 (PDT)
X-Received: by 2002:a05:6808:19a8:b0:3a7:3737:60fd with SMTP id
bj40-20020a05680819a800b003a7373760fdmr3094919oib.7.1698626982472; Sun, 29
Oct 2023 17:49:42 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.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: Sun, 29 Oct 2023 17:49:42 -0700 (PDT)
In-Reply-To: <2016759a-13dd-4558-9bf0-b99571032171@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=77.57.50.239; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 77.57.50.239
References: <2016759a-13dd-4558-9bf0-b99571032171@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <4a9df624-2d0f-4376-a8fa-5de46b9570e5n@googlegroups.com>
Subject: Re: Cut opaqueness in ISO prolog
From: bursejan@gmail.com (Mild Shock)
Injection-Date: Mon, 30 Oct 2023 00:49:42 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1601
 by: Mild Shock - Mon, 30 Oct 2023 00:49 UTC

New chapter in cut opaqueness. It has rather to do with inlining
of disjunction and if-then-else, and whetherwe can also inline
negation as failure (\+)/1 and once so easily.

Now I am facing this test case:

p(a).
p(b).
q(b).
test(X,Y,Z) :- \+ (X,Y,Z).

GNU Prolog gives me:

/* GNU Prolog 1.5.0 */
?- \+((p(X),!,q(X))).
yes
?- test(p(X),!,q(X)).
yes

SWI-Prolog gives me:

/* SWI Prolog 9.1.17 */
?- \+((p(X),!,q(X))).
true.
?- test(p(X),!,q(X)).
false.

Re: Cut opaqueness in ISO prolog

<8732c8be-ef95-4c75-b199-f72e991c6e88n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:620a:124d:b0:775:74c4:36dc with SMTP id a13-20020a05620a124d00b0077574c436dcmr120534qkl.1.1698627205797;
Sun, 29 Oct 2023 17:53:25 -0700 (PDT)
X-Received: by 2002:a05:6808:209d:b0:3a1:f2a4:3d7 with SMTP id
s29-20020a056808209d00b003a1f2a403d7mr3234229oiw.1.1698627205607; Sun, 29 Oct
2023 17:53:25 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.prolog
Date: Sun, 29 Oct 2023 17:53:25 -0700 (PDT)
In-Reply-To: <4a9df624-2d0f-4376-a8fa-5de46b9570e5n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=77.57.50.239; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 77.57.50.239
References: <2016759a-13dd-4558-9bf0-b99571032171@googlegroups.com> <4a9df624-2d0f-4376-a8fa-5de46b9570e5n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <8732c8be-ef95-4c75-b199-f72e991c6e88n@googlegroups.com>
Subject: Re: Cut opaqueness in ISO prolog
From: bursejan@gmail.com (Mild Shock)
Injection-Date: Mon, 30 Oct 2023 00:53:25 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Mild Shock - Mon, 30 Oct 2023 00:53 UTC

Interesting find, Ciao Prolog shows a warning, with a small
hickup, since the warning is shown twice:

/* Ciao Prolog 1.22.0 */
?- \+((p(X),!,q(X))).
WARNING: ! illegal in \+ or if-parts of ->, if; ignored
WARNING: ! illegal in \+ or if-parts of ->, if; ignored
no

?- test(p(X),!,q(X)).
false.

Otherwise it has the same bug. Meaning the warning is a little
bit useless, since it alllows me to do test/3. I was rather expecting
that a Prolog system that can issue a warning is aware of the

subleties to inline (\+)/1 and can correctly compile it. Further I don't
think according to ISO core standard a cut is disallowed in the if-part
of ->, as the warning suggests. It only needs a little more effort

to handle since the if-part of -> opens a new cut scope.

Mild Shock schrieb am Montag, 30. Oktober 2023 um 01:49:43 UTC+1:
> New chapter in cut opaqueness. It has rather to do with inlining
> of disjunction and if-then-else, and whetherwe can also inline
> negation as failure (\+)/1 and once so easily.
>
> Now I am facing this test case:
>
> p(a).
> p(b).
> q(b).
> test(X,Y,Z) :- \+ (X,Y,Z).
>
> GNU Prolog gives me:
>
> /* GNU Prolog 1.5.0 */
> ?- \+((p(X),!,q(X))).
> yes
> ?- test(p(X),!,q(X)).
> yes
>
> SWI-Prolog gives me:
>
> /* SWI Prolog 9.1.17 */
> ?- \+((p(X),!,q(X))).
> true.
> ?- test(p(X),!,q(X)).
> false.

Re: Cut opaqueness in ISO prolog

<3934ab16-1fca-4ca8-8423-28bc07bf690cn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:ae9:e50c:0:b0:77a:29e:e32a with SMTP id w12-20020ae9e50c000000b0077a029ee32amr173202qkf.5.1698715770242;
Mon, 30 Oct 2023 18:29:30 -0700 (PDT)
X-Received: by 2002:a05:6871:7427:b0:1e9:c975:2ae2 with SMTP id
nw39-20020a056871742700b001e9c9752ae2mr6218979oac.11.1698715770024; Mon, 30
Oct 2023 18:29:30 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!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: Mon, 30 Oct 2023 18:29:29 -0700 (PDT)
In-Reply-To: <8732c8be-ef95-4c75-b199-f72e991c6e88n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=77.57.50.239; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 77.57.50.239
References: <2016759a-13dd-4558-9bf0-b99571032171@googlegroups.com>
<4a9df624-2d0f-4376-a8fa-5de46b9570e5n@googlegroups.com> <8732c8be-ef95-4c75-b199-f72e991c6e88n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <3934ab16-1fca-4ca8-8423-28bc07bf690cn@googlegroups.com>
Subject: Re: Cut opaqueness in ISO prolog
From: bursejan@gmail.com (Mild Shock)
Injection-Date: Tue, 31 Oct 2023 01:29:30 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 16
 by: Mild Shock - Tue, 31 Oct 2023 01:29 UTC

If I use negation/1 the bug goes away:

p(a).
p(b).
q(b).
negation(X) :- X, !, fail.
negation(_).
test(X,Y,Z) :- negation((X,Y,Z)).

Now Trealla Prolog and SWI-Prolog also,
behaves consistently:

/* Trealla Prolog v2.29.42 */
?- negation((p(X),!,q(X))).
true.
?- test(p(X),!,q(X)).
true.

Re: Cut opaqueness in ISO prolog

<406ecd73-aaba-4767-a0ae-b630968e6146n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:6214:8b:b0:66d:bb5:3b90 with SMTP id n11-20020a056214008b00b0066d0bb53b90mr197804qvr.12.1698716152582;
Mon, 30 Oct 2023 18:35:52 -0700 (PDT)
X-Received: by 2002:a4a:ee93:0:b0:581:ea7a:1903 with SMTP id
dk19-20020a4aee93000000b00581ea7a1903mr3371235oob.1.1698716152277; Mon, 30
Oct 2023 18:35:52 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.prolog
Date: Mon, 30 Oct 2023 18:35:51 -0700 (PDT)
In-Reply-To: <3934ab16-1fca-4ca8-8423-28bc07bf690cn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=77.57.50.239; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 77.57.50.239
References: <2016759a-13dd-4558-9bf0-b99571032171@googlegroups.com>
<4a9df624-2d0f-4376-a8fa-5de46b9570e5n@googlegroups.com> <8732c8be-ef95-4c75-b199-f72e991c6e88n@googlegroups.com>
<3934ab16-1fca-4ca8-8423-28bc07bf690cn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <406ecd73-aaba-4767-a0ae-b630968e6146n@googlegroups.com>
Subject: Re: Cut opaqueness in ISO prolog
From: bursejan@gmail.com (Mild Shock)
Injection-Date: Tue, 31 Oct 2023 01:35:52 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Mild Shock - Tue, 31 Oct 2023 01:35 UTC

But the test case works fine in formerly Jekejeke Prolog:

/* Jekejeke Prolog 1.6.4 */
?- \+((p(X),!,q(X))).
true.
?- test(p(X),!,q(X)).
true.

And also in my Dogelog Player for JavaScript, Python and Java:

/* Dogelog Player 1.1.3 */
?- \+((p(X),!,q(X))).
true.
?- test(p(X),!,q(X)).
true.

The Java version is new, but the 3 Amigos behave exactly the same.

Mild Shock schrieb am Dienstag, 31. Oktober 2023 um 02:29:31 UTC+1:
> If I use negation/1 the bug goes away:
>
> p(a).
> p(b).
> q(b).
> negation(X) :- X, !, fail.
> negation(_).
> test(X,Y,Z) :- negation((X,Y,Z)).
>
> Now Trealla Prolog and SWI-Prolog also,
> behaves consistently:
>
> /* Trealla Prolog v2.29.42 */
> ?- negation((p(X),!,q(X))).
> true.
> ?- test(p(X),!,q(X)).
> true.

Re: Cut opaqueness in ISO prolog

<9d07b439-b1f7-4ac2-a931-7dea1a1a518dn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:ac8:6a16:0:b0:41c:b944:e9a8 with SMTP id t22-20020ac86a16000000b0041cb944e9a8mr314583qtr.0.1698944939218;
Thu, 02 Nov 2023 10:08:59 -0700 (PDT)
X-Received: by 2002:a9d:4e94:0:b0:6ab:8d3:5209 with SMTP id
v20-20020a9d4e94000000b006ab08d35209mr5348955otk.5.1698944939004; Thu, 02 Nov
2023 10:08:59 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.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: Thu, 2 Nov 2023 10:08:58 -0700 (PDT)
In-Reply-To: <406ecd73-aaba-4767-a0ae-b630968e6146n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=77.57.50.239; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 77.57.50.239
References: <2016759a-13dd-4558-9bf0-b99571032171@googlegroups.com>
<4a9df624-2d0f-4376-a8fa-5de46b9570e5n@googlegroups.com> <8732c8be-ef95-4c75-b199-f72e991c6e88n@googlegroups.com>
<3934ab16-1fca-4ca8-8423-28bc07bf690cn@googlegroups.com> <406ecd73-aaba-4767-a0ae-b630968e6146n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <9d07b439-b1f7-4ac2-a931-7dea1a1a518dn@googlegroups.com>
Subject: Re: Cut opaqueness in ISO prolog
From: bursejan@gmail.com (Mild Shock)
Injection-Date: Thu, 02 Nov 2023 17:08:59 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3022
 by: Mild Shock - Thu, 2 Nov 2023 17:08 UTC

A big Prolog system, that doesn’t consider (\+)/2 a control construct with
body conversion, unlike SWI-Prolog, is the XSB Prolog system. I get this
result, twice success, moving out a subterm doesn’t change anything:

/* XSB Version 5.0-beta */
?- \+((p(X),!,q(X))).
X = _h387
yes

?- Y=!, \+((p(X),Y,q(X))).
Y = !
X = _h465

Was using May 15, 2022 version of XSB. Don’t know whether
there are other versions that would behave differently. No wonder,
XSB is also a Prolog system that champions user defined predicate

inlining in certain circumstance, if I am not mistaken.

Mild Shock schrieb am Dienstag, 31. Oktober 2023 um 02:35:53 UTC+1:
> But the test case works fine in formerly Jekejeke Prolog:
>
> /* Jekejeke Prolog 1.6.4 */
> ?- \+((p(X),!,q(X))).
> true.
> ?- test(p(X),!,q(X)).
> true.
>
> And also in my Dogelog Player for JavaScript, Python and Java:
>
> /* Dogelog Player 1.1.3 */
> ?- \+((p(X),!,q(X))).
> true.
> ?- test(p(X),!,q(X)).
> true.
>
> The Java version is new, but the 3 Amigos behave exactly the same.
> Mild Shock schrieb am Dienstag, 31. Oktober 2023 um 02:29:31 UTC+1:
> > If I use negation/1 the bug goes away:
> >
> > p(a).
> > p(b).
> > q(b).
> > negation(X) :- X, !, fail.
> > negation(_).
> > test(X,Y,Z) :- negation((X,Y,Z)).
> >
> > Now Trealla Prolog and SWI-Prolog also,
> > behaves consistently:
> >
> > /* Trealla Prolog v2.29.42 */
> > ?- negation((p(X),!,q(X))).
> > true.
> > ?- test(p(X),!,q(X)).
> > true.

Re: Cut opaqueness in ISO prolog

<62a62a46-d980-4abf-87f9-3b45ca1df921n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a0c:c484:0:b0:66c:ef33:484c with SMTP id u4-20020a0cc484000000b0066cef33484cmr329391qvi.10.1698945207818;
Thu, 02 Nov 2023 10:13:27 -0700 (PDT)
X-Received: by 2002:a05:6870:e9a1:b0:1e9:9bef:b1df with SMTP id
r33-20020a056870e9a100b001e99befb1dfmr9460968oao.3.1698945207584; Thu, 02 Nov
2023 10:13:27 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.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: Thu, 2 Nov 2023 10:13:27 -0700 (PDT)
In-Reply-To: <9d07b439-b1f7-4ac2-a931-7dea1a1a518dn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=77.57.50.239; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 77.57.50.239
References: <2016759a-13dd-4558-9bf0-b99571032171@googlegroups.com>
<4a9df624-2d0f-4376-a8fa-5de46b9570e5n@googlegroups.com> <8732c8be-ef95-4c75-b199-f72e991c6e88n@googlegroups.com>
<3934ab16-1fca-4ca8-8423-28bc07bf690cn@googlegroups.com> <406ecd73-aaba-4767-a0ae-b630968e6146n@googlegroups.com>
<9d07b439-b1f7-4ac2-a931-7dea1a1a518dn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <62a62a46-d980-4abf-87f9-3b45ca1df921n@googlegroups.com>
Subject: Re: Cut opaqueness in ISO prolog
From: bursejan@gmail.com (Mild Shock)
Injection-Date: Thu, 02 Nov 2023 17:13:27 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3598
 by: Mild Shock - Thu, 2 Nov 2023 17:13 UTC

But was only testing the top-level, not sure what spooky
skeletons there are, in XSB dark alleys. Like when using
consult and/or compiler. It all belongs to this topic:

Ahead-of-time compilation
https://en.wikipedia.org/wiki/Ahead-of-time_compilation

Mild Shock schrieb am Donnerstag, 2. November 2023 um 18:09:00 UTC+1:
> A big Prolog system, that doesn’t consider (\+)/2 a control construct with
> body conversion, unlike SWI-Prolog, is the XSB Prolog system. I get this
> result, twice success, moving out a subterm doesn’t change anything:
>
> /* XSB Version 5.0-beta */
> ?- \+((p(X),!,q(X))).
> X = _h387
> yes
>
> ?- Y=!, \+((p(X),Y,q(X))).
> Y = !
> X = _h465
>
> Was using May 15, 2022 version of XSB. Don’t know whether
> there are other versions that would behave differently. No wonder,
> XSB is also a Prolog system that champions user defined predicate
>
> inlining in certain circumstance, if I am not mistaken.
> Mild Shock schrieb am Dienstag, 31. Oktober 2023 um 02:35:53 UTC+1:
> > But the test case works fine in formerly Jekejeke Prolog:
> >
> > /* Jekejeke Prolog 1.6.4 */
> > ?- \+((p(X),!,q(X))).
> > true.
> > ?- test(p(X),!,q(X)).
> > true.
> >
> > And also in my Dogelog Player for JavaScript, Python and Java:
> >
> > /* Dogelog Player 1.1.3 */
> > ?- \+((p(X),!,q(X))).
> > true.
> > ?- test(p(X),!,q(X)).
> > true.
> >
> > The Java version is new, but the 3 Amigos behave exactly the same.
> > Mild Shock schrieb am Dienstag, 31. Oktober 2023 um 02:29:31 UTC+1:
> > > If I use negation/1 the bug goes away:
> > >
> > > p(a).
> > > p(b).
> > > q(b).
> > > negation(X) :- X, !, fail.
> > > negation(_).
> > > test(X,Y,Z) :- negation((X,Y,Z)).
> > >
> > > Now Trealla Prolog and SWI-Prolog also,
> > > behaves consistently:
> > >
> > > /* Trealla Prolog v2.29.42 */
> > > ?- negation((p(X),!,q(X))).
> > > true.
> > > ?- test(p(X),!,q(X)).
> > > true.

Re: Cut opaqueness in ISO prolog

<e5a5ffc1-3e89-4cc8-93ec-db12e88d5b0en@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:ad4:584a:0:b0:66b:1010:995e with SMTP id de10-20020ad4584a000000b0066b1010995emr324010qvb.3.1698947280487;
Thu, 02 Nov 2023 10:48:00 -0700 (PDT)
X-Received: by 2002:a05:6808:2006:b0:3b5:7623:e8d4 with SMTP id
q6-20020a056808200600b003b57623e8d4mr2409393oiw.11.1698947280264; Thu, 02 Nov
2023 10:48:00 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.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: Thu, 2 Nov 2023 10:47:59 -0700 (PDT)
In-Reply-To: <62a62a46-d980-4abf-87f9-3b45ca1df921n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=77.57.50.239; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 77.57.50.239
References: <2016759a-13dd-4558-9bf0-b99571032171@googlegroups.com>
<4a9df624-2d0f-4376-a8fa-5de46b9570e5n@googlegroups.com> <8732c8be-ef95-4c75-b199-f72e991c6e88n@googlegroups.com>
<3934ab16-1fca-4ca8-8423-28bc07bf690cn@googlegroups.com> <406ecd73-aaba-4767-a0ae-b630968e6146n@googlegroups.com>
<9d07b439-b1f7-4ac2-a931-7dea1a1a518dn@googlegroups.com> <62a62a46-d980-4abf-87f9-3b45ca1df921n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <e5a5ffc1-3e89-4cc8-93ec-db12e88d5b0en@googlegroups.com>
Subject: Re: Cut opaqueness in ISO prolog
From: bursejan@gmail.com (Mild Shock)
Injection-Date: Thu, 02 Nov 2023 17:48:00 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1791
 by: Mild Shock - Thu, 2 Nov 2023 17:47 UTC

What can we say to the Prolog systems developers out there?

********************************************************
Don't worry your headache will soon
go away, and replaced by a full migraine.
********************************************************

Just joking, my suspicions, its not that grave. Ideas popping up.

Re: Cut opaqueness in ISO prolog

<347cd0f6-5a9f-4468-a4d6-a5aa7a526d44n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:620a:11:b0:778:905f:277d with SMTP id j17-20020a05620a001100b00778905f277dmr15067qki.6.1698959072968;
Thu, 02 Nov 2023 14:04:32 -0700 (PDT)
X-Received: by 2002:a05:6870:30d:b0:1dd:3076:9dfd with SMTP id
m13-20020a056870030d00b001dd30769dfdmr9594706oaf.8.1698959072757; Thu, 02 Nov
2023 14:04:32 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.usenet.farm!feed.usenet.farm!peer03.ams4!peer.am4.highwinds-media.com!peer01.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: Thu, 2 Nov 2023 14:04:32 -0700 (PDT)
In-Reply-To: <e5a5ffc1-3e89-4cc8-93ec-db12e88d5b0en@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=77.57.50.239; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 77.57.50.239
References: <2016759a-13dd-4558-9bf0-b99571032171@googlegroups.com>
<4a9df624-2d0f-4376-a8fa-5de46b9570e5n@googlegroups.com> <8732c8be-ef95-4c75-b199-f72e991c6e88n@googlegroups.com>
<3934ab16-1fca-4ca8-8423-28bc07bf690cn@googlegroups.com> <406ecd73-aaba-4767-a0ae-b630968e6146n@googlegroups.com>
<9d07b439-b1f7-4ac2-a931-7dea1a1a518dn@googlegroups.com> <62a62a46-d980-4abf-87f9-3b45ca1df921n@googlegroups.com>
<e5a5ffc1-3e89-4cc8-93ec-db12e88d5b0en@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <347cd0f6-5a9f-4468-a4d6-a5aa7a526d44n@googlegroups.com>
Subject: Re: Cut opaqueness in ISO prolog
From: bursejan@gmail.com (Mild Shock)
Injection-Date: Thu, 02 Nov 2023 21:04:32 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3167
 by: Mild Shock - Thu, 2 Nov 2023 21:04 UTC

Disclaimer: I only found this book today through google search of
“memberchk”. It also explains the difference between (\+)/1 and not/1.
At least for the Prolog system they were dealing with:

Computing with logic - 1988
https://archive.org/details/computingwithlog0000maie/page/322/mode/2up

So the bootstrapping would be maybe rather:

not(X) :- must_be(ground, X), \+ X.

Or NU-Prolog style with some freeze as well. The idea back then
was that ground argument to (\+)/1 is “safe”, has the desired semantics
of a logical negation. Meanwhile I guess it penetrated that variants

with non-ground arguments to (\+)/1 can also receive some declarative
reading using the idea of an existential quantifier. But the unsafe aspect
is still, how do we know what quantifier is intended and realized?

If I am not mistaken some of this idea of not/1 still survives in XSB tabling
not, and made it back into SWI-Prologs tnot/1. Not 100% sure. SWI-Prologs
tnot/1 does a delay and can elicit missing model or ambigious model.

Mild Shock schrieb am Donnerstag, 2. November 2023 um 18:48:01 UTC+1:
> What can we say to the Prolog systems developers out there?
>
> ********************************************************
> Don't worry your headache will soon
> go away, and replaced by a full migraine.
> ********************************************************
>
> Just joking, my suspicions, its not that grave. Ideas popping up.

Re: Cut opaqueness in ISO prolog

<d6a989b4-8022-4176-82b5-1400da043788n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:ad4:42b4:0:b0:66c:f774:2f80 with SMTP id e20-20020ad442b4000000b0066cf7742f80mr376039qvr.2.1699011126018;
Fri, 03 Nov 2023 04:32:06 -0700 (PDT)
X-Received: by 2002:a05:6870:959d:b0:1e9:8f74:ce15 with SMTP id
k29-20020a056870959d00b001e98f74ce15mr10304887oao.11.1699011125753; Fri, 03
Nov 2023 04:32:05 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.prolog
Date: Fri, 3 Nov 2023 04:32:05 -0700 (PDT)
In-Reply-To: <347cd0f6-5a9f-4468-a4d6-a5aa7a526d44n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=77.57.50.239; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 77.57.50.239
References: <2016759a-13dd-4558-9bf0-b99571032171@googlegroups.com>
<4a9df624-2d0f-4376-a8fa-5de46b9570e5n@googlegroups.com> <8732c8be-ef95-4c75-b199-f72e991c6e88n@googlegroups.com>
<3934ab16-1fca-4ca8-8423-28bc07bf690cn@googlegroups.com> <406ecd73-aaba-4767-a0ae-b630968e6146n@googlegroups.com>
<9d07b439-b1f7-4ac2-a931-7dea1a1a518dn@googlegroups.com> <62a62a46-d980-4abf-87f9-3b45ca1df921n@googlegroups.com>
<e5a5ffc1-3e89-4cc8-93ec-db12e88d5b0en@googlegroups.com> <347cd0f6-5a9f-4468-a4d6-a5aa7a526d44n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d6a989b4-8022-4176-82b5-1400da043788n@googlegroups.com>
Subject: Re: Cut opaqueness in ISO prolog
From: bursejan@gmail.com (Mild Shock)
Injection-Date: Fri, 03 Nov 2023 11:32:06 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Mild Shock - Fri, 3 Nov 2023 11:32 UTC

Concerning XSB , I guess was expecting too much good.
It has the same bug when consulting the test case:

q1 :- \+((p(X),!,q(X))).
q2 :- Y=!, \+((p(X),Y,q(X))).

?- q1.
yes
?- q2.
no

Mild Shock schrieb am Donnerstag, 2. November 2023 um 22:04:34 UTC+1:
> Disclaimer: I only found this book today through google search of
> “memberchk”. It also explains the difference between (\+)/1 and not/1.
> At least for the Prolog system they were dealing with:
>
> Computing with logic - 1988
> https://archive.org/details/computingwithlog0000maie/page/322/mode/2up
>
> So the bootstrapping would be maybe rather:
>
> not(X) :- must_be(ground, X), \+ X.
>
> Or NU-Prolog style with some freeze as well. The idea back then
> was that ground argument to (\+)/1 is “safe”, has the desired semantics
> of a logical negation. Meanwhile I guess it penetrated that variants
>
> with non-ground arguments to (\+)/1 can also receive some declarative
> reading using the idea of an existential quantifier. But the unsafe aspect
> is still, how do we know what quantifier is intended and realized?
>
> If I am not mistaken some of this idea of not/1 still survives in XSB tabling
> not, and made it back into SWI-Prologs tnot/1. Not 100% sure. SWI-Prologs
> tnot/1 does a delay and can elicit missing model or ambigious model.
> Mild Shock schrieb am Donnerstag, 2. November 2023 um 18:48:01 UTC+1:
> > What can we say to the Prolog systems developers out there?
> >
> > ********************************************************
> > Don't worry your headache will soon
> > go away, and replaced by a full migraine.
> > ********************************************************
> >
> > Just joking, my suspicions, its not that grave. Ideas popping up.

Re: Cut opaqueness in ISO prolog

<ea771419-1521-4447-9d62-8bdae7638a48n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:6214:9a1:b0:66d:111c:4625 with SMTP id du1-20020a05621409a100b0066d111c4625mr68577qvb.2.1699023548358;
Fri, 03 Nov 2023 07:59:08 -0700 (PDT)
X-Received: by 2002:a05:6808:2381:b0:3ae:2377:545 with SMTP id
bp1-20020a056808238100b003ae23770545mr7771982oib.7.1699023548222; Fri, 03 Nov
2023 07:59:08 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!usenet.blueworldhosting.com!diablo1.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: Fri, 3 Nov 2023 07:59:07 -0700 (PDT)
In-Reply-To: <d6a989b4-8022-4176-82b5-1400da043788n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=93.44.208.201; posting-account=F3H0JAgAAADcYVukktnHx7hFG5stjWse
NNTP-Posting-Host: 93.44.208.201
References: <2016759a-13dd-4558-9bf0-b99571032171@googlegroups.com>
<4a9df624-2d0f-4376-a8fa-5de46b9570e5n@googlegroups.com> <8732c8be-ef95-4c75-b199-f72e991c6e88n@googlegroups.com>
<3934ab16-1fca-4ca8-8423-28bc07bf690cn@googlegroups.com> <406ecd73-aaba-4767-a0ae-b630968e6146n@googlegroups.com>
<9d07b439-b1f7-4ac2-a931-7dea1a1a518dn@googlegroups.com> <62a62a46-d980-4abf-87f9-3b45ca1df921n@googlegroups.com>
<e5a5ffc1-3e89-4cc8-93ec-db12e88d5b0en@googlegroups.com> <347cd0f6-5a9f-4468-a4d6-a5aa7a526d44n@googlegroups.com>
<d6a989b4-8022-4176-82b5-1400da043788n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ea771419-1521-4447-9d62-8bdae7638a48n@googlegroups.com>
Subject: Re: Cut opaqueness in ISO prolog
From: julio@diegidio.name (Julio Di Egidio)
Injection-Date: Fri, 03 Nov 2023 14:59:08 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2364
 by: Julio Di Egidio - Fri, 3 Nov 2023 14:59 UTC

On Friday, 3 November 2023 at 12:32:07 UTC+1, Mild Shock wrote:
> Concerning XSB , I guess was expecting too much good.
> It has the same bug when consulting the test case:
>
> > p(a).
> > p(b).
> > q(b).
> q1 :- \+((p(X),!,q(X))).
> q2 :- Y=!, \+((p(X),Y,q(X))).
>
> ?- q1.
> yes
> ?- q2.
> no

The "bug" in that case is more generally the fact that Y translates
to call(Y), which I guess you are "supposed to know", and which I
cannot say if it's standard since our standard is behind a paywall
(and I have lost my copy and I won't buy it again since I'd be rather
working on a better Prolog than the ISO, too many fundamental
issues), but is certainly all over the place...

Julio

Re: Cut opaqueness in ISO prolog

<ui4840$12q1s$1@solani.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From: janburse@fastmail.fm (Mild Shock)
Newsgroups: comp.lang.prolog
Subject: Re: Cut opaqueness in ISO prolog
Date: Sat, 4 Nov 2023 02:52:01 +0100
Message-ID: <ui4840$12q1s$1@solani.org>
References: <2016759a-13dd-4558-9bf0-b99571032171@googlegroups.com>
<4a9df624-2d0f-4376-a8fa-5de46b9570e5n@googlegroups.com>
<8732c8be-ef95-4c75-b199-f72e991c6e88n@googlegroups.com>
<3934ab16-1fca-4ca8-8423-28bc07bf690cn@googlegroups.com>
<406ecd73-aaba-4767-a0ae-b630968e6146n@googlegroups.com>
<9d07b439-b1f7-4ac2-a931-7dea1a1a518dn@googlegroups.com>
<62a62a46-d980-4abf-87f9-3b45ca1df921n@googlegroups.com>
<e5a5ffc1-3e89-4cc8-93ec-db12e88d5b0en@googlegroups.com>
<347cd0f6-5a9f-4468-a4d6-a5aa7a526d44n@googlegroups.com>
<d6a989b4-8022-4176-82b5-1400da043788n@googlegroups.com>
<ea771419-1521-4447-9d62-8bdae7638a48n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 4 Nov 2023 01:52:00 -0000 (UTC)
Injection-Info: solani.org;
logging-data="1140796"; mail-complaints-to="abuse@news.solani.org"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Firefox/91.0 SeaMonkey/2.53.17.1
Cancel-Lock: sha1:KCvM1Rir1Mn8m0qZZ1uX/m5dq0s=
X-User-ID: eJwFwQEBwDAIAzBNg5YOOYyDfwlP6HGihWCAy/3gzpJvUj1ZTIOMGt33yr7DO73TiTbCKq9QyNO7dFT/SYMVfg==
In-Reply-To: <ea771419-1521-4447-9d62-8bdae7638a48n@googlegroups.com>
 by: Mild Shock - Sat, 4 Nov 2023 01:52 UTC

In my opinion the GNU Result is Ok and according
to the ISO core standard, since (\+)/1 is not included
in the list of control constructs that are subject

to body conversion, i.e. call/1 wrapping:

/* GNU Prolog 1.5.0 */
p(a).
p(b).
q(b).
q1 :- \+((p(X),!,q(X))).
q2 :- Y=!, \+((p(X),Y,q(X))).

?- q1.
yes
?- q2.
yes

You have just to lookup section 7.6 of the ISO core
standard to see that (\+)/1 has no part in the
call/1 wrapping. But it seems that Prolog systems

do not all implement section 7.6 this way, the
way it was specified. A further problem is that some
Prolog system sometimes implement section 7.6 correctly,

and sometimes implement section 7.6 wrong. For example
without a dynamic directive XSB does it wrong,
thats what is seen in your quote. But if you add

a dynamic/1 directive, it turns out to be like this:

/* XSB Version 5.0-beta */
p(a).
p(b).
q(b).
:- dynamic q1/0.
q1 :- \+((p(X),!,q(X))).
:- dynamic q2/0.
q2 :- Y=!, \+((p(X),Y,q(X))).

?- q1.
yes
?- q2.
yes

Now with dynamic directive XSB and GNU agree. Without
dynamic directive XSB and GNU disagree.

Julio Di Egidio schrieb:
> On Friday, 3 November 2023 at 12:32:07 UTC+1, Mild Shock wrote:
>> Concerning XSB , I guess was expecting too much good.
>> It has the same bug when consulting the test case:
>>
>>> p(a).
>>> p(b).
>>> q(b).
>> q1 :- \+((p(X),!,q(X))).
>> q2 :- Y=!, \+((p(X),Y,q(X))).
>>
>> ?- q1.
>> yes
>> ?- q2.
>> no
>
> The "bug" in that case is more generally the fact that Y translates
> to call(Y), which I guess you are "supposed to know", and which I
> cannot say if it's standard since our standard is behind a paywall
> (and I have lost my copy and I won't buy it again since I'd be rather
> working on a better Prolog than the ISO, too many fundamental
> issues), but is certainly all over the place...
>
> Julio
>

Re: Cut opaqueness in ISO prolog

<ui48fr$12q3a$1@solani.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From: janburse@fastmail.fm (Mild Shock)
Newsgroups: comp.lang.prolog
Subject: Re: Cut opaqueness in ISO prolog
Date: Sat, 4 Nov 2023 02:58:20 +0100
Message-ID: <ui48fr$12q3a$1@solani.org>
References: <2016759a-13dd-4558-9bf0-b99571032171@googlegroups.com>
<4a9df624-2d0f-4376-a8fa-5de46b9570e5n@googlegroups.com>
<8732c8be-ef95-4c75-b199-f72e991c6e88n@googlegroups.com>
<3934ab16-1fca-4ca8-8423-28bc07bf690cn@googlegroups.com>
<406ecd73-aaba-4767-a0ae-b630968e6146n@googlegroups.com>
<9d07b439-b1f7-4ac2-a931-7dea1a1a518dn@googlegroups.com>
<62a62a46-d980-4abf-87f9-3b45ca1df921n@googlegroups.com>
<e5a5ffc1-3e89-4cc8-93ec-db12e88d5b0en@googlegroups.com>
<347cd0f6-5a9f-4468-a4d6-a5aa7a526d44n@googlegroups.com>
<d6a989b4-8022-4176-82b5-1400da043788n@googlegroups.com>
<ea771419-1521-4447-9d62-8bdae7638a48n@googlegroups.com>
<ui4840$12q1s$1@solani.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 4 Nov 2023 01:58:19 -0000 (UTC)
Injection-Info: solani.org;
logging-data="1140842"; mail-complaints-to="abuse@news.solani.org"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Firefox/91.0 SeaMonkey/2.53.17.1
Cancel-Lock: sha1:lGMy5izQ+gW+WHg2d5hMboRBKyA=
In-Reply-To: <ui4840$12q1s$1@solani.org>
X-User-ID: eJwNyskBwCAIBMCWuBahHDFu/yXEz7wGnppnRSIDBOe5DeYKrnsonX1zS4Vua2kCVT7jZNDDx94oVfkES0V/PoMUPQ==
 by: Mild Shock - Sat, 4 Nov 2023 01:58 UTC

So its not an ISO core standard problem. Its
a bug introduced by Prolog system implementors
in the area of ahead-of-time compilation:

Ahead-of-time compilation
https://en.wikipedia.org/wiki/Ahead-of-time_compilation

Mostlikely XSB does compile static clauses more
strongly than dynamic clauses, but it does so
by an incorrect compilation method.

So its an implementation bug not some specification
flaw. But its hard to fix this implementatin bug.
So far was experimenting with this rather trivial

guard, to check whether I am allowed to rewrite
(\+ A) into (A -> fail; true):

sys_trans_allowed(V) :- var(V), !, fail.
sys_trans_allowed((A,B)) :- sys_trans_allowed(A), sys_trans_allowed(B).
sys_trans_allowed((A;B)) :- sys_trans_allowed(A), sys_trans_allowed(B).
sys_trans_allowed((A->B)) :- sys_trans_allowed(A), sys_trans_allowed(B).
sys_trans_allowed(A) :- callable(A).

But I am not 100% happy with such a check, maybe
there is a more linear compilation technique.

Mild Shock schrieb:
>
> In my opinion the GNU Result is Ok and according
> to the ISO core standard, since (\+)/1 is not included
> in the list of control constructs that are subject
>
> to body conversion, i.e. call/1 wrapping:
>
> /* GNU Prolog 1.5.0 */
> p(a).
> p(b).
> q(b).
> q1 :- \+((p(X),!,q(X))).
> q2 :- Y=!, \+((p(X),Y,q(X))).
>
> ?- q1.
> yes
> ?- q2.
> yes
>
> You have just to lookup section 7.6 of the ISO core
> standard to see that (\+)/1 has no part in the
> call/1 wrapping. But it seems that Prolog systems
>
> do not all implement section 7.6 this way, the
> way it was specified. A further problem is that some
> Prolog system sometimes implement section 7.6 correctly,
>
> and sometimes implement section 7.6 wrong. For example
> without a dynamic directive XSB does it wrong,
> thats what is seen in your quote. But if you add
>
> a dynamic/1 directive, it turns out to be like this:
>
> /* XSB Version 5.0-beta */
> p(a).
> p(b).
> q(b).
> :- dynamic q1/0.
> q1 :- \+((p(X),!,q(X))).
> :- dynamic q2/0.
> q2 :- Y=!, \+((p(X),Y,q(X))).
>
> ?- q1.
> yes
> ?- q2.
> yes
>
> Now with dynamic directive XSB and GNU agree. Without
> dynamic directive XSB and GNU disagree.
>
> Julio Di Egidio schrieb:
>> On Friday, 3 November 2023 at 12:32:07 UTC+1, Mild Shock wrote:
>>> Concerning XSB , I guess was expecting too much good.
>>> It has the same bug when consulting the test case:
>>>
>>>> p(a).
>>>> p(b).
>>>> q(b).
>>> q1 :- \+((p(X),!,q(X))).
>>> q2 :- Y=!, \+((p(X),Y,q(X))).
>>>
>>> ?- q1.
>>> yes
>>> ?- q2.
>>> no
>>
>> The "bug" in that case is more generally the fact that Y translates
>> to call(Y), which I guess you are "supposed to know", and which I
>> cannot say if it's standard since our standard is behind a paywall
>> (and I have lost my copy and I won't buy it again since I'd be rather
>> working on a better Prolog than the ISO, too many fundamental
>> issues), but is certainly all over the place...
>>
>> Julio
>>
>

Re: Cut opaqueness in ISO prolog

<e019d65e-f490-410b-9a4f-500460283d76n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:620a:146f:b0:774:1512:4805 with SMTP id j15-20020a05620a146f00b0077415124805mr348545qkl.15.1699070888288;
Fri, 03 Nov 2023 21:08:08 -0700 (PDT)
X-Received: by 2002:a05:6808:23c1:b0:3a9:d030:5023 with SMTP id
bq1-20020a05680823c100b003a9d0305023mr9898267oib.3.1699070888103; Fri, 03 Nov
2023 21:08:08 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.prolog
Date: Fri, 3 Nov 2023 21:08:07 -0700 (PDT)
In-Reply-To: <ui4840$12q1s$1@solani.org>
Injection-Info: google-groups.googlegroups.com; posting-host=93.44.208.201; posting-account=F3H0JAgAAADcYVukktnHx7hFG5stjWse
NNTP-Posting-Host: 93.44.208.201
References: <2016759a-13dd-4558-9bf0-b99571032171@googlegroups.com>
<4a9df624-2d0f-4376-a8fa-5de46b9570e5n@googlegroups.com> <8732c8be-ef95-4c75-b199-f72e991c6e88n@googlegroups.com>
<3934ab16-1fca-4ca8-8423-28bc07bf690cn@googlegroups.com> <406ecd73-aaba-4767-a0ae-b630968e6146n@googlegroups.com>
<9d07b439-b1f7-4ac2-a931-7dea1a1a518dn@googlegroups.com> <62a62a46-d980-4abf-87f9-3b45ca1df921n@googlegroups.com>
<e5a5ffc1-3e89-4cc8-93ec-db12e88d5b0en@googlegroups.com> <347cd0f6-5a9f-4468-a4d6-a5aa7a526d44n@googlegroups.com>
<d6a989b4-8022-4176-82b5-1400da043788n@googlegroups.com> <ea771419-1521-4447-9d62-8bdae7638a48n@googlegroups.com>
<ui4840$12q1s$1@solani.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <e019d65e-f490-410b-9a4f-500460283d76n@googlegroups.com>
Subject: Re: Cut opaqueness in ISO prolog
From: julio@diegidio.name (Julio Di Egidio)
Injection-Date: Sat, 04 Nov 2023 04:08:08 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Julio Di Egidio - Sat, 4 Nov 2023 04:08 UTC

On Saturday, 4 November 2023 at 02:52:03 UTC+1, Mild Shock wrote:

> ?- q1.
> yes
> ?- q2.
> yes
>
> You have just to lookup section 7.6 of the ISO core

Which I have explained I have no access to.
OTOH you completely miss the point which has
nothing to do with body conversion in '\+', that
just calling 'Y' is a short-hand, whether ISO or
not you have not told, for 'call(Y)', which is the
right way to write that code in Prolog and what
that code is in fact translated to in systems
where that short-hand is supported (most of
them probably): and since 'call' per se *is*
opaque to cuts (it does make cut scope)...
the code that is wrong is actually the one
you are calling right.

Julio

Re: Cut opaqueness in ISO prolog

<ef50b782-b0b0-43f0-9ef3-498cd6b6c57en@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:ac8:6211:0:b0:41c:5ee2:ab62 with SMTP id ks17-20020ac86211000000b0041c5ee2ab62mr420723qtb.1.1699070929997;
Fri, 03 Nov 2023 21:08:49 -0700 (PDT)
X-Received: by 2002:a05:6808:2097:b0:3a8:48fc:aaa5 with SMTP id
s23-20020a056808209700b003a848fcaaa5mr8871863oiw.5.1699070929863; Fri, 03 Nov
2023 21:08:49 -0700 (PDT)
Path: i2pn2.org!i2pn.org!news.1d4.us!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.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: Fri, 3 Nov 2023 21:08:49 -0700 (PDT)
In-Reply-To: <e019d65e-f490-410b-9a4f-500460283d76n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=93.44.208.201; posting-account=F3H0JAgAAADcYVukktnHx7hFG5stjWse
NNTP-Posting-Host: 93.44.208.201
References: <2016759a-13dd-4558-9bf0-b99571032171@googlegroups.com>
<4a9df624-2d0f-4376-a8fa-5de46b9570e5n@googlegroups.com> <8732c8be-ef95-4c75-b199-f72e991c6e88n@googlegroups.com>
<3934ab16-1fca-4ca8-8423-28bc07bf690cn@googlegroups.com> <406ecd73-aaba-4767-a0ae-b630968e6146n@googlegroups.com>
<9d07b439-b1f7-4ac2-a931-7dea1a1a518dn@googlegroups.com> <62a62a46-d980-4abf-87f9-3b45ca1df921n@googlegroups.com>
<e5a5ffc1-3e89-4cc8-93ec-db12e88d5b0en@googlegroups.com> <347cd0f6-5a9f-4468-a4d6-a5aa7a526d44n@googlegroups.com>
<d6a989b4-8022-4176-82b5-1400da043788n@googlegroups.com> <ea771419-1521-4447-9d62-8bdae7638a48n@googlegroups.com>
<ui4840$12q1s$1@solani.org> <e019d65e-f490-410b-9a4f-500460283d76n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ef50b782-b0b0-43f0-9ef3-498cd6b6c57en@googlegroups.com>
Subject: Re: Cut opaqueness in ISO prolog
From: julio@diegidio.name (Julio Di Egidio)
Injection-Date: Sat, 04 Nov 2023 04:08:49 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1974
 by: Julio Di Egidio - Sat, 4 Nov 2023 04:08 UTC

On Saturday, 4 November 2023 at 05:08:09 UTC+1, Julio Di Egidio wrote:

> the code that is wrong is actually the one
> you are calling right.

I mean the result, not the code.

Re: Cut opaqueness in ISO prolog

<ui5tv8$13li8$1@solani.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From: janburse@fastmail.fm (Mild Shock)
Newsgroups: comp.lang.prolog
Subject: Re: Cut opaqueness in ISO prolog
Date: Sat, 4 Nov 2023 18:11:06 +0100
Message-ID: <ui5tv8$13li8$1@solani.org>
References: <2016759a-13dd-4558-9bf0-b99571032171@googlegroups.com>
<4a9df624-2d0f-4376-a8fa-5de46b9570e5n@googlegroups.com>
<8732c8be-ef95-4c75-b199-f72e991c6e88n@googlegroups.com>
<3934ab16-1fca-4ca8-8423-28bc07bf690cn@googlegroups.com>
<406ecd73-aaba-4767-a0ae-b630968e6146n@googlegroups.com>
<9d07b439-b1f7-4ac2-a931-7dea1a1a518dn@googlegroups.com>
<62a62a46-d980-4abf-87f9-3b45ca1df921n@googlegroups.com>
<e5a5ffc1-3e89-4cc8-93ec-db12e88d5b0en@googlegroups.com>
<347cd0f6-5a9f-4468-a4d6-a5aa7a526d44n@googlegroups.com>
<d6a989b4-8022-4176-82b5-1400da043788n@googlegroups.com>
<ea771419-1521-4447-9d62-8bdae7638a48n@googlegroups.com>
<ui4840$12q1s$1@solani.org>
<e019d65e-f490-410b-9a4f-500460283d76n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 4 Nov 2023 17:11:04 -0000 (UTC)
Injection-Info: solani.org;
logging-data="1168968"; mail-complaints-to="abuse@news.solani.org"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Firefox/91.0 SeaMonkey/2.53.17.1
Cancel-Lock: sha1:pH4n5toCl3WdQousHJY7qyzzAPk=
In-Reply-To: <e019d65e-f490-410b-9a4f-500460283d76n@googlegroups.com>
X-User-ID: eJwNyMEBwCAIA8CVCiGg4wjI/iPYex7h4hXmdONwRBMyshO+GlYI5g5iX2gopGVo55Kci/pG/04FS32t0/0AKjwUoA==
 by: Mild Shock - Sat, 4 Nov 2023 17:11 UTC

There is no call/1 in q1 or q2, you
can use listing/1 in recent GNU Prolog:

/* GNU-Prolog 1.5.0, ISO conforming */
q2 :-
A = !,
\+ (p(B), A, q(B)).

This is in conformity with section 7.6 of
the ISO core standard, which doesn't
say that call/1 is placed inside (\+)/1

at compile time. listing/1 usually shows
call/1 where one was instered at compile time,
but it doesn't show one. Where do you get the

idea from that there is a call/1 around Y?
This happens erroreously in SWI-Prolog
in violation of section 7.6 of the ISO core standard:

/* SWI-Prolog 9.1.17, Not ISO conforming */
?- listing(q2).
q2 :-
A=!,
\+ ( p(B),
call(A),
q(B)
).

Julio Di Egidio schrieb:
> On Saturday, 4 November 2023 at 02:52:03 UTC+1, Mild Shock wrote:
>
>> ?- q1.
>> yes
>> ?- q2.
>> yes
>>
>> You have just to lookup section 7.6 of the ISO core
>
> Which I have explained I have no access to.
> OTOH you completely miss the point which has
> nothing to do with body conversion in '\+', that
> just calling 'Y' is a short-hand, whether ISO or
> not you have not told, for 'call(Y)', which is the
> right way to write that code in Prolog and what
> that code is in fact translated to in systems
> where that short-hand is supported (most of
> them probably): and since 'call' per se *is*
> opaque to cuts (it does make cut scope)...
> the code that is wrong is actually the one
> you are calling right.
>
> Julio
>

Re: Cut opaqueness in ISO prolog

<ui5u1a$13li8$2@solani.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From: janburse@fastmail.fm (Mild Shock)
Newsgroups: comp.lang.prolog
Subject: Re: Cut opaqueness in ISO prolog
Date: Sat, 4 Nov 2023 18:12:12 +0100
Message-ID: <ui5u1a$13li8$2@solani.org>
References: <2016759a-13dd-4558-9bf0-b99571032171@googlegroups.com>
<4a9df624-2d0f-4376-a8fa-5de46b9570e5n@googlegroups.com>
<8732c8be-ef95-4c75-b199-f72e991c6e88n@googlegroups.com>
<3934ab16-1fca-4ca8-8423-28bc07bf690cn@googlegroups.com>
<406ecd73-aaba-4767-a0ae-b630968e6146n@googlegroups.com>
<9d07b439-b1f7-4ac2-a931-7dea1a1a518dn@googlegroups.com>
<62a62a46-d980-4abf-87f9-3b45ca1df921n@googlegroups.com>
<e5a5ffc1-3e89-4cc8-93ec-db12e88d5b0en@googlegroups.com>
<347cd0f6-5a9f-4468-a4d6-a5aa7a526d44n@googlegroups.com>
<d6a989b4-8022-4176-82b5-1400da043788n@googlegroups.com>
<ea771419-1521-4447-9d62-8bdae7638a48n@googlegroups.com>
<ui4840$12q1s$1@solani.org>
<e019d65e-f490-410b-9a4f-500460283d76n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 4 Nov 2023 17:12:10 -0000 (UTC)
Injection-Info: solani.org;
logging-data="1168968"; mail-complaints-to="abuse@news.solani.org"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Firefox/91.0 SeaMonkey/2.53.17.1
Cancel-Lock: sha1:/2Me0iay8jXV+1SOxFNzBou8Rco=
X-User-ID: eJwNx8EBwCAIA8CVChKQcSLI/iPY+x2Wi1eYww2D0TnEeMp3L1NBpKRE6d/isnDOQufYvtuMwW6Wq1Yb6vABaM4WgQ==
In-Reply-To: <e019d65e-f490-410b-9a4f-500460283d76n@googlegroups.com>
 by: Mild Shock - Sat, 4 Nov 2023 17:12 UTC

There is no call/1 in q1 or q2, you
can use listing/1 in recent GNU Prolog:

/* GNU-Prolog 1.5.0, ISO conforming */
?- listing(q2).
q2 :-
A = !,
\+ (p(B), A, q(B)).

This is in conformity with section 7.6 of
the ISO core standard, which doesn't
say that call/1 is placed inside (\+)/1

at compile time. listing/1 usually shows
call/1 where one was instered at compile time,
but it doesn't show one. Where do you get the

idea from that there is a call/1 around Y?
This happens erroreously in SWI-Prolog
in violation of section 7.6 of the ISO core standard:

/* SWI-Prolog 9.1.17, Not ISO conforming */
?- listing(q2).
q2 :-
A=!,
\+ ( p(B),
call(A),
q(B)
).

Julio Di Egidio schrieb:
> On Saturday, 4 November 2023 at 02:52:03 UTC+1, Mild Shock wrote:
>
>> ?- q1.
>> yes
>> ?- q2.
>> yes
>>
>> You have just to lookup section 7.6 of the ISO core
>
> Which I have explained I have no access to.
> OTOH you completely miss the point which has
> nothing to do with body conversion in '\+', that
> just calling 'Y' is a short-hand, whether ISO or
> not you have not told, for 'call(Y)', which is the
> right way to write that code in Prolog and what
> that code is in fact translated to in systems
> where that short-hand is supported (most of
> them probably): and since 'call' per se *is*
> opaque to cuts (it does make cut scope)...
> the code that is wrong is actually the one
> you are calling right.
>
> Julio
>

Re: Cut opaqueness in ISO prolog

<ui5veg$13mgg$1@solani.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From: janburse@fastmail.fm (Mild Shock)
Newsgroups: comp.lang.prolog
Subject: Re: Cut opaqueness in ISO prolog
Date: Sat, 4 Nov 2023 18:36:18 +0100
Message-ID: <ui5veg$13mgg$1@solani.org>
References: <2016759a-13dd-4558-9bf0-b99571032171@googlegroups.com>
<4a9df624-2d0f-4376-a8fa-5de46b9570e5n@googlegroups.com>
<8732c8be-ef95-4c75-b199-f72e991c6e88n@googlegroups.com>
<3934ab16-1fca-4ca8-8423-28bc07bf690cn@googlegroups.com>
<406ecd73-aaba-4767-a0ae-b630968e6146n@googlegroups.com>
<9d07b439-b1f7-4ac2-a931-7dea1a1a518dn@googlegroups.com>
<62a62a46-d980-4abf-87f9-3b45ca1df921n@googlegroups.com>
<e5a5ffc1-3e89-4cc8-93ec-db12e88d5b0en@googlegroups.com>
<347cd0f6-5a9f-4468-a4d6-a5aa7a526d44n@googlegroups.com>
<d6a989b4-8022-4176-82b5-1400da043788n@googlegroups.com>
<ea771419-1521-4447-9d62-8bdae7638a48n@googlegroups.com>
<ui4840$12q1s$1@solani.org>
<e019d65e-f490-410b-9a4f-500460283d76n@googlegroups.com>
<ui5u1a$13li8$2@solani.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 4 Nov 2023 17:36:16 -0000 (UTC)
Injection-Info: solani.org;
logging-data="1169936"; mail-complaints-to="abuse@news.solani.org"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Firefox/91.0 SeaMonkey/2.53.17.1
Cancel-Lock: sha1:QRpn13Rz4/W00Tth7pJK+LcvcKc=
X-User-ID: eJwFwQkBwDAIA0BLfKEgpwvFv4TdwVOTJxIZWOxD5yP7jOz6mEdNtemFi4Oldyq+wBCe3fbKroqCH4dH6gdQARU6
In-Reply-To: <ui5u1a$13li8$2@solani.org>
 by: Mild Shock - Sat, 4 Nov 2023 17:36 UTC

You can also use vm_list/1 in SWI-Prolog to
see the offending instruction:

?- vm_list(q2).
========================================================================
q2/0
========================================================================
0 s_virgin
1 i_exit
----------------------------------------
clause 1 (<clause>(000001dff79f6040)):
----------------------------------------
0 i_enter
1 b_unify_fc(0,!)
4 c_not(2,'L1')
7 b_firstvar(1)
9 i_call(user:p/1)
11 b_var0
12 i_usercall0
13 b_var1
14 i_call(user:q/1)
16 c_cut(2)
18 c_fail
19 c_jmp('L2')
L1: 21 c_var(1)
L2: 23 i_exit
true.

The offending instruction is:

11 b_var0
12 i_usercall0

But I don’t have yet an alternative proposal,
except for a sys_trans_allowed/1 check, which
would make a compilation decision, and then refuse to

inline. But a solution where it is nevertheless
inlined, I haven’t worked out one yet. If i_usercall0
is repaced by something too expensive, things also

don’t workout very well. Obviously an alternative
to i_usercall0 is needed, that is cut transparent
among other things.

Mild Shock schrieb:
> There is no call/1 in q1 or q2, you
> can use listing/1 in recent GNU Prolog:
>
> /* GNU-Prolog 1.5.0, ISO conforming */
> ?- listing(q2).
> q2 :-
>     A = !,
>     \+ (p(B), A, q(B)).
>
> This is in conformity with section 7.6 of
> the ISO core standard, which doesn't
> say that call/1 is placed inside (\+)/1
>
> at compile time. listing/1 usually shows
> call/1 where one was instered at compile time,
> but it doesn't show one. Where do you get the
>
> idea from that there is a call/1 around Y?
> This happens erroreously in SWI-Prolog
> in violation of section 7.6 of the ISO core standard:
>
> /* SWI-Prolog 9.1.17, Not ISO conforming */
> ?- listing(q2).
> q2 :-
>     A=!,
>     \+ ( p(B),
>          call(A),
>          q(B)
>        ).
>
> Julio Di Egidio schrieb:
>> On Saturday, 4 November 2023 at 02:52:03 UTC+1, Mild Shock wrote:
>>
>>> ?- q1.
>>> yes
>>> ?- q2.
>>> yes
>>>
>>> You have just to lookup section 7.6 of the ISO core
>>
>> Which I have explained I have no access to.
>> OTOH you completely miss the point which has
>> nothing to do with body conversion in '\+', that
>> just calling 'Y' is a short-hand, whether ISO or
>> not you have not told, for 'call(Y)', which is the
>> right way to write that code in Prolog and what
>> that code is in fact translated to in systems
>> where that short-hand is supported (most of
>> them probably): and since 'call' per se *is*
>> opaque to cuts (it does make cut scope)...
>> the code that is wrong is actually the one
>> you are calling right.
>>
>> Julio
>>
>

Re: Cut opaqueness in ISO prolog

<237b1d3d-a682-47ea-bbbf-c052a8fc1b23n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:620a:146f:b0:774:1512:4805 with SMTP id j15-20020a05620a146f00b0077415124805mr378714qkl.15.1699126980103;
Sat, 04 Nov 2023 12:43:00 -0700 (PDT)
X-Received: by 2002:a05:6870:a11a:b0:1ea:85b:62a3 with SMTP id
m26-20020a056870a11a00b001ea085b62a3mr11588884oae.1.1699126979755; Sat, 04
Nov 2023 12:42:59 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.prolog
Date: Sat, 4 Nov 2023 12:42:59 -0700 (PDT)
In-Reply-To: <ui5u1a$13li8$2@solani.org>
Injection-Info: google-groups.googlegroups.com; posting-host=93.44.208.201; posting-account=F3H0JAgAAADcYVukktnHx7hFG5stjWse
NNTP-Posting-Host: 93.44.208.201
References: <2016759a-13dd-4558-9bf0-b99571032171@googlegroups.com>
<4a9df624-2d0f-4376-a8fa-5de46b9570e5n@googlegroups.com> <8732c8be-ef95-4c75-b199-f72e991c6e88n@googlegroups.com>
<3934ab16-1fca-4ca8-8423-28bc07bf690cn@googlegroups.com> <406ecd73-aaba-4767-a0ae-b630968e6146n@googlegroups.com>
<9d07b439-b1f7-4ac2-a931-7dea1a1a518dn@googlegroups.com> <62a62a46-d980-4abf-87f9-3b45ca1df921n@googlegroups.com>
<e5a5ffc1-3e89-4cc8-93ec-db12e88d5b0en@googlegroups.com> <347cd0f6-5a9f-4468-a4d6-a5aa7a526d44n@googlegroups.com>
<d6a989b4-8022-4176-82b5-1400da043788n@googlegroups.com> <ea771419-1521-4447-9d62-8bdae7638a48n@googlegroups.com>
<ui4840$12q1s$1@solani.org> <e019d65e-f490-410b-9a4f-500460283d76n@googlegroups.com>
<ui5u1a$13li8$2@solani.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <237b1d3d-a682-47ea-bbbf-c052a8fc1b23n@googlegroups.com>
Subject: Re: Cut opaqueness in ISO prolog
From: julio@diegidio.name (Julio Di Egidio)
Injection-Date: Sat, 04 Nov 2023 19:43:00 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Julio Di Egidio - Sat, 4 Nov 2023 19:42 UTC

On Saturday, 4 November 2023 at 18:12:13 UTC+1, Mild Shock wrote:

> There is no call/1 in q1 or q2, you
> can use listing/1 in recent GNU Prolog:

LOL, you are a joke: which is exactly the reason why, for a
correct definition of correct Prolog code, it *fails* your test.

Whether that is ISO or not I'll leave those interested to find out.

Have fun.

Julio

Re: Cut opaqueness in ISO prolog

<0bec7689-26df-4623-b301-4aab5d0095d9n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:620a:1987:b0:76d:8404:f17f with SMTP id bm7-20020a05620a198700b0076d8404f17fmr542465qkb.2.1699213084588;
Sun, 05 Nov 2023 11:38:04 -0800 (PST)
X-Received: by 2002:a9d:6197:0:b0:6cd:f9b7:dadf with SMTP id
g23-20020a9d6197000000b006cdf9b7dadfmr7758389otk.2.1699213084225; Sun, 05 Nov
2023 11:38:04 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!2.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.usenet.farm!feed.usenet.farm!peer02.ams4!peer.am4.highwinds-media.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: Sun, 5 Nov 2023 11:38:03 -0800 (PST)
In-Reply-To: <237b1d3d-a682-47ea-bbbf-c052a8fc1b23n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=77.57.50.239; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 77.57.50.239
References: <2016759a-13dd-4558-9bf0-b99571032171@googlegroups.com>
<4a9df624-2d0f-4376-a8fa-5de46b9570e5n@googlegroups.com> <8732c8be-ef95-4c75-b199-f72e991c6e88n@googlegroups.com>
<3934ab16-1fca-4ca8-8423-28bc07bf690cn@googlegroups.com> <406ecd73-aaba-4767-a0ae-b630968e6146n@googlegroups.com>
<9d07b439-b1f7-4ac2-a931-7dea1a1a518dn@googlegroups.com> <62a62a46-d980-4abf-87f9-3b45ca1df921n@googlegroups.com>
<e5a5ffc1-3e89-4cc8-93ec-db12e88d5b0en@googlegroups.com> <347cd0f6-5a9f-4468-a4d6-a5aa7a526d44n@googlegroups.com>
<d6a989b4-8022-4176-82b5-1400da043788n@googlegroups.com> <ea771419-1521-4447-9d62-8bdae7638a48n@googlegroups.com>
<ui4840$12q1s$1@solani.org> <e019d65e-f490-410b-9a4f-500460283d76n@googlegroups.com>
<ui5u1a$13li8$2@solani.org> <237b1d3d-a682-47ea-bbbf-c052a8fc1b23n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <0bec7689-26df-4623-b301-4aab5d0095d9n@googlegroups.com>
Subject: Re: Cut opaqueness in ISO prolog
From: bursejan@gmail.com (Mild Shock)
Injection-Date: Sun, 05 Nov 2023 19:38:04 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2508
 by: Mild Shock - Sun, 5 Nov 2023 19:38 UTC

Deniel of a bug?
Creating a smoke screen?
How low can one get?

LoL

Julio Di Egidio schrieb am Samstag, 4. November 2023 um 20:43:01 UTC+1:
> On Saturday, 4 November 2023 at 18:12:13 UTC+1, Mild Shock wrote:
>
> > There is no call/1 in q1 or q2, you
> > can use listing/1 in recent GNU Prolog:
> LOL, you are a joke: which is exactly the reason why, for a
> correct definition of correct Prolog code, it *fails* your test.
>
> Whether that is ISO or not I'll leave those interested to find out.
>
> Have fun.
>
> Julio

Re: Cut opaqueness in ISO prolog

<27193671-26a8-40aa-9887-63e003b40374n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:ac8:7317:0:b0:41c:bd1d:7df0 with SMTP id x23-20020ac87317000000b0041cbd1d7df0mr449766qto.0.1699213133593; Sun, 05 Nov 2023 11:38:53 -0800 (PST)
X-Received: by 2002:a05:6870:a2cf:b0:1e1:2f43:1dc6 with SMTP id w15-20020a056870a2cf00b001e12f431dc6mr12746344oak.1.1699213133174; Sun, 05 Nov 2023 11:38:53 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!feeder.usenetexpress.com!tr1.iad1.usenetexpress.com!69.80.99.14.MISMATCH!border-1.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: Sun, 5 Nov 2023 11:38:52 -0800 (PST)
In-Reply-To: <237b1d3d-a682-47ea-bbbf-c052a8fc1b23n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=77.57.50.239; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 77.57.50.239
References: <2016759a-13dd-4558-9bf0-b99571032171@googlegroups.com> <4a9df624-2d0f-4376-a8fa-5de46b9570e5n@googlegroups.com> <8732c8be-ef95-4c75-b199-f72e991c6e88n@googlegroups.com> <3934ab16-1fca-4ca8-8423-28bc07bf690cn@googlegroups.com> <406ecd73-aaba-4767-a0ae-b630968e6146n@googlegroups.com> <9d07b439-b1f7-4ac2-a931-7dea1a1a518dn@googlegroups.com> <62a62a46-d980-4abf-87f9-3b45ca1df921n@googlegroups.com> <e5a5ffc1-3e89-4cc8-93ec-db12e88d5b0en@googlegroups.com> <347cd0f6-5a9f-4468-a4d6-a5aa7a526d44n@googlegroups.com> <d6a989b4-8022-4176-82b5-1400da043788n@googlegroups.com> <ea771419-1521-4447-9d62-8bdae7638a48n@googlegroups.com> <ui4840$12q1s$1@solani.org> <e019d65e-f490-410b-9a4f-500460283d76n@googlegroups.com> <ui5u1a$13li8$2@solani.org> <237b1d3d-a682-47ea-bbbf-c052a8fc1b23n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <27193671-26a8-40aa-9887-63e003b40374n@googlegroups.com>
Subject: Re: Cut opaqueness in ISO prolog
From: bursejan@gmail.com (Mild Shock)
Injection-Date: Sun, 05 Nov 2023 19:38:53 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 19
 by: Mild Shock - Sun, 5 Nov 2023 19:38 UTC

Denial of a bug?
Creating a smoke screen?
How low can one get?

LoL

Julio Di Egidio schrieb am Samstag, 4. November 2023 um 20:43:01 UTC+1:
> On Saturday, 4 November 2023 at 18:12:13 UTC+1, Mild Shock wrote:
>
> > There is no call/1 in q1 or q2, you
> > can use listing/1 in recent GNU Prolog:
> LOL, you are a joke: which is exactly the reason why, for a
> correct definition of correct Prolog code, it *fails* your test.
>
> Whether that is ISO or not I'll leave those interested to find out.
>
> Have fun.
>
> Julio

Re: Cut opaqueness in ISO prolog

<a26c4585-8426-413f-b7d4-4ab82f49409an@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a0c:bf09:0:b0:66d:d3e:9d9a with SMTP id m9-20020a0cbf09000000b0066d0d3e9d9amr529793qvi.0.1699214549807;
Sun, 05 Nov 2023 12:02:29 -0800 (PST)
X-Received: by 2002:a05:6870:b629:b0:1e9:a86f:ec44 with SMTP id
cm41-20020a056870b62900b001e9a86fec44mr4732750oab.2.1699214549604; Sun, 05
Nov 2023 12:02:29 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!1.us.feeder.erje.net!feeder.erje.net!usenet.blueworldhosting.com!diablo1.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: Sun, 5 Nov 2023 12:02:29 -0800 (PST)
In-Reply-To: <27193671-26a8-40aa-9887-63e003b40374n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=77.57.50.239; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 77.57.50.239
References: <2016759a-13dd-4558-9bf0-b99571032171@googlegroups.com>
<4a9df624-2d0f-4376-a8fa-5de46b9570e5n@googlegroups.com> <8732c8be-ef95-4c75-b199-f72e991c6e88n@googlegroups.com>
<3934ab16-1fca-4ca8-8423-28bc07bf690cn@googlegroups.com> <406ecd73-aaba-4767-a0ae-b630968e6146n@googlegroups.com>
<9d07b439-b1f7-4ac2-a931-7dea1a1a518dn@googlegroups.com> <62a62a46-d980-4abf-87f9-3b45ca1df921n@googlegroups.com>
<e5a5ffc1-3e89-4cc8-93ec-db12e88d5b0en@googlegroups.com> <347cd0f6-5a9f-4468-a4d6-a5aa7a526d44n@googlegroups.com>
<d6a989b4-8022-4176-82b5-1400da043788n@googlegroups.com> <ea771419-1521-4447-9d62-8bdae7638a48n@googlegroups.com>
<ui4840$12q1s$1@solani.org> <e019d65e-f490-410b-9a4f-500460283d76n@googlegroups.com>
<ui5u1a$13li8$2@solani.org> <237b1d3d-a682-47ea-bbbf-c052a8fc1b23n@googlegroups.com>
<27193671-26a8-40aa-9887-63e003b40374n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a26c4585-8426-413f-b7d4-4ab82f49409an@googlegroups.com>
Subject: Re: Cut opaqueness in ISO prolog
From: bursejan@gmail.com (Mild Shock)
Injection-Date: Sun, 05 Nov 2023 20:02:29 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 3189
 by: Mild Shock - Sun, 5 Nov 2023 20:02 UTC

Actually a test case is quite rare in ISO Prolog. There is no
explicit test case for (\+)/1 that tests the matter. But a related
one for call/1, which can be adapted to also test (\+)/1:

Take these two facts:

a(1).
a(2).

Now perform these tests, the test case has also a nice
explanation in the ISO core standard itself:

/* ISO 7.8.3.4, ISO 7 */
?- Z = !, call( (Z=!, a(X), Z) ).
Z = !,
X = 1.

/* ISO 7.8.3.4, ISO 8 */
?- call( (Z=!, a(X), Z) ).
Z = !,
X = 1 ;
Z = !,
X = 2.

So sometimes Z gets wrapped into call(Z) and sometimes
not. Can you explain what happens Culio?

Mild Shock schrieb am Sonntag, 5. November 2023 um 20:38:54 UTC+1:
> Denial of a bug?
> Creating a smoke screen?
> How low can one get?
>
> LoL
> Julio Di Egidio schrieb am Samstag, 4. November 2023 um 20:43:01 UTC+1:
> > On Saturday, 4 November 2023 at 18:12:13 UTC+1, Mild Shock wrote:
> >
> > > There is no call/1 in q1 or q2, you
> > > can use listing/1 in recent GNU Prolog:
> > LOL, you are a joke: which is exactly the reason why, for a
> > correct definition of correct Prolog code, it *fails* your test.
> >
> > Whether that is ISO or not I'll leave those interested to find out.
> >
> > Have fun.
> >
> > Julio

Re: Cut opaqueness in ISO prolog

<fda9e95d-1298-40b4-990f-6fed547fada1n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:620a:d47:b0:76f:cd2:5d10 with SMTP id o7-20020a05620a0d4700b0076f0cd25d10mr184518qkl.5.1699214908676;
Sun, 05 Nov 2023 12:08:28 -0800 (PST)
X-Received: by 2002:a05:6870:618f:b0:1ea:973:51da with SMTP id
a15-20020a056870618f00b001ea097351damr12302298oah.0.1699214908482; Sun, 05
Nov 2023 12:08:28 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.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: Sun, 5 Nov 2023 12:08:28 -0800 (PST)
In-Reply-To: <a26c4585-8426-413f-b7d4-4ab82f49409an@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=77.57.50.239; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 77.57.50.239
References: <2016759a-13dd-4558-9bf0-b99571032171@googlegroups.com>
<4a9df624-2d0f-4376-a8fa-5de46b9570e5n@googlegroups.com> <8732c8be-ef95-4c75-b199-f72e991c6e88n@googlegroups.com>
<3934ab16-1fca-4ca8-8423-28bc07bf690cn@googlegroups.com> <406ecd73-aaba-4767-a0ae-b630968e6146n@googlegroups.com>
<9d07b439-b1f7-4ac2-a931-7dea1a1a518dn@googlegroups.com> <62a62a46-d980-4abf-87f9-3b45ca1df921n@googlegroups.com>
<e5a5ffc1-3e89-4cc8-93ec-db12e88d5b0en@googlegroups.com> <347cd0f6-5a9f-4468-a4d6-a5aa7a526d44n@googlegroups.com>
<d6a989b4-8022-4176-82b5-1400da043788n@googlegroups.com> <ea771419-1521-4447-9d62-8bdae7638a48n@googlegroups.com>
<ui4840$12q1s$1@solani.org> <e019d65e-f490-410b-9a4f-500460283d76n@googlegroups.com>
<ui5u1a$13li8$2@solani.org> <237b1d3d-a682-47ea-bbbf-c052a8fc1b23n@googlegroups.com>
<27193671-26a8-40aa-9887-63e003b40374n@googlegroups.com> <a26c4585-8426-413f-b7d4-4ab82f49409an@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <fda9e95d-1298-40b4-990f-6fed547fada1n@googlegroups.com>
Subject: Re: Cut opaqueness in ISO prolog
From: bursejan@gmail.com (Mild Shock)
Injection-Date: Sun, 05 Nov 2023 20:08:28 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 4068
 by: Mild Shock - Sun, 5 Nov 2023 20:08 UTC

Here is an adaption to negation, basically my testcase.
Add a further fact as follows:

b(2).

The test case is now:

/* GNU Prolog 1.5.0, does it correctly */
/* ISO 7.8.3.4, ISO 7 adapted */
?- Z = !, \+( (Z=!, a(X), Z, b(X)) ).
Z = !
/* ISO 7.8.3.4, ISO 8 adapted */
?- \+( (Z=!, a(X), Z, b(X)) ).
no

/* SWI-Prolog 9.1.17, has the same bug */
/* ISO 7.8.3.4, ISO 7 adapted */
?- Z = !, \+( (Z=!, a(X), Z, b(X)) ).
false.
/* ISO 7.8.3.4, ISO 8 adapted */
?- \+( (Z=!, a(X), Z, b(X)) ).
false.

SWI-Prolog says thice false which is wrong,
the frist test case derived from ISO 7.8.3.4, ISO 7
should say yes or Z = !.

Mild Shock schrieb am Sonntag, 5. November 2023 um 21:02:31 UTC+1:
> Actually a test case is quite rare in ISO Prolog. There is no
> explicit test case for (\+)/1 that tests the matter. But a related
> one for call/1, which can be adapted to also test (\+)/1:
>
> Take these two facts:
>
> a(1).
> a(2).
>
> Now perform these tests, the test case has also a nice
> explanation in the ISO core standard itself:
>
> /* ISO 7.8.3.4, ISO 7 */
> ?- Z = !, call( (Z=!, a(X), Z) ).
> Z = !,
> X = 1.
>
> /* ISO 7.8.3.4, ISO 8 */
> ?- call( (Z=!, a(X), Z) ).
> Z = !,
> X = 1 ;
> Z = !,
> X = 2.
>
> So sometimes Z gets wrapped into call(Z) and sometimes
> not. Can you explain what happens Culio?
> Mild Shock schrieb am Sonntag, 5. November 2023 um 20:38:54 UTC+1:
> > Denial of a bug?
> > Creating a smoke screen?
> > How low can one get?
> >
> > LoL
> > Julio Di Egidio schrieb am Samstag, 4. November 2023 um 20:43:01 UTC+1:
> > > On Saturday, 4 November 2023 at 18:12:13 UTC+1, Mild Shock wrote:
> > >
> > > > There is no call/1 in q1 or q2, you
> > > > can use listing/1 in recent GNU Prolog:
> > > LOL, you are a joke: which is exactly the reason why, for a
> > > correct definition of correct Prolog code, it *fails* your test.
> > >
> > > Whether that is ISO or not I'll leave those interested to find out.
> > >
> > > Have fun.
> > >
> > > Julio

Re: Cut opaqueness in ISO prolog

<02bfb40a-7123-4ece-a1ff-168128a89e43n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:ae9:e207:0:b0:777:f69:557 with SMTP id c7-20020ae9e207000000b007770f690557mr444599qkc.15.1699215288912;
Sun, 05 Nov 2023 12:14:48 -0800 (PST)
X-Received: by 2002:a05:6830:1d62:b0:6c4:58bd:290d with SMTP id
l2-20020a0568301d6200b006c458bd290dmr2271513oti.3.1699215288610; Sun, 05 Nov
2023 12:14:48 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.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: Sun, 5 Nov 2023 12:14:48 -0800 (PST)
In-Reply-To: <a26c4585-8426-413f-b7d4-4ab82f49409an@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=93.44.209.203; posting-account=F3H0JAgAAADcYVukktnHx7hFG5stjWse
NNTP-Posting-Host: 93.44.209.203
References: <2016759a-13dd-4558-9bf0-b99571032171@googlegroups.com>
<4a9df624-2d0f-4376-a8fa-5de46b9570e5n@googlegroups.com> <8732c8be-ef95-4c75-b199-f72e991c6e88n@googlegroups.com>
<3934ab16-1fca-4ca8-8423-28bc07bf690cn@googlegroups.com> <406ecd73-aaba-4767-a0ae-b630968e6146n@googlegroups.com>
<9d07b439-b1f7-4ac2-a931-7dea1a1a518dn@googlegroups.com> <62a62a46-d980-4abf-87f9-3b45ca1df921n@googlegroups.com>
<e5a5ffc1-3e89-4cc8-93ec-db12e88d5b0en@googlegroups.com> <347cd0f6-5a9f-4468-a4d6-a5aa7a526d44n@googlegroups.com>
<d6a989b4-8022-4176-82b5-1400da043788n@googlegroups.com> <ea771419-1521-4447-9d62-8bdae7638a48n@googlegroups.com>
<ui4840$12q1s$1@solani.org> <e019d65e-f490-410b-9a4f-500460283d76n@googlegroups.com>
<ui5u1a$13li8$2@solani.org> <237b1d3d-a682-47ea-bbbf-c052a8fc1b23n@googlegroups.com>
<27193671-26a8-40aa-9887-63e003b40374n@googlegroups.com> <a26c4585-8426-413f-b7d4-4ab82f49409an@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <02bfb40a-7123-4ece-a1ff-168128a89e43n@googlegroups.com>
Subject: Re: Cut opaqueness in ISO prolog
From: julio@diegidio.name (Julio Di Egidio)
Injection-Date: Sun, 05 Nov 2023 20:14:48 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2792
 by: Julio Di Egidio - Sun, 5 Nov 2023 20:14 UTC

On Sunday, 5 November 2023 at 21:02:31 UTC+1, Mild Shock wrote:

> Actually a test case is quite rare in ISO Prolog.

LOL. Test cases are the *only* thing available around here!!

> There is no explicit test case for (\+)/1 that tests the matter.

Nor \+ has anything to do with this matter.

> Take these two facts:
>
> a(1).
> a(2).
>
> Now perform these tests,

> /* ISO 7.8.3.4, ISO 7 */
> ?- Z = !, call( (Z=!, a(X), Z) ).
> Z = !,
> X = 1.

Where Z does *not* become call(Z).

> /* ISO 7.8.3.4, ISO 8 */
> ?- call( (Z=!, a(X), Z) ).
> Z = !,
> X = 1 ;
> Z = !,
> X = 2.
>
> So sometimes Z gets wrapped into call(Z)
> and sometimes not.

Apparently.

> Can you explain what happens Culio?

Thanks for that, Burp. I can't. Can you?

Julio

Re: Cut opaqueness in ISO prolog

<885a2dce-c6d8-47c4-8010-81b6119db735n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:ac8:5147:0:b0:41c:b702:a298 with SMTP id h7-20020ac85147000000b0041cb702a298mr489125qtn.3.1699215532147;
Sun, 05 Nov 2023 12:18:52 -0800 (PST)
X-Received: by 2002:a05:6871:486:b0:1e9:ee3f:4c7c with SMTP id
f6-20020a056871048600b001e9ee3f4c7cmr13180674oaj.2.1699215531956; Sun, 05 Nov
2023 12:18:51 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.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: Sun, 5 Nov 2023 12:18:51 -0800 (PST)
In-Reply-To: <02bfb40a-7123-4ece-a1ff-168128a89e43n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=93.44.209.203; posting-account=F3H0JAgAAADcYVukktnHx7hFG5stjWse
NNTP-Posting-Host: 93.44.209.203
References: <2016759a-13dd-4558-9bf0-b99571032171@googlegroups.com>
<4a9df624-2d0f-4376-a8fa-5de46b9570e5n@googlegroups.com> <8732c8be-ef95-4c75-b199-f72e991c6e88n@googlegroups.com>
<3934ab16-1fca-4ca8-8423-28bc07bf690cn@googlegroups.com> <406ecd73-aaba-4767-a0ae-b630968e6146n@googlegroups.com>
<9d07b439-b1f7-4ac2-a931-7dea1a1a518dn@googlegroups.com> <62a62a46-d980-4abf-87f9-3b45ca1df921n@googlegroups.com>
<e5a5ffc1-3e89-4cc8-93ec-db12e88d5b0en@googlegroups.com> <347cd0f6-5a9f-4468-a4d6-a5aa7a526d44n@googlegroups.com>
<d6a989b4-8022-4176-82b5-1400da043788n@googlegroups.com> <ea771419-1521-4447-9d62-8bdae7638a48n@googlegroups.com>
<ui4840$12q1s$1@solani.org> <e019d65e-f490-410b-9a4f-500460283d76n@googlegroups.com>
<ui5u1a$13li8$2@solani.org> <237b1d3d-a682-47ea-bbbf-c052a8fc1b23n@googlegroups.com>
<27193671-26a8-40aa-9887-63e003b40374n@googlegroups.com> <a26c4585-8426-413f-b7d4-4ab82f49409an@googlegroups.com>
<02bfb40a-7123-4ece-a1ff-168128a89e43n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <885a2dce-c6d8-47c4-8010-81b6119db735n@googlegroups.com>
Subject: Re: Cut opaqueness in ISO prolog
From: julio@diegidio.name (Julio Di Egidio)
Injection-Date: Sun, 05 Nov 2023 20:18:52 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 3066
 by: Julio Di Egidio - Sun, 5 Nov 2023 20:18 UTC

On Sunday, 5 November 2023 at 21:14:49 UTC+1, Julio Di Egidio wrote:
> On Sunday, 5 November 2023 at 21:02:31 UTC+1, Mild Shock wrote:
>
> > Actually a test case is quite rare in ISO Prolog.
> LOL. Test cases are the *only* thing available around here!!
> > There is no explicit test case for (\+)/1 that tests the matter.
> Nor \+ has anything to do with this matter.
> > Take these two facts:
> >
> > a(1).
> > a(2).
> >
> > Now perform these tests,
> > /* ISO 7.8.3.4, ISO 7 */
> > ?- Z = !, call( (Z=!, a(X), Z) ).
> > Z = !,
> > X = 1.
> Where Z does *not* become call(Z).
> > /* ISO 7.8.3.4, ISO 8 */
> > ?- call( (Z=!, a(X), Z) ).
> > Z = !,
> > X = 1 ;
> > Z = !,
> > X = 2.
> >
> > So sometimes Z gets wrapped into call(Z)
> > and sometimes not.
>
> Apparently.
>
> > Can you explain what happens Culio?
>
> Thanks for that, Burp. I can't. Can you?

P.S. Which is why the best practice is to just
never write a nude call to a variable...

Julio

Re: Cut opaqueness in ISO prolog

<a1b094f7-d007-4522-8ef1-d0fc3999b5a2n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:ac8:678f:0:b0:418:1dbb:95de with SMTP id b15-20020ac8678f000000b004181dbb95demr488925qtp.11.1699215696391;
Sun, 05 Nov 2023 12:21:36 -0800 (PST)
X-Received: by 2002:a05:6808:220e:b0:3b5:798a:b5aa with SMTP id
bd14-20020a056808220e00b003b5798ab5aamr5357237oib.7.1699215696206; Sun, 05
Nov 2023 12:21:36 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.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: Sun, 5 Nov 2023 12:21:35 -0800 (PST)
In-Reply-To: <885a2dce-c6d8-47c4-8010-81b6119db735n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=93.44.209.203; posting-account=F3H0JAgAAADcYVukktnHx7hFG5stjWse
NNTP-Posting-Host: 93.44.209.203
References: <2016759a-13dd-4558-9bf0-b99571032171@googlegroups.com>
<4a9df624-2d0f-4376-a8fa-5de46b9570e5n@googlegroups.com> <8732c8be-ef95-4c75-b199-f72e991c6e88n@googlegroups.com>
<3934ab16-1fca-4ca8-8423-28bc07bf690cn@googlegroups.com> <406ecd73-aaba-4767-a0ae-b630968e6146n@googlegroups.com>
<9d07b439-b1f7-4ac2-a931-7dea1a1a518dn@googlegroups.com> <62a62a46-d980-4abf-87f9-3b45ca1df921n@googlegroups.com>
<e5a5ffc1-3e89-4cc8-93ec-db12e88d5b0en@googlegroups.com> <347cd0f6-5a9f-4468-a4d6-a5aa7a526d44n@googlegroups.com>
<d6a989b4-8022-4176-82b5-1400da043788n@googlegroups.com> <ea771419-1521-4447-9d62-8bdae7638a48n@googlegroups.com>
<ui4840$12q1s$1@solani.org> <e019d65e-f490-410b-9a4f-500460283d76n@googlegroups.com>
<ui5u1a$13li8$2@solani.org> <237b1d3d-a682-47ea-bbbf-c052a8fc1b23n@googlegroups.com>
<27193671-26a8-40aa-9887-63e003b40374n@googlegroups.com> <a26c4585-8426-413f-b7d4-4ab82f49409an@googlegroups.com>
<02bfb40a-7123-4ece-a1ff-168128a89e43n@googlegroups.com> <885a2dce-c6d8-47c4-8010-81b6119db735n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a1b094f7-d007-4522-8ef1-d0fc3999b5a2n@googlegroups.com>
Subject: Re: Cut opaqueness in ISO prolog
From: julio@diegidio.name (Julio Di Egidio)
Injection-Date: Sun, 05 Nov 2023 20:21:36 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 3420
 by: Julio Di Egidio - Sun, 5 Nov 2023 20:21 UTC

On Sunday, 5 November 2023 at 21:18:53 UTC+1, Julio Di Egidio wrote:
> On Sunday, 5 November 2023 at 21:14:49 UTC+1, Julio Di Egidio wrote:
> > On Sunday, 5 November 2023 at 21:02:31 UTC+1, Mild Shock wrote:
> >
> > > Actually a test case is quite rare in ISO Prolog.
> > LOL. Test cases are the *only* thing available around here!!
> > > There is no explicit test case for (\+)/1 that tests the matter.
> > Nor \+ has anything to do with this matter.
> > > Take these two facts:
> > >
> > > a(1).
> > > a(2).
> > >
> > > Now perform these tests,
> > > /* ISO 7.8.3.4, ISO 7 */
> > > ?- Z = !, call( (Z=!, a(X), Z) ).
> > > Z = !,
> > > X = 1.
> > Where Z does *not* become call(Z).
> > > /* ISO 7.8.3.4, ISO 8 */
> > > ?- call( (Z=!, a(X), Z) ).
> > > Z = !,
> > > X = 1 ;
> > > Z = !,
> > > X = 2.
> > >
> > > So sometimes Z gets wrapped into call(Z)
> > > and sometimes not.
> >
> > Apparently.
> >
> > > Can you explain what happens Culio?
> >
> > Thanks for that, Burp. I can't. Can you?
> P.S. Which is why the best practice is to just
> never write a nude call to a variable...

P.P.S. Assuming at least that much is consistent, which,
given the above, I am not even very much confident into...

Enough said. Cheers.

Julio

Pages:12
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor