public abstract class Library extends Object implements Serializable, IPrimitives
Each library can expose to engine:
Modifier and Type | Field and Description |
---|---|
protected Prolog |
engine
prolog core which loaded the library
|
Constructor and Description |
---|
Library() |
Modifier and Type | Method and Description |
---|---|
void |
dismiss()
method invoked by prolog engine when library is
going to be removed
|
protected Term |
evalExpression(Term term)
Evaluates an expression.
|
Prolog |
getEngine()
Gets the engine to which the library is bound
|
String |
getName()
Gets the name of the library.
|
List[] |
getPrimitives()
gets the list of predicates defined in the library
|
String[][] |
getSynonymMap()
Gets the synonym mapping, as array of
elements like { synonym, original name}
|
String |
getTheory()
Gets the theory provided with the library
Empty theory is provided by default.
|
protected boolean |
match(Term a0,
Term a1)
tries to unify two terms
The runtime (demonstration) context currently used by the engine
is deployed and altered.
|
void |
onSolveBegin(Term goal)
method invoked when the engine is going
to demonstrate a goal
|
void |
onSolveEnd()
method invoked when the engine has
finished a demostration
|
protected boolean |
unify(Term a0,
Term a1)
tries to unify two terms
The runtime (demonstration) context currently used by the engine
is deployed and altered.
|
protected Prolog engine
public String getName()
public String getTheory()
public String[][] getSynonymMap()
public Prolog getEngine()
protected boolean unify(Term a0, Term a1)
protected boolean match(Term a0, Term a1)
protected Term evalExpression(Term term)
public void dismiss()
public void onSolveBegin(Term goal)
public void onSolveEnd()
public List[] getPrimitives()
getPrimitives
in interface IPrimitives
Copyright © 2015. All rights reserved.