public class LPSEngine extends XSBSubprocessEngine
Modifier and Type | Class and Description |
---|---|
static interface |
LPSEngine.CycleHandler |
SubprocessEngine.OutputDumper
ctrl_c, ctrlc
firstJavaMessageName, interPrologFileLoaded, nl, prologBinDirectoryOrCommand
MAX_INT_VALUE, MIN_INT_VALUE, version
Constructor and Description |
---|
LPSEngine(String[] prologCommands,
boolean outAndErrMerged,
boolean debug,
boolean loadFromJar,
String LPSdir) |
LPSEngine(String prologCommand,
String LPSdir) |
Modifier and Type | Method and Description |
---|---|
String |
cycleHook(int T,
TermModel[] fluents,
TermModel[] actions) |
boolean |
go(String f,
String fluents,
String actions) |
boolean |
go(String f,
String fluents,
String actions,
String moreOptions) |
boolean |
go(String f,
String fluents,
String actions,
String moreOptions,
String evenMoreOptions)
Load, execute a LPS file
|
static void |
main(String[] args)
Execute the dining philosophers example
|
void |
setCycleHandler(LPSEngine.CycleHandler H) |
abortEngine, addPrologOutputListener, addPrologStderrListener, addPrologStdoutListener, breakEngine, deterministicGoal, getCharset, isAvailable, isDetectErrorMessages, printPrologOutputToConsole, printPrologOutputToFile, realCommand, removePrologOutputListener, removePrologStderrListener, removePrologStdoutListener, resumeEngine, sendAndFlush, sendAndFlushLn, setCharset, setDebug, setDetectErrorMessages, setEngineStarted, setSlowWindowsShutdown, shutdown, waitUntilAvailable
abortTasks, add_lib_dir, addPrologEngineListener, addSoftwareLibrary, addSoftwareLibrary, assignableType, command, command, command, consultAbsolute, consultAbsolute, consultFromPackage, consultFromPackage, consultRelative, createTempDirectory, currentTimeSecs, deleteAll, deleteTempFiles, deterministicGoal, deterministicGoal, deterministicGoal, deterministicGoal, deterministicGoalJSON, doCallback, endAllTasks, exec, executingOnJavaSide, findConstructor, findMethod, firstJavaMessage, getImplementationPeer, getInterprologPath, getJarDirectory, getJarDirectory, getLoadFromJar, getPrologBaseDirectory, getPrologNumericVersion, getPrologVersion, getRealJavaObject, getRealJavaObject, getRealJavaObject, getThePrologListener, goal, goal, handleCallback, hasPrologExtension, inPrologShell, interrupt, interruptTasks, is64WindowsOS, isAllowSimultaneousThreads, isDebug, isIdle, isLinuxOS, isMacOS, isPaused, isProfiling, isSerializable, isShutingDown, isThreadedCallbacks, isWindowsOS, lastSolutionUndefined, load_dynAbsolute, load_dynRelative, loop, loop2, makeInvisible, printAllStackTraces, printAllStackTraces, printBindings, printStackTrace, profilingMessage, progressMessage, progressMessage, prologBinToBaseDirectory, prologCanWork, prologEnteredBreak, prologResumedComputation, prologReturnedToTopLevel, registerJavaObject, removePrologEngineListener, serverFileSeparatorChar, serverIsWindows, setAllowSimultaneousThreads, setProfiling, setThreadedCallbacks, setTimedCallIntervall, shortClassName, stop, teachMoreObjects, teachMoreObjects, teachMoreObjects, teachOneObject, toString, unescapedFilePath, unregisterJavaObject, unregisterJavaObject, unregisterJavaObjects, waitUntilIdle
public LPSEngine(String[] prologCommands, boolean outAndErrMerged, boolean debug, boolean loadFromJar, String LPSdir)
prologCommands
- outAndErrMerged
- debug
- loadFromJar
- This does NOT affect the LPS files, which are never loaded from the jarLPSdir
- public boolean go(String f, String fluents, String actions, String moreOptions, String evenMoreOptions)
f
- .lpsw or .lpsp file; other file extensions are assumed to denote .lpsw (Wei syntax) filesfluents
- templates of fluent instances to inspect/receive at each cycle; must be a well-formed Prolog list, e.g. "[myfluent(1,_)]"actions
- ditto for (basic) actionsmoreOptions
- Prolog list with additional options for the LPS go(...) predicateevenMoreOptions
- Optional; appended to the previouspublic void setCycleHandler(LPSEngine.CycleHandler H)
public static void main(String[] args)