forked from SWI-Prolog/packages-jpl
-
Notifications
You must be signed in to change notification settings - Fork 0
dmpotter44/packages-jpl
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
<!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 <i>SWI-Prolog 5.2.0</i> or later and <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>). 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 <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 <i>SWI-Prolog 5.2.0</i> or later (it uses multi-threading FLI calls not available in older versions). If you are using <i>SWI-Prolog 5.1.X</i>, then you should probably upgrade to the latest stable <i>5.2.X</i> release. Support for earlier versions may be added in the future. </p> <p><b><i>JPL 3.x</i></b> currently requires a <i>Java 2</i> runtime (or development kit), and has been tested with Sun's <font face="monospace">jdk1.3.1_01</font>. </p> <p><b><i>JPL 3.x</i></b> contains a native library (<font face="monospace">jpl.c</font>) written in <i>ANSI/ISO C</i> and designed to be portable to many operating system platforms for which suitable compilers are available. It has, however, only been tested with <i>Microsoft Visual C/C++ 5</i> under <i>Windows NT 4.0 (SP6a)</i>. 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 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 <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 <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 <font face="monospace">jpl\examples\java</font> contains a simple <i>Java </i>application which tests some aspect of <b><i>JPL</i></b>. These applications are already compiled, and each folder contains a (<i>DOS/Windows</i>) script <font face="monospace">run.bat</font> which announces and runs the demo.<br> <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:[email protected]">Paul Singleton</a></address> <address>February 2004</address> </body> </html>
About
JPL: The Prolog <-> Java interface
Resources
Stars
Watchers
Forks
Packages 0
No packages published
Languages
- Java 41.2%
- Prolog 28.9%
- C 24.1%
- M4 2.4%
- Makefile 2.2%
- Shell 1.0%
- Other 0.2%