edu::tum::cs::prolog::PrologKnowledgeBase Class Reference
List of all members.
Detailed Description
- Author:
- jain
Definition at line 14 of file PrologKnowledgeBase.java.
Constructor & Destructor Documentation
edu::tum::cs::prolog::PrologKnowledgeBase::PrologKnowledgeBase |
( |
|
) |
[inline] |
Member Function Documentation
boolean edu::tum::cs::prolog::PrologKnowledgeBase::ask |
( |
String |
query |
) |
throws ParseException [inline] |
queries the value of an atom or conjunction and returns the value
- Parameters:
-
| query | an atom or conjunction, e.g. a ground atom such as "parent(eve, kain)" or "age(eve, 27)" |
- Returns:
- true if the formula can be proven to be true given the KB, false otherwise
- Exceptions:
-
Definition at line 34 of file PrologKnowledgeBase.java.
Collection<String> edu::tum::cs::prolog::PrologKnowledgeBase::fetchAtoms |
( |
String |
goal |
) |
[inline] |
fetches the ground atoms that match the goal atom
- Parameters:
-
| goal | a query such as "parent(eve,X)" |
- Returns:
- a collection of strings of matching ground atoms
Definition at line 44 of file PrologKnowledgeBase.java.
Vector<String[]> edu::tum::cs::prolog::PrologKnowledgeBase::fetchBindings |
( |
String |
goal |
) |
[inline] |
fetches the ground atoms (as a vector of argument lists) that match the given goal
- Parameters:
-
| goalAtom | a query such as "parent(eve,X)" |
- Returns:
- a vector of argument lists, where each list corresponds to one ground atom that matches the query
Definition at line 59 of file PrologKnowledgeBase.java.
void edu::tum::cs::prolog::PrologKnowledgeBase::tell |
( |
String |
formula |
) |
throws ParseException [inline] |
adds a formula, i.e. a fact or a rule, to the knowledge base, e.g. "person(eve)." or "parent(X,Y) :- father(X,Y)."
- Parameters:
-
- Exceptions:
-
Definition at line 24 of file PrologKnowledgeBase.java.
The documentation for this class was generated from the following file: