Subject: Re: [SWIPL] Calling more than one predicate + askings to Jan

From: Armando Stellato <[email-masked]>
Date: Thu, 27 Sep 2001 12:37:23 +0200

using differents send(@prolog,Predicate) (i generally use a timer to 
coordinate them but don't think is always necessary) in XPCE can 
generate multiple predicates that share the same beliefs.
I think this should answer your request.
Strictly speaking, i'd like to use many of the XPCE facilities (this 
one, or the broadcast library for example) if they could be embedded in 
the prolog engine.
My idea is that in the future we should be able to create windows, 
handle streams and do many other things in external languages and then 
use Prolog only as a reasoning module.
Jan, do you think next versions of Prolog will embed these facilities??
And, speaking about external languages and java in particular, now what 
can i do to embed prolog in it?
I've read the documentation for the java package jpl-1.0.1, but it seems 
is still at development level.

Regards

Armando

Jan Wielemaker wrote:

> On Tue, 07 Aug 2001, Nissim Broudo wrote:
> 
>>I've been using SWI-Prolog for a short amount of time and I completed one
>>small project in inductive logic programming using SWI.  I'm very impressed
>>with the package and its ease of use and extendibility with C.
>>
>>What's the feasibility of being able to call more than one predicate in
>>future versions of SWI-Prolog ?  I would like to have 2 open predicates
>>
>>qid1 = PL_open_query(NULL, PL_Q_NORMAL, my_predicate_1, term1);
>>qid2 = PL_open_query(NULL, PL_Q_NORMAL, my_predicate_2, term2);
>>
>>PL_next_solution(qid1);
>>PL_next_solution(qid2);
>>
>>PL_close_query(qid1);
>>PL_close_query(qid2);
>>
>>Nissim Broudo
>>
>>Department of Mathematics &
>>Department of Molecular Genetics and Microbiology
>>University of Florida
>>
> 
> Trying this results in undefined behaviour.  The system is prepared to
> have  multiple solving engines as used in the multi-threading version. 
> It wouldn't be hard to launch a second solving engine in the same
> thread, except many of the foreign function won't know what engine
> you're talking about (there is no argument to specify this).  The
> multi-threaded uses `thread-local data' to find out, but this is not
> an option for the single threaded version.
> 
> 	Regards --- Jan
> 
> 
> ----------------
> * To UNSUBSCRIBE, please use the HTML form at
> 
>     http://www.swi.psy.uva.nl/projects/SWI-Prolog/index.html#mailinglist
> 
> or send mail to [email-masked] using the Subject: "unsubscribe"
> (without the quotes) and *no* message body.
> 
> ** An ARCHIVE of this list is maintained at
> 
>     http://www.swi.psy.uva.nl/projects/SWI-Prolog/mailinglist/archive/
> 
> 
>