Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.xsb.interprolog
Class NativeEngine

    java.lang.Object
      com.declarativa.interprolog.AbstractPrologEngine
          com.xsb.interprolog.AbstractNativeEngine
              com.xsb.interprolog.NativeEngine

All Implemented Interfaces:
  PrologEngine

public class NativeEngine
extends AbstractNativeEngine

A XSB PrologEngine implemented using the Java Native Interface. This class depends on interprolog_callback.c and other files, that are included in the emu directory of XSB Prolog 2.5 and later

Field Summary

Fields inherited from class com.declarativa.interprolog.AbstractPrologEngine
`firstJavaMessageName, interrupting, nl, prologBinDirectoryOrCommand`

Fields inherited from interface com.declarativa.interprolog.PrologEngine
`MAX_INT_VALUE, MIN_INT_VALUE, version`

Constructor Summary
`NativeEngine()`
`NativeEngine(String XSB_BIN_DIR)`
`NativeEngine(String XSB_BIN_DIR, boolean debug)`
`NativeEngine(String XSB_BIN_DIR, boolean debug, boolean loadFromJar)`
`NativeEngine(String XSB_BIN_DIR, String[] XSB_ARGS, boolean debug, boolean loadFromJar)` The XSB dll must be in a directory mentioned in the java.library.path property (e.g., Windows PATH) so the Java loader finds it.

Method Summary
`boolean` | `realCommand(String s)` Implementation of a simple parameterless Prolog goal; does not support recursive nor multithreaded operation, use command instead
`void` | `setDebug(boolean d)` Show (or hide) debug messages, both Java and Prolog side, cf. ipIsDebugging/0.
`void` | `shutdown()` Release Prolog engine resources, making it unusable

Methods inherited from class com.xsb.interprolog.AbstractNativeEngine
`deterministicGoal`

Methods inherited from class com.declarativa.interprolog.AbstractPrologEngine
`abortTasks, assignableType, command, consultAbsolute, consultFromPackage, consultRelative, deterministicGoal, deterministicGoal, deterministicGoal, deterministicGoal, doCallback, endAllTasks, findConstructor, findMethod, firstJavaMessage, getImplementationPeer, getJarDirectory, getJarDirectory, getLoadFromJar, getPrologBaseDirectory, getPrologNumericVersion, getPrologVersion, getRealJavaObject, getRealJavaObject, getRealJavaObject, handleCallback, interrupt, interruptTasks, isAvailable, isDebug, isIdle, isMacOS, isShutingDown, isWindowsOS, load_dynRelative, makeInvisible, printBindings, progressMessage, prologBinToBaseDirectory, registerJavaObject, setThreadedCallbacks, shortClassName, teachMoreObjects, teachMoreObjects, teachMoreObjects, teachOneObject, unescapedFilePath, unregisterJavaObject, unregisterJavaObject, unregisterJavaObjects, waitUntilAvailable, waitUntilIdle`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### NativeEngine

    public NativeEngine()

### NativeEngine

    public NativeEngine(String XSB_BIN_DIR)

### NativeEngine

    public NativeEngine(String XSB_BIN_DIR,
                        boolean debug)

### NativeEngine

    public NativeEngine(String XSB_BIN_DIR,
                        boolean debug,
                        boolean loadFromJar)

### NativeEngine

    public NativeEngine(String XSB_BIN_DIR,
                        String[] XSB_ARGS,
                        boolean debug,
                        boolean loadFromJar)

  The XSB dll must be in a directory mentioned in the java.library.path property (e.g., Windows PATH) so the Java loader finds it. You can set this up on launching java using the command line option -Djava.library.path=...

Parameters:
  `XSB_BIN_DIR` - File path to directory containing the Prolog binary
  `XSB_ARGS` - Args for finer control initializing XSB
  `debug` - if true, print progress messages to aid debugging
  `loadFromJar` - if true, load Prolog initialization files from this classe's jar, else from a relative file directory

Method Detail

### setDebug

    public void setDebug(boolean d)

  Description copied from class: `AbstractPrologEngine`
  Show (or hide) debug messages, both Java and Prolog side, cf. ipIsDebugging/0. Beware that this may try to assert/retract a flag (ipIsDebugging/0) on the Prolog side, be sure to invoke this method sooner rather than later as it may get "stuck" if there are problems communicating with the Prolog engine

  Specified by:
    `setDebug` in interface `PrologEngine`
  Overrides:
    `setDebug` in class `AbstractPrologEngine`

### shutdown

    public void shutdown()

  Description copied from class: `AbstractPrologEngine`
  Release Prolog engine resources, making it unusable

  Specified by:
    `shutdown` in interface `PrologEngine`
  Overrides:
    `shutdown` in class `AbstractPrologEngine`

### realCommand

    public boolean realCommand(String s)

  Description copied from class: `AbstractPrologEngine`
  Implementation of a simple parameterless Prolog goal; does not support recursive nor multithreaded operation, use command instead

  Specified by:
    `realCommand` in class `AbstractPrologEngine`
  See Also:
    `AbstractPrologEngine.command(String)`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD