GNU Prolog 1.4.5 under Linux

"Sergey S. Kumkov" <[email protected]> Mon, 24 Sep 2018 12:19:44 +0500
Newsgroups gmane.comp.gnu.prolog.bugs
Message-ID <[email protected]>
Linux serge-note 4.15.0-34-generic #37-Ubuntu SMP Mon Aug 27 15:21:48 
UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

(actually, kubuntu 18.04.1, if it is important)


GNU Prolog 1.4.5 (64 bits)
Compiled Feb  5 2017, 10:30:08 with gcc
By Daniel Diaz
Copyright (C) 1999-2016 Daniel Diaz

(installed from repositories by apt)


--------- max1.pro --------------
mmax(X,Y,Z) :- X > Y -> Z = X.
mmax(_,Y,Y).
---------------------------------


---------------------------------
serge@serge-note:~/Programming/Prolog$ gprolog
GNU Prolog 1.4.5 (64 bits)
Compiled Feb  5 2017, 10:30:08 with gcc
By Daniel Diaz
Copyright (C) 1999-2016 Daniel Diaz
| ?- ['max1'].
compiling /home/serge/Programming/Prolog/max1.pro for byte code...
/home/serge/Programming/Prolog/max1.pro compiled, 2 lines read - 735 
bytes written, 12 ms

yes
| ?- listing.

% file: /home/serge/Programming/Prolog/max1.pro

mmax(A, B, C) :-
         (   A > B ->
             C = A
         ).
mmax(_, A, A).

yes
| ?- mmax(1,2,R).
uncaught exception: 
error(existence_error(procedure,'$mmax/3_$aux1'/0),mmax/0)

---------------------------------

Why does the interpreter not find an existing preicate?


Sincerely your, Sergey Kumkov

------------------------------
     [email protected]
     ICQ UIN 8418050
     Skype: sskumk
     mobile: +7(922)2057287
------------------------------