GProlog call built-in predicates

Help requests on developing Logtalk applications

Moderator: Paulo Moura

Locked
rbt
Posts: 17
Joined: Tue Feb 09, 2010 10:21 am

GProlog call built-in predicates

Post by rbt »

I just have tried the lasted development version of gprolog (gprolog-20110622) and noticed that built-in predicates can only be called inside a logtalk object with the enclosing '{}'.
Unfortunately, that also affects the logtalk libraries.

See, for example, the following call:

Code: Select all

| ?- list::length([d,a,d],N).
uncaught exception: error(existence_error(procedure,integer/1),context(object,list,length/2))
Has anybody an idea of how to deal with that problem? Is that an error of the gprolog Version?

Regards,

rbt

Paulo Moura
Logtalk developer
Posts: 533
Joined: Sat May 05, 2007 8:35 am
Location: Portugal
Contact:

Re: GProlog call built-in predicates

Post by Paulo Moura »

If you want to use the latest beta of GNU Prolog 1.4.0, you will also need to use the latest development version of Logtalk. GNU Prolog 1.4.0 makes some incompatible changes (w.r.t. previous versions) regarding predicate properties that affect how Logtalk tests for built-in predicates.
Paulo Moura
Logtalk developer

rbt
Posts: 17
Joined: Tue Feb 09, 2010 10:21 am

Re: GProlog call built-in predicates

Post by rbt »

Paulo Moura wrote:If you want to use the latest beta of GNU Prolog 1.4.0, you will also need to use the latest development version of Logtalk. GNU Prolog 1.4.0 makes some incompatible changes (w.r.t. previous versions) regarding predicate properties that affect how Logtalk tests for built-in predicates.
Ah ok. Thanks. This probably also holds for the new GNU Prolog 1.4.0 (stable) which was released a few minutes ago. I will try it out later.

Regards,

rbt

Paulo Moura
Logtalk developer
Posts: 533
Joined: Sat May 05, 2007 8:35 am
Location: Portugal
Contact:

Re: GProlog call built-in predicates

Post by Paulo Moura »

Yes. I have just build the MacOS X 10.6 installer for GNU Prolog 1.4.0. I also retested the stable 1.4.0 version with the current Logtalk development version and found no issues.
Paulo Moura
Logtalk developer

rbt
Posts: 17
Joined: Tue Feb 09, 2010 10:21 am

Re: GProlog call built-in predicates

Post by rbt »

Paulo Moura wrote:Yes. I have just build the MacOS X 10.6 installer for GNU Prolog 1.4.0. I also retested the stable 1.4.0 version with the current Logtalk development version and found no issues.
I found out that the problem with the built-in predicates still occurs for some predicates, namely write/1 and nl/0.

Regards,

rbt

Paulo Moura
Logtalk developer
Posts: 533
Joined: Sat May 05, 2007 8:35 am
Location: Portugal
Contact:

Re: GProlog call built-in predicates

Post by Paulo Moura »

I cannot reproduce the problem. Please post a small example that illustrates it. Be sure to be using the latest Logtalk development release.
Paulo Moura
Logtalk developer

rbt
Posts: 17
Joined: Tue Feb 09, 2010 10:21 am

Re: GProlog call built-in predicates

Post by rbt »

Paulo Moura wrote:I cannot reproduce the problem. Please post a small example that illustrates it. Be sure to be using the latest Logtalk development release.
Oh sorry, I just forgot to set the environment variables to the Logtalk development release. Now it works. Thanks.

Locked