This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/packages/jpl/README.html
2015-10-13 08:17:51 +01:00

153 lines
5.9 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="CONTENT-TYPE"
content="text/html; charset=windows-1252">
<title>JPL 3.0 documentation home page</title>
<meta name="GENERATOR" content="StarOffice 7 (Win32)">
<meta name="AUTHOR" content="Paul Singleton">
<meta name="CREATED" content="20040216;23081326">
<meta name="CHANGEDBY" content="Paul Singleton">
<meta name="CHANGED" content="20040216;23141923">
</head>
<body lang="en-US" dir="ltr">
<h1><span style="font-style: italic;">JPL 3.x</span> documentation home
page</h1>
<hr>
<h2>Introduction</h2>
<p><b style="font-style: italic;">JPL 3.x</b> is a dynamic,
bidirectional interface
between&nbsp;<i>SWI-Prolog 5.2.0</i> or later and&nbsp;<i>Java 2</i>
runtimes (see <a href="docs/objectives.html"><span
style="font-weight: bold;"><span style="font-style: italic;">JPL 3.x</span>
Objectives</span></a>).&nbsp; It offers two APIs: </p>
<ul>
<li>
<p style="margin-bottom: 0cm;"><span style="font-weight: bold;">Java
API</span><i> (Java-calls-Prolog)</i>: this
interface comprises public Java classes which support: </p>
<ul>
<li>
<p style="margin-bottom: 0cm;">constructing Java
representations of Prolog terms and queries </p>
</li>
<li>
<p style="margin-bottom: 0cm;">calling queries within&nbsp;<i>SWI-Prolog</i>
engines </p>
</li>
<li>
<p>retrieving (as Java representations of Prolog terms) any
bindings created by a call </p>
</li>
</ul>
</li>
</ul>
<ul>
<li>
<p style="margin-bottom: 0cm;"><span style="font-weight: bold;">Prolog
API</span><i> (Prolog-calls-Java)</i>: this
interface comprises Prolog library predicates which support: </p>
<ul>
<li>
<p style="margin-bottom: 0cm;">creating instances (objects) of
Java classes (built-in and user-defined) </p>
</li>
<li>
<p style="margin-bottom: 0cm;">calling methods of Java objects
(and static methods of classes), perhaps returning values or object
references </p>
</li>
<li>
<p>getting and setting the values of fields of Java objects and
classes </p>
</li>
</ul>
</li>
</ul>
<p style="margin-bottom: 0cm;">Calls to the two APIs can be nested,
e.g. Java code can call Prolog predicates which call Java methods
which call Prolog predicates etc. </p>
<hr>
<h2>Prerequisites</h2>
<p><b><i>JPL 3.x</i></b> currently requires&nbsp;<i>SWI-Prolog 5.2.0</i>
or later (it uses multi-threading FLI calls not available in older
versions).&nbsp; If you are using&nbsp;<i>SWI-Prolog 5.1.X</i>, then
you should probably upgrade to the latest stable&nbsp;<i>5.2.X</i>
release.&nbsp; Support for earlier versions may be added in the
future. </p>
<p><b><i>JPL&nbsp;3.x</i></b> currently requires a&nbsp;<i>Java 2</i>
runtime (or development kit), and has been tested with
Sun's&nbsp;<font face="monospace">jdk1.3.1_01</font>. </p>
<p><b><i>JPL&nbsp;3.x</i></b> contains a native library (<font
face="monospace">jpl.c</font>)
written in&nbsp;<i>ANSI/ISO C</i> and designed to be portable to many
operating system platforms for which suitable compilers are
available.&nbsp; It has, however, only been tested with&nbsp;<i>Microsoft
Visual C/C++ 5</i> under&nbsp;<i>Windows NT 4.0 (SP6a)</i>.&nbsp; I
shall be grateful if anyone can (show me how to) tidily adapt the
source and makefiles to build for other platforms. </p>
<hr>
<h2>Documentation</h2>
<p>This alpha release of <b><i>JPL&nbsp;3.x</i></b> contains a
hotch-potch of documentation, some left over from Fred Dushin's
(Java-calls-Prolog)<i> JPL 1.0.1</i> and now obsolete or misleading,
some rewritten for&nbsp;<i>JPL 2.0.2</i> and still mostly applicable,
and some written for the first release of my Prolog-calls-Java
interface, now part of&nbsp;<b><i>JPL</i></b>, and also mostly still
relevant.<br>
</p>
<p>In addition to this document (index.html in jpl's root folder) there
are:<br>
</p>
<ul>
<li><a href="docs/release_notes.html"><b>Release Notes</b></a><b>
for 3.0.3, 3.0.2, 3.0.0 and 2.0.2</b></li>
<li><a href="docs/installation.html"><b>Installation</b></a></li>
<li><b>Java API:<br>
</b></li>
<ul>
<li><a href="docs/java_api/javadoc/index.html"><b>Reference
(Javadoc)</b></a></li>
<li><a href="docs/java_api/high-level_interface.html"><span
style="font-weight: bold;">Overview</span></a></li>
<li><b><a href="docs/java_api/gotchas.html"><b>Gotchas</b></a></b></li>
<li><b><a href="docs/java_api/getting_started.html"><b>Getting
Started</b></a></b></li>
</ul>
<li><b><b>Prolog API:</b></b></li>
<ul>
<li><a href="docs/prolog_api/api.html"><span
style="font-weight: bold;">Reference</span></a></li>
<li><a href="docs/prolog_api/overview/index.html"><b>Overview</b></a></li>
<li><a href="docs/prolog_api/gotchas.html"><b>Gotchas</b></a></li>
</ul>
</ul>
<p> </p>
<hr>
<h2>Installation</h2>
<p>Put the three library files (<var>jpl.dll</var>, <var>jpl.jar</var>
and <var>jpl.pl</var>) where they can be found by your OS, by your
Java apps and by SWI-Prolog respectively; for details, see <a
href="docs/installation.html"><b><i>JPL
3.x</i> Installation</b></a>.</p>
<hr>
<h2>Testing</h2>
<p>Each of the folders within&nbsp;<font face="monospace">jpl\examples\java</font>
contains a simple&nbsp;<i>Java&nbsp;</i>application which tests some
aspect of&nbsp;<b><i>JPL</i></b>.&nbsp; These applications are
already compiled, and each folder contains a (<i>DOS/Windows</i>)
script&nbsp;<font face="monospace">run.bat</font> which announces and
runs the demo.<br>
&nbsp;<br>
Each of the Prolog source files within <span
style="font-family: monospace;">jpl/examples/prolog</span> contains a
self-contained Prolog application which exercises JPL from within
Prolog; start an interactive SWI-Prolog session as usual, and then
consult and run these files.<br>
</p>
<hr>
<address><a href="mailto:paul.singleton@bcs.org.uk">Paul Singleton</a></address>
<address>February 2004</address>
</body>
</html>