Issues with ubuntu 18.04

Jerry Hancock <[email protected]> Thu, 25 Mar 2021 14:25:54 -0700
Newsgroups gmane.comp.gnu.prolog.bugs
Message-ID <[email protected]>
--Apple-Mail=_6216662A-DE59-4ABF-83AD-BDD653FC1A21
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8

Hello, =20

Please excuse me for asking about something so old.  I installed =
gnu-prolog 1.4.5 on ubuntu server 18.04.  The underlying hardware is an =
HP dl380 with at least 24 cores.  I had some code that runs perfectly =
but slowly on other servers so I thought I would try my cloud server.

The test code is simple and instantiated in sit3.pl:

c(blue).
c(green).

sit3(X):-c(X).

On my other installations, the first solution X=3Dblue is returned as =
expected..  On the ubuntu server 18.04 , I get an error, "uncaught =
exception error(existence_error(procedure,c/0),sit3/0) =E2=80=9C =
implying that c/0 doesn=E2=80=99t exist but I=E2=80=99m not calling c/0 =
I=E2=80=99m calling c/1 as below:

{trace}
| ?- sit3(X).
      1    1  Call: sit3(_24) ?=20
      2    2  Call: c ?=20
      2    2  Exception: c ?=20
      1    1  Exception: sit3(_24) ?=20
uncaught exception: error(existence_error(procedure,c/0),sit3/0)
{trace}
| ?-=20

If I assert the clauses from the terminal, all is well.

If I run c(X), trace returns:

| ?- c(X).
      1    1  Call: c(_24) ?=20
      1    1  Exit: c(blue) ?=20

X =3D blue ?=20

Or=20

| ?- asserta(cc(blue)).

yes
| ?- asserta(cc(green)).

yes
| ?- asserta((sit33(X):-cc(X))).

yes
| ?- sit33(X).

X =3D green ?=20


This is a very simple example that should work.  I=E2=80=99ve been =
working with prolog since the late 80=E2=80=99s and unless there is an =
ini file that is note allowing the clauses to be added correctly, I =
could't find it.

Thanks=

--Apple-Mail=_6216662A-DE59-4ABF-83AD-BDD653FC1A21
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=utf-8

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; =
charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; line-break: after-white-space;" class=3D""><meta=
 http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dutf-8" =
