From ok@hermes.otago.ac.nz  Mon Jan 24 02:34:46 2000
Received: from hermes.otago.ac.nz (hermes.otago.ac.nz [139.80.32.49])
	by swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id CAA19244;
	Mon, 24 Jan 2000 02:34:43 +0100 (MET)
Received: (from ok@localhost)
	by hermes.otago.ac.nz (8.9.3/8.9.3) id OAA22910;
	Mon, 24 Jan 2000 14:34:05 +1300 (NZDT)
Date: Mon, 24 Jan 2000 14:34:05 +1300 (NZDT)
From: "Richard A. O'Keefe" <ok@hermes.otago.ac.nz>
Message-Id: <200001240134.OAA22910@hermes.otago.ac.nz>
To: fadushin@syr.edu, ovidiu@cup.hp.com
Subject: Re: problem with JPL 1.0.1 and SWI Prolog 3.3.0
Cc: jan@swi.psy.uva.nl, prolog@swi.psy.uva.nl

	Does anyone know even if this sort of thing has been done elsewhere?
	
where "this sort of thing" = Prolog calling Java.

Xerox Quintus Prolog allowed Lisp to call Prolog and Prolog to call Lisp.
There were two special cases:
    Lisp NIL and cons cells turned into Prolog [] and .(_,_) and vice versa.
    Certain other Lisp data turned into Prolog compounds and vice versa.
Otherwise, any Lisp datum (such as an array or a window) could be passed to
Prolog and passed back as the same (EQ) object.

The Poplog system mixed Pop, Lisp, Prolog, and later ML.  An important
aspect from the beginning was that any of (Lisp, Pop, Prolog) could call
any of (Lisp, Pop, Prolog).  It wasn't _entirely_ seamless, but it came
close.

I would certainly expect a Prolog system that was tied in with Java to be
able to accept any Java object (other than the ones especially designated
for conversion to Prolog format) and send it back, and in particular to
be able to construct any method invocation that Java can construct via
reflection.

The obvious application of this is adapting Java's CORBA interface to
Prolog, so that any service Java can access via dynamic CORBA can also
be accessed by Prolog.

