The Description Logic Plugin interfaces OWL ontologies by using a description logic reasoner. It provides three atoms—two for retrieving concept resp. role members and one for testing the DL-KB for consistency.
Q
This looks more difficult than it actually is. For a simple query, all you need is the first and the last input argument.
student(X) :- &dlC["http://example.org/univ.owl",a,b,c,d,"student"](X).
Provided that a
, b
, c
, and d
do not occur elsewhere in the hex-program, this rule would do nothing else than putting all members of student
into the predicate student
.
Now imagine you want to extend the concept freshman
by "John Doe" before actually querying student
:
student(X) :- &dlC["http://example.org/univ.owl",a,b,c,d,"student"](X). a(freshman,"John Doe").
Thus, at the second position of its input list, the external atom expects a binary predicate, whose first argument denotes the concept to be extended and the second the actual individuals to be aded to the concept. Naturally, this can become very versatile:
student(X) :- &dlC["http://example.org/univ.owl",a,b,c,d,"student"](X). a(freshman,X) :- attends(X,Y), firstyearcourse(Y).
Adding to roles works analogously, e.g.:
student(X) :- &dlC["http://example.org/univ.owl",a,b,c,d,"student"](X). b(enrolled,X,Y) :- person(X), studies(X,Y).
The second atom follows the same input mechansim, but queries a role:
Q
For datatype properties you have to use a different atom:
Q
Additionally, the DL-Plugin provides an external atom which tests the given DL-KB for consistency under the specified extensions:
If the KB is consistent after possibly augmenting the A-Box according to the input list, the atom evaluates to true, otherwise false.
$Id$
General
dlvhex source code @ github.com
Description-Of-A-Project
Popular Plugins
Action Plugin
DecisionDiagrams Plugin
Description Logics Plugin
Description Logics Lite Plugin
MELD: Belief Merging Plugin
Nested HEX Plugin
MCSIE Plugin
String Plugin
dlvhex-semweb Project
Documentation
User Guide
README
doxygen
Writing Plugins in C++
Writing Plugins in Python