Search found 48 matches

by Victor NOEL
Thu May 29, 2008 7:32 am
Forum: Help
Topic: Logtalk + JPL : Concurrent call to logtalk_load
Replies: 6
Views: 11035

Re: Logtalk + JPL : Concurrent call to logtalk_load

I suspect that using Logtalk+SWI-Prolog multi-threading features would be a simpler and more robust solution, at least from your posts on the SWI-Prolog mailing list. Do you mean by defining my agents in prolog ? So to not use java and JPL ? The Logtalk compiler uses a set of dynamic predicates for...
by Victor NOEL
Wed May 28, 2008 4:11 pm
Forum: Help
Topic: call with "::" in predicate used with a meta-predicate
Replies: 5
Views: 10075

call with "::" in predicate used with a meta-predicate

Hello, I am playing with the meta predicate meta::map. I have this code in a class :- private(expand/3). my_expand(T, B, NewT) :- T = neg(NT) -> (::expand(NT, B, NNewT), NewT = neg(NNewT)) ; (::expand(T, B, NewT)). unexpand(Binding, A, B) :- my_expand(B, Binding, A). dojob(Binding, Support, Unextand...
by Victor NOEL
Wed May 28, 2008 3:04 pm
Forum: Help
Topic: Logtalk + JPL : Concurrent call to logtalk_load
Replies: 6
Views: 11035

Logtalk + JPL : Concurrent call to logtalk_load

Hello, As you may know, I am doing nasty things with logtalk, JPL (swi-prolog java library using java native interface) and agents running concurrently. With JPL, when doing prolog queries, if there are done in different threads, they are run in different engines (I guess it is a swi-prolog thing fo...
by Victor NOEL
Wed May 28, 2008 8:41 am
Forum: Porting Prolog applications
Topic: Gorgias port
Replies: 61
Views: 91272

Re: Gorgias port

I cannot reproduce the problem using a simple example of dynamic objects importing categories. An object is dynamic if it's either created using the built-in predicate create_object/4 or, when defined in a source file, when you use the directive dynamic/0. You can check the properties of any loaded...
by Victor NOEL
Tue May 27, 2008 4:03 pm
Forum: Porting Prolog applications
Topic: Gorgias port
Replies: 61
Views: 91272

Re: Gorgias port

So, I come for help to refactor gorgias :) Before doing this, I have a question : Is it normal that an object importing gorgias and declared as dynamic can't be abolished ? When I try to do it, I get an error telling me that the object is static ! I tried to look for the reason, like not dynamic pre...
by Victor NOEL
Tue May 27, 2008 3:31 pm
Forum: Help
Topic: Efficiently calling category's pred from extending category
Replies: 4
Views: 8404

Re: Efficiently calling category's pred from extending category

Ok, I will do that : )

Thanks you
by Victor NOEL
Tue May 27, 2008 1:13 pm
Forum: Help
Topic: Efficiently calling category's pred from extending category
Replies: 4
Views: 8404

Re: Efficiently calling category's pred from extending category

Note that the ::/1 control construct uses a caching mechanism for improved performance. However, the principal issue here is that the ::/1 control construct will take into account any predicate redefinition in the descendant objects while the :/1 control construct will ignore those redefinitions. S...
by Victor NOEL
Mon May 26, 2008 3:21 pm
Forum: Help
Topic: Efficiently calling category's pred from extending category
Replies: 4
Views: 8404

Efficiently calling category's pred from extending category

Hello, After the closing of the bug report #14 , a question came to my mind : I opened the enhancement report to be able to call efficiently category's predicates from an extending category. If I use the "::" operator to call a predicate declared in an extended category from another category, I have...
by Victor NOEL
Fri May 23, 2008 2:02 pm
Forum: Porting Prolog applications
Topic: Gorgias port
Replies: 61
Views: 91272

Re: Gorgias port

You could use two different rule predicates, say, default_rule/3, stored usually in classes, and rule/3, stored usually in instances. This would imply modifying the Gorgias code to duplicate clauses that currently use rule/3 to try first rule/3 and, on backtracking, to try default_rule/3 I almost d...
by Victor NOEL
Fri May 23, 2008 12:15 pm
Forum: Porting Prolog applications
Topic: Gorgias port
Replies: 61
Views: 91272

Re: Gorgias port

Ok, I understand.

Thanks you for all your answers :)
by Victor NOEL
Fri May 23, 2008 9:28 am
Forum: Porting Prolog applications
Topic: Gorgias port
Replies: 61
Views: 91272

Re: Gorgias port

Another question : When I use the inheritance tree described just before (gorgias as a category, imported by a class specializing logtalk, which class is instantiated by several objects). If I want my class to have a rule/3 defined in its body, to be used by gorgias when proving things from the inst...
by Victor NOEL
Fri May 23, 2008 8:04 am
Forum: Porting Prolog applications
Topic: Gorgias port
Replies: 61
Views: 91272

Re: Gorgias port

Paulo Moura wrote: You're correct. I'm able to reproduce the problem using a simple example. There is a bug when compiling a class that imports a category that extends other categories. The bug is fixed in the current development version (r4269). Thanks for the bug report.
All is working now :) Thanks you.
by Victor NOEL
Thu May 22, 2008 10:03 am
Forum: Porting Prolog applications
Topic: Gorgias port
Replies: 61
Views: 91272

Re: Gorgias port

Ok, I understand for the stored/1 predicate. But I think there is something strange with the call to the resolve predicate by the gorgias category, when it is called from a class that is instantiated ! If I reduce my example to : :- object(tharg, imports(gorgias), specializes(logtalk)). :- public([m...
by Victor NOEL
Thu May 22, 2008 8:07 am
Forum: Porting Prolog applications
Topic: Gorgias port
Replies: 61
Views: 91272

Re: Gorgias port

Hello, I am back again to logtalk and gorgias :) This time, it is more a logtalk problem, but using gorgias and since I am not sure gorgias is not at fault, I will ask here. My problem is that I want to be able to create several objects, each with its own database for a set of predicates plus a theo...
by Victor NOEL
Tue Apr 08, 2008 2:19 pm
Forum: Porting Prolog applications
Topic: Gorgias port
Replies: 61
Views: 91272

Re: Gorgias port

I added a ticket for it : http://trac.logtalk.org/ticket/6

Thanks for all you answer :)