bug-prolog
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNU Prolog 1.4.5 under Linux


From: Paulo Moura
Subject: Re: GNU Prolog 1.4.5 under Linux
Date: Mon, 24 Sep 2018 14:01:15 +0100

Hi Sergey,

> On 24 Sep 2018, at 08:19, Sergey S. Kumkov <address@hidden> wrote:
> 
> 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).
> ---------------------------------
> 
> 
> ---------------------------------
> address@hidden:~/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?

Cannot reproduce the issue using your file in same GNU Prolog version running 
on macOS. It can be the case that the apt package is broken. Can you try to 
compile GNU Prolog from sources, look for any compilation errors/warnings, and 
check if the issue persists?

Cheers,
Paulo

-----------------------------------------------------------------
Paulo Moura
Logtalk developer







reply via email to

[Prev in Thread] Current Thread [Next in Thread]