public abstract class AbstractPrologEngine extends Object implements PrologEngine
Modifier and Type | Field and Description |
---|---|
static String |
ALL_RESULTS_VAR |
Constructor and Description |
---|
AbstractPrologEngine() |
Modifier and Type | Method and Description |
---|---|
boolean |
abolish(Term term) |
boolean |
allSucceed(List<? extends Term> terms) |
LogtalkEngine |
asLogtalkEngine() |
boolean |
asserta(List<? extends Term> terms)
Assert a list of clauses in the logic database.
|
boolean |
asserta(Term term)
Assert a clause in the logic database.
|
boolean |
assertz(List<? extends Term> terms)
Assert a list of clauses in the logic database.
|
boolean |
assertz(Term term)
Assert a clause in the logic database.
|
Term |
asTerm(String termString) |
List<Term> |
asTerms(List<String> termsString) |
List<Term> |
asTerms(List<String> termsString,
Jpc context) |
Term |
bagof(Term select,
Term exp) |
Query |
bagof(Term select,
Term exp,
Term all) |
boolean |
cd(String path) |
boolean |
cd(Term path) |
Query |
clause(Term head,
Term body) |
abstract void |
close()
Close the logic engine and free associated resources.
|
boolean |
command(String command) |
boolean |
command(String command,
Jpc context) |
boolean |
command(String command,
List<?> arguments) |
boolean |
command(String command,
List<?> arguments,
Jpc context) |
Query |
currentOp(Term priority,
Term specifier,
Term operator) |
String |
currentPrologFlag(Flag flag) |
Query |
currentPrologFlag(Flag flag,
String flagValue) |
Query |
currentPrologFlag(Term flag,
Term flagValue) |
boolean |
ensureLoaded(List<? extends Term> terms) |
boolean |
ensureLoaded(String... resources) |
boolean |
ensureLoaded(Term... terms) |
Term |
findall(Term select,
Term exp) |
Query |
findall(Term select,
Term exp,
Term all) |
boolean |
flushOutput() |
Query |
forall(Term generator,
Term test) |
OperatorsContext |
getOperatorsContext() |
boolean |
isBinaryOperator(String op) |
boolean |
isUnaryOperator(String op) |
void |
loadJpc() |
void |
loadJpcForLogtalk() |
protected void |
loadLogtalkFiles() |
protected void |
loadPrologFiles() |
String |
prologDialect() |
Query |
query(String goalString) |
Query |
query(String goalString,
Jpc context) |
Query |
query(String goalString,
List<?> arguments) |
Query |
query(String goalString,
List<?> arguments,
boolean errorHandledQuery,
Jpc context) |
Query |
query(String goalString,
List<?> arguments,
Jpc context) |
Query |
query(Term goal) |
Query |
query(Term goal,
Jpc context) |
Query |
query(Term goal,
List<?> arguments,
boolean errorHandledQuery,
Jpc context) |
Query |
retract(Term term) |
boolean |
retractAll(Term term) |
Term |
setof(Term select,
Term exp) |
Query |
setof(Term select,
Term exp,
Term all) |
boolean |
setPrologFlag(Flag flag,
String flagValue) |
boolean |
setPrologFlag(Term flag,
Term flagValue) |
Term |
unify(List<? extends Term> terms) |
Term |
unify(Term... terms) |
LogtalkEngine |
withLogtalk() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
asTerm, basicQuery, isCloseable, threadModel
public static final String ALL_RESULTS_VAR
public abstract void close()
PrologEngine
close
in interface PrologEngine
public boolean command(String command)
command
in interface PrologEngine
public boolean command(String command, List<?> arguments)
command
in interface PrologEngine
public boolean command(String command, Jpc context)
command
in interface PrologEngine
public boolean command(String command, List<?> arguments, Jpc context)
command
in interface PrologEngine
public final Query query(String goalString)
query
in interface PrologEngine
public final Query query(String goalString, List<?> arguments)
query
in interface PrologEngine
public final Query query(String goalString, Jpc context)
query
in interface PrologEngine
public final Query query(String goalString, List<?> arguments, Jpc context)
query
in interface PrologEngine
public Query query(String goalString, List<?> arguments, boolean errorHandledQuery, Jpc context)
query
in interface PrologEngine
public final Query query(Term goal)
query
in interface PrologEngine
public final Query query(Term goal, Jpc context)
query
in interface PrologEngine
public Query query(Term goal, List<?> arguments, boolean errorHandledQuery, Jpc context)
query
in interface PrologEngine
public Term asTerm(String termString)
asTerm
in interface PrologEngine
public List<Term> asTerms(List<String> termsString)
asTerms
in interface PrologEngine
public List<Term> asTerms(List<String> termsString, Jpc context)
asTerms
in interface PrologEngine
public boolean setPrologFlag(Term flag, Term flagValue)
setPrologFlag
in interface PrologEngine
public boolean setPrologFlag(Flag flag, String flagValue)
setPrologFlag
in interface PrologEngine
public Query currentPrologFlag(Term flag, Term flagValue)
currentPrologFlag
in interface PrologEngine
public Query currentPrologFlag(Flag flag, String flagValue)
currentPrologFlag
in interface PrologEngine
public String currentPrologFlag(Flag flag)
currentPrologFlag
in interface PrologEngine
public String prologDialect()
prologDialect
in interface PrologEngine
public OperatorsContext getOperatorsContext()
getOperatorsContext
in interface PrologEngine
public Query currentOp(Term priority, Term specifier, Term operator)
currentOp
in interface PrologEngine
public boolean isBinaryOperator(String op)
isBinaryOperator
in interface PrologEngine
public boolean isUnaryOperator(String op)
isUnaryOperator
in interface PrologEngine
public boolean cd(Term path)
cd
in interface PrologEngine
public boolean cd(String path)
cd
in interface PrologEngine
public boolean asserta(Term term)
asserta
in interface PrologDatabase
asserta
in interface PrologEngine
terms
- the terms to assertpublic boolean assertz(Term term)
assertz
in interface PrologDatabase
assertz
in interface PrologEngine
terms
- the terms to assertpublic Query retract(Term term)
retract
in interface PrologDatabase
retract
in interface PrologEngine
public boolean retractAll(Term term)
retractAll
in interface PrologDatabase
retractAll
in interface PrologEngine
public boolean abolish(Term term)
abolish
in interface PrologDatabase
abolish
in interface PrologEngine
public Query clause(Term head, Term body)
clause
in interface PrologDatabase
clause
in interface PrologEngine
public boolean asserta(List<? extends Term> terms)
asserta
in interface PrologEngine
terms
- the terms to assertpublic boolean assertz(List<? extends Term> terms)
assertz
in interface PrologEngine
terms
- the terms to assertpublic boolean ensureLoaded(List<? extends Term> terms)
ensureLoaded
in interface PrologEngine
public boolean ensureLoaded(Term... terms)
ensureLoaded
in interface PrologEngine
public boolean ensureLoaded(String... resources)
ensureLoaded
in interface PrologEngine
public Query bagof(Term select, Term exp, Term all)
bagof
in interface PrologEngine
public Term bagof(Term select, Term exp)
bagof
in interface PrologEngine
public Query findall(Term select, Term exp, Term all)
findall
in interface PrologEngine
public Term findall(Term select, Term exp)
findall
in interface PrologEngine
public Query setof(Term select, Term exp, Term all)
setof
in interface PrologEngine
public Term setof(Term select, Term exp)
setof
in interface PrologEngine
public Query forall(Term generator, Term test)
forall
in interface PrologEngine
public boolean flushOutput()
flushOutput
in interface PrologEngine
public Term unify(Term... terms)
unify
in interface PrologEngine
public Term unify(List<? extends Term> terms)
unify
in interface PrologEngine
public boolean allSucceed(List<? extends Term> terms)
allSucceed
in interface PrologEngine
public final void loadJpc()
loadJpc
in interface PrologEngine
public final void loadJpcForLogtalk()
loadJpcForLogtalk
in interface PrologEngine
protected void loadPrologFiles()
protected void loadLogtalkFiles()
public LogtalkEngine asLogtalkEngine()
asLogtalkEngine
in interface PrologEngine
public LogtalkEngine withLogtalk()
withLogtalk
in interface PrologEngine
Copyright © 2014. All rights reserved.