Page 1 of 1

GProlog call built-in predicates

Posted: Wed Jun 29, 2011 7:52 am
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

Re: GProlog call built-in predicates

Posted: Wed Jun 29, 2011 1:39 pm
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.

Re: GProlog call built-in predicates

Posted: Wed Jun 29, 2011 3:40 pm
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

Re: GProlog call built-in predicates

Posted: Wed Jun 29, 2011 3:43 pm
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.

Re: GProlog call built-in predicates

Posted: Wed Jun 29, 2011 4:19 pm
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

Re: GProlog call built-in predicates

Posted: Wed Jun 29, 2011 4:24 pm
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.

Re: GProlog call built-in predicates

Posted: Thu Jun 30, 2011 7:36 am
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.