Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Profanity is the one language all programmers know best.


devel / comp.lang.prolog / Re: About the Operator '|' and the DCG Draft

SubjectAuthor
o About the Operator '|' and the DCG DraftMostowski Collapse

1
Re: About the Operator '|' and the DCG Draft

<adcb7512-f998-4843-bab4-f1b2c7342b40n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:622a:89:b0:2e1:b8c7:9975 with SMTP id o9-20020a05622a008900b002e1b8c79975mr23984228qtw.342.1649623166917;
Sun, 10 Apr 2022 13:39:26 -0700 (PDT)
X-Received: by 2002:a81:92c8:0:b0:2eb:ef8e:b3b3 with SMTP id
j191-20020a8192c8000000b002ebef8eb3b3mr8639186ywg.433.1649623166763; Sun, 10
Apr 2022 13:39:26 -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, 10 Apr 2022 13:39:26 -0700 (PDT)
In-Reply-To: <8f5f92be-4fbe-4093-8ee9-a4796618e0can@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=77.57.53.70; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 77.57.53.70
References: <27a911c0-3a2f-4054-81e5-bad9d8320750n@googlegroups.com>
<6ed26ce6-eaca-44f4-8c47-ff065227259bn@googlegroups.com> <2f729e39-7a7c-4079-9b34-08e080c6b242n@googlegroups.com>
<1a2d52b2-52ae-41c8-ad97-07dd4d07c264n@googlegroups.com> <296a2193-cea2-4aa1-a6de-eee173404568n@googlegroups.com>
<1f6e60c8-e8b2-42b8-9ca8-d1688ab1da26n@googlegroups.com> <b73e5ef2-93d6-4d30-ab36-d5fcb45531b8n@googlegroups.com>
<163a9271-9d06-4fbc-8d3c-1903bd8733bdn@googlegroups.com> <c07fe58b-ca4d-44d1-a716-1790a2033be0n@googlegroups.com>
<82d76042-37a3-44ab-addc-3784060038ccn@googlegroups.com> <9f1d1d60-7c54-4c2d-a655-04b651565d0bn@googlegroups.com>
<0d15e64d-f537-4313-b637-cdd0f66a1761n@googlegroups.com> <52b84705-714c-4248-b85b-a643413b7ff3n@googlegroups.com>
<0152c446-3e8e-4e4f-807c-51e913f95708n@googlegroups.com> <c7ee2838-d75c-4807-982a-fd3567d82374n@googlegroups.com>
<a0dd0b5f-b459-48d3-842b-675f9712c902n@googlegroups.com> <7950d178-a688-4122-ab3a-c5105359632cn@googlegroups.com>
<d8530517-401e-46ec-84f3-7f09c8dd70f5n@googlegroups.com> <870d9bb1-4c0f-41a2-8430-99abd733eed1n@googlegroups.com>
<8f5f92be-4fbe-4093-8ee9-a4796618e0can@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <adcb7512-f998-4843-bab4-f1b2c7342b40n@googlegroups.com>
Subject: Re: About the Operator '|' and the DCG Draft
From: burse...@gmail.com (Mostowski Collapse)
Injection-Date: Sun, 10 Apr 2022 20:39:26 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Mostowski Collapse - Sun, 10 Apr 2022 20:39 UTC

Yet another bug, which is even a test case from
the ISO core standard, its the 4-th example from
Table 6 - Equivalent Terms:

/* SWI-Prolog */
?- op(9,fy,fy), op(9,yf,yf).
true.
?- X = (fy 2 yf), write_canonical(X), nl.
yf(fy(2))
X = fy 2 yf.

On the other hand:

/* GNU Prolog */
?- op(9,fy,fy), op(9,yf,yf).
yes
?- X = (fy 2 yf), write_canonical(X), nl.
fy(yf(2))
X = fy 2 yf

My suspicion, in terms of
https://github.com/ridgeworks/pPEGpl/tree/main/Examples/SWIP-grammar

These here are probably wrong:

op_associativityEq(fy,yfx,left).
op_associativityEq(fy,yf,left).

Actually I don’t know exactly, I am new to this code. Whats
especially difficult for me, to specify a change, even if I
can locate the error, I don’t know what to do as a fix?

But I guess more extensive testing would be needed to find
all table errors. I have only spotted two, because of analogy
between yfx and yf. But maybe there are more nasty bugs?

Mostowski Collapse schrieb am Samstag, 9. April 2022 um 14:17:17 UTC+2:
> Can he use his SWIPL example to figure out whats going wrong here:
> /* SWI-Prolog */
> ?- op(9,fy,fy), op(9,yfx,yfx).
> true.
>
> ?- X = (fy 1 yfx 2), write_canonical(X), nl.
> yfx(fy(1),2)
> Maybe its just a small bug, like (>=)/2 instead of (>)/2 or somesuch.
>
> I am refering to:
> https://github.com/ridgeworks/pPEGpl/tree/main/Examples/SWIP-grammar
> Mostowski Collapse schrieb am Samstag, 9. April 2022 um 12:51:13 UTC+2:
> > Now I found a test case where SWI-Prolog and
> > Scryer Prolog differ in parsing:
> >
> > /* SWI-Prolog */
> > ?- op(9,fy,fy), op(9,yfx,yfx).
> > true.
> >
> > ?- X = (fy 1 yfx 2), write_canonical(X), nl.
> > yfx(fy(1),2)
> >
> > But then:
> >
> > /* Scryer Prolog */
> > ?- op(9,fy,fy), op(9,yfx,yfx).
> > true.
> >
> > ?- X = (fy 1 yfx 2), write_canonical(X), nl.
> > fy(yfx(1,2))
> >
> > Was worried what Dogelog Player does. But it seems Dogelog Player
> > sides with Scryer Prolog, also GNU Prolog, Tau Prolog and
> > formerly Jekejeke Prolog do.

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor