jpl::fli::Prolog Class Reference
List of all members.
Static Public Member Functions |
static native int | action_abort () |
static native String | atom_chars (atom_t a) |
static native int | attach_engine (engine_t e) |
static native engine_t | attach_pool_engine () |
static native void | close_query (qid_t qid) |
static native int | compare (term_t t1, term_t t2) |
static native void | cons_functor_v (term_t h, functor_t fd, term_t a0) |
static native term_t | copy_term_ref (term_t from) |
static native engine_t | current_engine () |
static native boolean | current_engine_is_pool () |
static native void | discard_foreign_frame (fid_t cid) |
static native term_t | exception (qid_t qid) |
static native String[] | get_actual_init_args () |
static native boolean | get_arg (int index, term_t t, term_t a) |
static native boolean | get_atom_chars (term_t t, StringHolder a) |
static native String | get_c_lib_version () |
static native String[] | get_default_init_args () |
static native boolean | get_float (term_t t, DoubleHolder d) |
static native boolean | get_integer (term_t t, Int64Holder i) |
static native boolean | get_name_arity (term_t t, StringHolder name, IntHolder arity) |
static native boolean | get_string_chars (term_t t, StringHolder s) |
static native void | halt (int status) |
static native boolean | initialise () |
static native boolean | is_tag (String tag) |
static native atom_t | new_atom (String s) |
static native functor_t | new_functor (atom_t f, int a) |
static native module_t | new_module (atom_t name) |
static native term_t | new_term_ref () |
static native term_t | new_term_refs (int n) |
static native boolean | next_solution (qid_t qid) |
static native String | object_to_tag (Object obj) |
static native fid_t | open_foreign_frame () |
static native qid_t | open_query (module_t m, int flags, predicate_t pred, term_t t0) |
static native predicate_t | predicate (String name, int arity, String module) |
static native void | put_float (term_t t, double f) |
static native void | put_integer (term_t t, long i) |
static native void | put_jref (term_t t, Object ref) |
static native void | put_term (term_t t1, term_t t2) |
static native void | put_variable (term_t t) |
static native int | release_pool_engine () |
static native boolean | set_default_init_args (String argv[]) |
static native Object | tag_to_object (String tag) |
static native int | term_type (term_t t) |
static native int | thread_self () |
static native void | unregister_atom (atom_t a) |
Static Public Attributes |
static final int | ATOM = 2 |
static final int | BUF_DISCARDABLE = 0x0000 |
static final int | BUF_MALLOC = 0x0200 |
static final int | BUF_RING = 0x0100 |
static final int | COMPOUND = 6 |
static final int | CVT_ALL = 0x00ff |
static final int | CVT_ATOM = 0x0001 |
static final int | CVT_ATOMIC = (CVT_NUMBER | CVT_ATOM | CVT_STRING) |
static final int | CVT_FLOAT = 0x0010 |
static final int | CVT_INTEGER = 0x0008 |
static final int | CVT_LIST = 0x0004 |
static final int | CVT_NUMBER = (CVT_INTEGER | CVT_FLOAT) |
static final int | CVT_STRING = 0x0002 |
static final int | CVT_VARIABLE = 0x0020 |
static final int | fail = 0 |
static final int | FLOAT = 4 |
static final int | INTEGER = 3 |
static final int | JBOOLEAN = 101 |
static final int | JREF = 102 |
static final int | JVOID = 103 |
static final int | Q_CATCH_EXCEPTION = 0x08 |
static final int | Q_NODEBUG = 0x04 |
static final int | Q_NORMAL = 0x02 |
static final int | Q_PASS_EXCEPTION = 0x10 |
static final int | STRING = 5 |
static final int | succeed = 1 |
static final int | TERM = 6 |
static final int | VARIABLE = 1 |
Static Package Functions |
| [static initializer] |
Detailed Description
This class consists only of constants (static finals) and static native methods. The constants and methods defined herein are in (almost) strict 1-1 correspondence with the functions in the Prolog FLI by the same name (except without the PL_, SQ_, etc. prefixes).
See the file jpl.c for the native (ANSI C) implementations of these methods. Refer to your local Prolog FLI documentations for the meanings of these methods, and observe the following:
<menu> The types and signatures of the following methods are almost in 1-1 correspondence with the Prolog FLI. The Prolog types term_t, atom_t, functor_t, etc. are mirrored in this package with classes by the same name, making the C and Java uses of these interfaces similar. As term_t, functor_t, etc. types are Java classes, they are passed to these methods by value; however, calling these methods on such class instances does have side effects. In general, the value fields of these instances will be modified, in much the same way the term_t, functor_t, etc. Prolog instances would be modified. The exceptions to this rule occur when maintaining the same signature would be impossible, e.g., when the Prolog FLI functions require pointers; in this case, the signatures have been modified to take *Holder classes (Int, Double, String, etc.), to indicate a call by reference parameter. Functions which take variable-length argument lists in C take arrays in Java; from Java 1.1 onwards, anonymous arrays can be used e.g. Term[] { new Atom("a"), new Atom ("b") } </menu>
Copyright (C) 1998 Fred Dushin
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library Public License for more details.
- Author:
- Fred Dushin <fadushin@syr.edu>
- Version:
- $Revision$
Definition at line 82 of file Prolog.java.
Member Function Documentation
jpl::fli::Prolog::[static initializer] |
( |
|
) |
[inline, static, package] |
static native int jpl::fli::Prolog::action_abort |
( |
|
) |
[static] |
static native String jpl::fli::Prolog::atom_chars |
( |
atom_t |
a |
) |
[static] |
static native int jpl::fli::Prolog::attach_engine |
( |
engine_t |
e |
) |
[static] |
static native engine_t jpl::fli::Prolog::attach_pool_engine |
( |
|
) |
[static] |
static native void jpl::fli::Prolog::close_query |
( |
qid_t |
qid |
) |
[static] |
static native int jpl::fli::Prolog::compare |
( |
term_t |
t1, |
|
|
term_t |
t2 | |
|
) |
| | [static] |
static native term_t jpl::fli::Prolog::copy_term_ref |
( |
term_t |
from |
) |
[static] |
static native engine_t jpl::fli::Prolog::current_engine |
( |
|
) |
[static] |
static native boolean jpl::fli::Prolog::current_engine_is_pool |
( |
|
) |
[static] |
static native void jpl::fli::Prolog::discard_foreign_frame |
( |
fid_t |
cid |
) |
[static] |
static native term_t jpl::fli::Prolog::exception |
( |
qid_t |
qid |
) |
[static] |
static native String [] jpl::fli::Prolog::get_actual_init_args |
( |
|
) |
[static] |
static native boolean jpl::fli::Prolog::get_arg |
( |
int |
index, |
|
|
term_t |
t, |
|
|
term_t |
a | |
|
) |
| | [static] |
static native boolean jpl::fli::Prolog::get_atom_chars |
( |
term_t |
t, |
|
|
StringHolder |
a | |
|
) |
| | [static] |
static native String jpl::fli::Prolog::get_c_lib_version |
( |
|
) |
[static] |
static native String [] jpl::fli::Prolog::get_default_init_args |
( |
|
) |
[static] |
static native boolean jpl::fli::Prolog::get_integer |
( |
term_t |
t, |
|
|
Int64Holder |
i | |
|
) |
| | [static] |
static native boolean jpl::fli::Prolog::get_string_chars |
( |
term_t |
t, |
|
|
StringHolder |
s | |
|
) |
| | [static] |
static native void jpl::fli::Prolog::halt |
( |
int |
status |
) |
[static] |
static native boolean jpl::fli::Prolog::initialise |
( |
|
) |
[static] |
static native boolean jpl::fli::Prolog::is_tag |
( |
String |
tag |
) |
[static] |
static native atom_t jpl::fli::Prolog::new_atom |
( |
String |
s |
) |
[static] |
static native functor_t jpl::fli::Prolog::new_functor |
( |
atom_t |
f, |
|
|
int |
a | |
|
) |
| | [static] |
static native module_t jpl::fli::Prolog::new_module |
( |
atom_t |
name |
) |
[static] |
static native term_t jpl::fli::Prolog::new_term_ref |
( |
|
) |
[static] |
static native term_t jpl::fli::Prolog::new_term_refs |
( |
int |
n |
) |
[static] |
static native boolean jpl::fli::Prolog::next_solution |
( |
qid_t |
qid |
) |
[static] |
static native String jpl::fli::Prolog::object_to_tag |
( |
Object |
obj |
) |
[static] |
static native fid_t jpl::fli::Prolog::open_foreign_frame |
( |
|
) |
[static] |
static native predicate_t jpl::fli::Prolog::predicate |
( |
String |
name, |
|
|
int |
arity, |
|
|
String |
module | |
|
) |
| | [static] |
static native void jpl::fli::Prolog::put_float |
( |
term_t |
t, |
|
|
double |
f | |
|
) |
| | [static] |
static native void jpl::fli::Prolog::put_integer |
( |
term_t |
t, |
|
|
long |
i | |
|
) |
| | [static] |
static native void jpl::fli::Prolog::put_jref |
( |
term_t |
t, |
|
|
Object |
ref | |
|
) |
| | [static] |
static native void jpl::fli::Prolog::put_term |
( |
term_t |
t1, |
|
|
term_t |
t2 | |
|
) |
| | [static] |
static native void jpl::fli::Prolog::put_variable |
( |
term_t |
t |
) |
[static] |
static native int jpl::fli::Prolog::release_pool_engine |
( |
|
) |
[static] |
static native boolean jpl::fli::Prolog::set_default_init_args |
( |
String |
argv[] |
) |
[static] |
static native Object jpl::fli::Prolog::tag_to_object |
( |
String |
tag |
) |
[static] |
static native int jpl::fli::Prolog::term_type |
( |
term_t |
t |
) |
[static] |
static native int jpl::fli::Prolog::thread_self |
( |
|
) |
[static] |
static native void jpl::fli::Prolog::unregister_atom |
( |
atom_t |
a |
) |
[static] |
Member Data Documentation
The documentation for this class was generated from the following file: