Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

A few JPL (Java <-> Prolog interface) questions
1) Is it possible to shut down and restart the JPL engine (in order to
clear the database) without closing the application which is currently
using it? I've tried without success JPL.halt()...

2) Is it possible to catch the Prolog output produced by JPL and pass
it to the application (in order to create, for instance, a log window)
?

Thanks in advance!

Report this thread to moderator Post Follow-up to this message
Old Post
Eddie Jobson
04-16-05 01:57 PM


Re: A few JPL (Java <-> Prolog interface) questions
On 2005-04-16, Eddie Jobson <mirrormaze@inwind.it> wrote:
> 1) Is it possible to shut down and restart the JPL engine (in order to
> clear the database) without closing the application which is currently
> using it? I've tried without success JPL.halt()...

The C-interface defines PL_cleanup(). It is generally slow and
cooperation with many (foreign) library is incomplete. For JPL it would
also destroy the JPL interface :-)  Why not simply use retractall/1 to
delete data you no longer want?

> 2) Is it possible to catch the Prolog output produced by JPL and pass
> it to the application (in order to create, for instance, a log window)

Not through JPL as far as I know. SWI-Prolog streams can be associated
to arbitrary objects, which is used by XPCE to bind them to various
objects that handle text.  To get this in JPL, I guess JPL has to be
extended to deal with SWI-Prolog streams.

Alternatively, use the print_message/2 for printing messages (all Prolog
messages are printed this way) and define message_hook/3 to redirect them
to a window.

Cheers --- Jan

Report this thread to moderator Post Follow-up to this message
Old Post
Jan Wielemaker
04-16-05 08:58 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Prolog archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 07:18 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.