class=3D""><div style=3D"word-wrap: break-word; -webkit-nbsp-mode: =
space; line-break: after-white-space;" class=3D"">Hello, &nbsp;<div =
class=3D""><br class=3D""></div><div class=3D"">Please excuse me for =
asking about something so old. &nbsp;I installed gnu-prolog 1.4.5 on =
ubuntu server 18.04. &nbsp;The underlying hardware is an HP dl380 with =
at least 24 cores. &nbsp;I had some code that runs perfectly but slowly =
on other servers so I thought I would try my cloud server.<div =
class=3D""><br class=3D""></div><div class=3D"">The test code is simple =
and instantiated in sit3.pl:</div><div class=3D""><br =
class=3D""></div><div class=3D"">c(blue).</div><div =
class=3D"">c(green).</div><div class=3D""><br class=3D""></div><div =
class=3D"">sit3(X):-c(X).</div><div class=3D""><br class=3D""></div><div =
class=3D"">On my other installations, the first solution X=3Dblue is =
returned as expected.. &nbsp;On the ubuntu server 18.04 , I get an =
error, "<span style=3D"font-family: Menlo; font-size: 11px;" =
class=3D"">uncaught exception =
error(existence_error(procedure,c/0),sit3/0)</span>&nbsp;=E2=80=9C =
implying that c/0 doesn=E2=80=99t exist but I=E2=80=99m not calling c/0 =
I=E2=80=99m calling c/1 as below:</div><div class=3D""><br =
class=3D""></div><div class=3D""><div style=3D"margin: 0px; =
font-stretch: normal; font-size: 11px; line-height: normal; font-family: =
Menlo;" class=3D""><span style=3D"font-variant-ligatures: =
no-common-ligatures" class=3D"">{trace}</span></div><div style=3D"margin: =
0px; font-stretch: normal; font-size: 11px; line-height: normal; =
font-family: Menlo;" class=3D""><span style=3D"font-variant-ligatures: =
no-common-ligatures" class=3D"">| ?- sit3(X).</span></div><div =
style=3D"margin: 0px; font-stretch: normal; font-size: 11px; =
line-height: normal; font-family: Menlo;" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures" class=3D"">&nbsp; =
&nbsp; &nbsp; 1&nbsp; &nbsp; 1&nbsp; Call: sit3(_24) =
?&nbsp;</span></div><div style=3D"margin: 0px; font-stretch: normal; =
font-size: 11px; line-height: normal; font-family: Menlo;" =
class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" =
class=3D"">&nbsp; &nbsp; &nbsp; 2&nbsp; &nbsp; 2&nbsp; Call: c =
?&nbsp;</span></div><div style=3D"margin: 0px; font-stretch: normal; =
font-size: 11px; line-height: normal; font-family: Menlo;" =
class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" =
class=3D"">&nbsp; &nbsp; &nbsp; 2&nbsp; &nbsp; 2&nbsp; Exception: c =
?&nbsp;</span></div><div style=3D"margin: 0px; font-stretch: normal; =
font-size: 11px; line-height: normal; font-family: Menlo;" =
class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" =
class=3D"">&nbsp; &nbsp; &nbsp; 1&nbsp; &nbsp; 1&nbsp; Exception: =
sit3(_24) ?&nbsp;</span></div><div style=3D"margin: 0px; font-stretch: =
normal; font-size: 11px; line-height: normal; font-family: Menlo;" =
class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" =
class=3D"">uncaught exception: =
error(existence_error(procedure,c/0),sit3/0)</span></div><div =
style=3D"margin: 0px; font-stretch: normal; font-size: 11px; =
line-height: normal; font-family: Menlo;" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures" =
class=3D"">{trace}</span></div><div style=3D"margin: 0px; font-stretch: =
normal; font-size: 11px; line-height: normal; font-family: Menlo;" =
class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" =
class=3D"">| ?-&nbsp;</span></div></div><div style=3D"margin: 0px; =
font-stretch: normal; font-size: 11px; line-height: normal; font-family: =
Menlo;" class=3D""><span style=3D"font-variant-ligatures: =
no-common-ligatures" class=3D""><br class=3D""></span></div><div =
style=3D"margin: 0px; font-stretch: normal; font-size: 11px; =
line-height: normal; font-family: Menlo;" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures" class=3D"">If I =
assert the clauses from the terminal, all is well.</span></div><div =
style=3D"margin: 0px; font-stretch: normal; font-size: 11px; =
line-height: normal; font-family: Menlo;" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures" class=3D""><br =
class=3D""></span></div><div style=3D"margin: 0px; font-stretch: normal; =
font-size: 11px; line-height: normal; font-family: Menlo;" =
class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" =
class=3D"">If I run c(X), trace returns:</span></div><div style=3D"margin:=
 0px; font-stretch: normal; font-size: 11px; line-height: normal; =
