| |
com.xsb.interprolog
Class AbstractNativeEngine
java.lang.Object
com.declarativa.interprolog.AbstractPrologEngine
com.xsb.interprolog.AbstractNativeEngine
- All Implemented Interfaces:
- PrologEngine
- Direct Known Subclasses:
- NativeEngine
- public abstract class AbstractNativeEngine
- extends AbstractPrologEngine
A 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
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, realCommand, registerJavaObject, setDebug, setThreadedCallbacks, shortClassName, shutdown, teachMoreObjects, teachMoreObjects, teachMoreObjects, teachOneObject, unescapedFilePath, unregisterJavaObject, unregisterJavaObject, unregisterJavaObjects, waitUntilAvailable, waitUntilIdle |
AbstractNativeEngine
public AbstractNativeEngine(String XSB_BIN_DIR,
boolean debug,
boolean loadFromJar)
deterministicGoal
public Object[] deterministicGoal(String G,
String OVar,
Object[] objectsP,
String RVars)
- Description copied from class:
AbstractPrologEngine
- Synchronously calls a Prolog goal.
Only the first solution is considered. G should contain a syntactically correct
Prolog term, without the trailing dot (.). Throws an IPAbortedException if a Prolog abort happens, and an
IPInterruptedException if the interrupt() method was invoked.
- Specified by:
deterministicGoal in interface PrologEngine - Overrides:
deterministicGoal in class AbstractPrologEngine
- Parameters:
G - Prolog goal termOVar - Prolog variable that will be bound to objectsP arrayobjectsP - Array of Java objects to pass to Prolog goalRVars - Prolog list with object specifications, typically containing variables occurring in g.
If null a single binding will be returned, containing a TermModel object representing the goal term solution
- Returns:
- a new array containing an object for each term in the rVars list, or null if goal fails
- See Also:
AbstractPrologEngine.deterministicGoal(String) ,
AbstractPrologEngine.deterministicGoal(String,String) ,
AbstractPrologEngine.deterministicGoal(String,String,Object[])
|