This document gives a reference of the Jekejeke Prolog application
programming interface as provided by the runtime library.
- Programming Examples: We
show some examples of the use of the Jekejeke Prolog application
programming interface. We first show how we can call a
non-deterministic Prolog predicate from within a Java
application. We then go on to show on the other hand how we can
define a non-deterministic predicate inside Java that is
callable from Prolog. More...
- Interoperability Concepts:
The interoperability between the runtime Prolog and an
application is provided via a set of interface objects. The
objects hide the details of the runtime Prolog implementation.
The dominant objects are interpreter objects and term objects.
But we also find predicate and reference objects. More...
- Knowledgebase & Term API:
The knowledge base class provides a handle to clauses and
operator definitions. The term sub classes mirror the Prolog
data types. Primitive data types can be directly constructed via
the corresponding term constructors. The common base class for
the term sub classes is the class Term. Terms uniformly provide
comparison and printing. More...
- Call & Interpreter API:
The interpreter class is the working horse. On the knowledge
base side the interpreter supports initialization and the
definition of Java foreign predicates. On the term side the
interpreter supports parsing and un-parsing of terms. The
interpreter also supports variable and compound creation, as
well as unification. Finally the interpreter provides a set of
methods to invoke Prolog goals. The call-in class is used when
non-deterministically calling Prolog where as the call-out class
is used by non-deterministic Java foreign predicates. More...
- Headless API: The
runtime library provides a core set of predicates and executes
code without instrumentation. It is represented by a singleton.
- Appendix Example Listing: The
code of the Java classes and Prolog sources for the programming
examples is given. More...