font-family: Menlo;" class=3D""><span style=3D"font-variant-ligatures: =
no-common-ligatures" class=3D""><br class=3D""></span></div><div =
style=3D"margin: 0px; font-stretch: normal; font-size: 11px; =
line-height: normal; font-family: Menlo;" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures" class=3D""><div =
style=3D"margin: 0px; font-stretch: normal; line-height: normal;" =
class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" =
class=3D"">| ?- c(X).</span></div><div style=3D"margin: 0px; =
font-stretch: normal; line-height: normal;" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures" class=3D"">&nbsp; =
&nbsp; &nbsp; 1&nbsp; &nbsp; 1&nbsp; Call: c(_24) =
?&nbsp;</span></div><div style=3D"margin: 0px; font-stretch: normal; =
line-height: normal;" class=3D""><span style=3D"font-variant-ligatures: =
no-common-ligatures" class=3D"">&nbsp; &nbsp; &nbsp; 1&nbsp; &nbsp; =
1&nbsp; Exit: c(blue) ?&nbsp;</span></div><div style=3D"margin: 0px; =
font-stretch: normal; line-height: normal; min-height: 13px;" =
class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" =
class=3D""></span><br class=3D""></div><div style=3D"margin: 0px; =
font-stretch: normal; line-height: normal;" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures" class=3D"">X =3D =
blue ?&nbsp;</span></div><div style=3D"margin: 0px; font-stretch: =
normal; line-height: normal;" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures" class=3D""><br =
class=3D""></span></div><div style=3D"margin: 0px; font-stretch: normal; =
line-height: normal;" class=3D""><span style=3D"font-variant-ligatures: =
no-common-ligatures" class=3D"">Or&nbsp;</span></div><div style=3D"margin:=
 0px; font-stretch: normal; line-height: normal;" class=3D""><br =
class=3D""></div><div style=3D"margin: 0px; font-stretch: normal; =
line-height: normal;" class=3D"">| ?- asserta(cc(blue)).</div><div =
style=3D"margin: 0px; font-stretch: normal; line-height: normal; =
min-height: 13px;" class=3D""><span style=3D"font-variant-ligatures: =
no-common-ligatures" class=3D""></span><br class=3D""></div><div =
style=3D"margin: 0px; font-stretch: normal; line-height: normal;" =
class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" =
class=3D"">yes</span></div><div style=3D"margin: 0px; font-stretch: =
normal; line-height: normal;" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures" class=3D"">| ?- =
asserta(cc(green)).</span></div><div style=3D"margin: 0px; font-stretch: =
normal; line-height: normal; min-height: 13px;" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures" =
class=3D""></span><br class=3D""></div><div style=3D"margin: 0px; =
font-stretch: normal; line-height: normal;" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures" =
class=3D"">yes</span></div><div style=3D"margin: 0px; font-stretch: =
normal; line-height: normal;" class=3D"">| ?- =
asserta((sit33(X):-cc(X))).</div><div style=3D"margin: 0px; =
font-stretch: normal; line-height: normal; min-height: 13px;" =
class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" =
class=3D""></span><br class=3D""></div><div style=3D"margin: 0px; =
font-stretch: normal; line-height: normal;" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures" =
class=3D"">yes</span></div><div style=3D"margin: 0px; font-stretch: =
normal; line-height: normal;" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures" class=3D"">| ?- =
sit33(X).</span></div><div style=3D"margin: 0px; font-stretch: normal; =
line-height: normal; min-height: 13px;" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures" =
class=3D""></span><br class=3D""></div><div style=3D"margin: 0px; =
font-stretch: normal; line-height: normal;" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures" class=3D"">X =3D =
green ?&nbsp;</span></div><div class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures" class=3D""><br =
class=3D""></span></div><div style=3D"margin: 0px; font-stretch: normal; =
line-height: normal;" class=3D""><span style=3D"font-variant-ligatures: =
no-common-ligatures" class=3D""><br class=3D""></span></div><div =
style=3D"margin: 0px; font-stretch: normal; line-height: normal;" =
class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" =
class=3D"">This is a very simple example that should work. &nbsp;I=E2=80=99=
ve been working with prolog since the late 80=E2=80=99s and unless there =
is an ini file that is note allowing the clauses to be added correctly, =
I could't find it.</span></div><div style=3D"margin: 0px; font-stretch: =
normal; line-height: normal;" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures" class=3D""><br =
class=3D""></span></div><div style=3D"margin: 0px; font-stretch: normal; =
line-height: normal;" class=3D""><span style=3D"font-variant-ligatures: =
no-common-ligatures" =
class=3D"">Thanks</span></div></span></div></div></div></body></html>=

--Apple-Mail=_6216662A-DE59-4ABF-83AD-BDD653FC1A21--