Hello,
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=blue is returned as expected..
On the ubuntu server 18.04 , I get an error, "uncaught exception
error(existence_error(procedure,c/0),sit3/0) “ implying that c/0 doesn’t exist
but I’m not calling c/0 I’m calling c/1 as below:
{trace}
| ?- sit3(X).
1 1 Call: sit3(_24) ?
2 2 Call: c ?
2 2 Exception: c ?
1 1 Exception: sit3(_24) ?
uncaught exception: error(existence_error(procedure,c/0),sit3/0)
{trace}
| ?-
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) ?
1 1 Exit: c(blue) ?
X = blue ?
Or
| ?- asserta(cc(blue)).
yes
| ?- asserta(cc(green)).
yes
| ?- asserta((sit33(X):-cc(X))).
yes
| ?- sit33(X).
X = green ?
This is a very simple example that should work. I’ve been working with prolog
since the late 80’s and unless there is an ini file that is note allowing the
clauses to be added correctly, I could't find it.
Thanks