From starred@tiscalinet.it Thu Sep 27 12:37:17 2001
Received: from mailrelay3.inwind.it (mailrelay3.inwind.it [212.141.54.103])
	by swi.psy.uva.nl (8.11.2/8.11.2) with ESMTP id f8RAbGv10783;
	Thu, 27 Sep 2001 12:37:16 +0200 (MET DST)
Received: from tiscalinet.it (62.98.228.6) by mailrelay3.inwind.it (5.5.029)
        id 3BB2E4AA0000C746; Thu, 27 Sep 2001 12:37:02 +0200
X-Mozilla-Status: 0801
Message-ID: <3BB30163.4050506@tiscalinet.it>
Date: Thu, 27 Sep 2001 12:37:23 +0200
From: Armando Stellato <starred@tiscalinet.it>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.2) Gecko/20010726 Netscape6/6.1
X-Accept-Language: en-us
MIME-Version: 1.0
To: Jan Wielemaker <jan@swi.psy.uva.nl>
CC: Nissim Broudo <nissim@math.ufl.edu>, prolog@swi.psy.uva.nl
Subject: Re: [SWIPL] Calling more than one predicate + askings to Jan
References: <200108070053.MAA507668@atlas.otago.ac.nz> <002101c11f43$0ebe31a0$8453e30a@computer> <01092710131305.25592@gollem>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

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 prolog-request@swi.psy.uva.nl 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/
> 
> 
> 



