public interface IProlog
Modifier and Type | Method and Description |
---|---|
void |
addExceptionListener(ExceptionListener l)
Adds a listener to exception events
|
void |
addOutputListener(OutputListener l)
Adds a listener to ouput events
|
void |
addSpyListener(SpyListener l)
Adds a listener to spy events
|
void |
addTheory(Theory th)
Adds (appends) a theory
|
void |
clearTheory()
Clears current theory
|
java.lang.String[] |
getCurrentLibraries()
Gets the list of current libraries loaded
|
Library |
getLibrary(java.lang.String name)
Gets the reference to a loaded library
|
IOperatorManager |
getOperatorManager()
Gets the component managing operators
|
IPrimitiveManager |
getPrimitiveManager()
Gets the component managing primitives
|
Theory |
getTheory()
Gets current theory
|
boolean |
hasOpenAlternatives()
Asks for the presence of open alternatives to be explored
in current demostration process.
|
Library |
loadLibrary(java.lang.String className)
Loads a library.
|
void |
removeAllExceptionListeners()
Removes all exception event listeners
|
void |
removeAllOutputListeners()
Removes all output event listeners
|
void |
removeAllSpyListeners()
Removes all spy event listeners
|
void |
removeExceptionListener(ExceptionListener l)
Removes a listener to exception events
|
void |
removeOutputListener(OutputListener l)
Removes a listener to ouput events
|
void |
removeSpyListener(SpyListener l)
Removes a listener to spy events
|
void |
setSpy(boolean state)
Switches on/off the notification of spy information events
|
SolveInfo |
solve(java.lang.String st)
Solves a query
|
void |
solveEnd()
Accepts current solution
|
void |
solveHalt()
Halts current solve computation
|
SolveInfo |
solveNext()
Gets next solution
|
java.lang.String |
toString(Term term)
Gets the string representation of a term, using operators
currently defined by engine
|
void |
unloadLibrary(java.lang.String name)
Unloads a previously loaded library
|
IOperatorManager getOperatorManager()
IPrimitiveManager getPrimitiveManager()
Theory getTheory()
void addTheory(Theory th) throws java.lang.Exception
th
- is the theory to be addedInvalidTheoryException
- if the new theory is not validjava.lang.Exception
void clearTheory()
java.lang.String[] getCurrentLibraries()
Library getLibrary(java.lang.String name)
name
- the name of the library already loadedLibrary loadLibrary(java.lang.String className) throws java.lang.Exception
className
- name of the Java class containing the library to be loadedInvalidLibraryException
- if name is not a valid libraryjava.lang.Exception
void unloadLibrary(java.lang.String name) throws java.lang.Exception
name
- of the library to be unloadedInvalidLibraryException
- if name is not a valid loaded libraryjava.lang.Exception
SolveInfo solve(java.lang.String st) throws java.lang.Exception
st
- the string representing the goal to be demonstratedjava.lang.Exception
SolveInfo
SolveInfo solveNext() throws java.lang.Exception
NoMoreSolutionException
- if no more solutions are presentjava.lang.Exception
SolveInfo
void solveHalt()
void solveEnd()
boolean hasOpenAlternatives()
java.lang.String toString(Term term)
term
- the term to be represented as a stringvoid addOutputListener(OutputListener l)
l
- the listenervoid removeOutputListener(OutputListener l)
l
- the listenervoid removeAllOutputListeners()
void setSpy(boolean state)
state
- - true for enabling the notification of spy eventvoid addSpyListener(SpyListener l)
l
- the listenervoid removeSpyListener(SpyListener l)
l
- the listenervoid removeAllSpyListeners()
void addExceptionListener(ExceptionListener l)
l
- the listenervoid removeExceptionListener(ExceptionListener l)
l
- the listenervoid removeAllExceptionListeners()