The Description Logic Lite Plugin

The Description Logic Lite Plugin interfaces OWL ontologies by using a description logic reasoner, similar to the DL-Plugin, but using a DL-reasoner which is directly compiled into the plugin, and restricted to DLLite ontologies. It provides four atoms—two for retrieving concept resp. role members and two for testing the DL-KB for consistency/inconsistency. Additionally, it features a rewriter for the more convenient DL-syntax which is automatically translated into a HEX-program.

External Atoms

&cDL[KB,a,b,c,d,Q](X)
Input:
KB
web address or file path of the OWL Ontology.
a
name of a binary predicate whose extension denotes addition to a concept.
b
name of a binary predicate whose extension denotes addition to the complement of a concept.
c
name of a ternary predicate whose extension denotes addition to a role.
d
name of a ternary predicate whose extension denotes addition to the complement of a role.
Q
name of a concept to be queried.
Output:
X
individuals of concept 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) :- &cDL["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) :- &cDL["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) :- &cDL["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) :- &cDL["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:

&rDL[KB,a,b,c,d,Q](X,Y)
Input:
KB
web address or file path of the OWL Ontology.
a
name of a binary predicate whose extension denotes addition to a concept.
b
name of a binary predicate whose extension denotes addition to the complement of a concept.
c
name of a ternary predicate whose extension denotes addition to a role.
d
name of a ternary predicate whose extension denotes addition to the complement of a role.
Q
name of a object property to be queried.
Output:
X,Y
pairs of individuals of property Q

Additionally, the DLLite-Plugin provides an external atom which tests the given DL-KB for consistency under the specified extensions:

&consDL[KB,a,b,c,d]()
Input:
KB
web address or file path of the OWL Ontology.
a
name of a binary predicate whose extension denotes addition to a concept.
b
name of a binary predicate whose extension denotes addition to the complement of a concept.
c
name of a ternary predicate whose extension denotes addition to a role.
d
name of a ternary predicate whose extension denotes addition to the complement of a role.
Output:
 
none.

If the KB is consistent after possibly augmenting the A-Box according to the input list, the atom evaluates to true, otherwise false.

&inconsDL[KB,a,b,c,d]()
Input:
KB
web address or file path of the OWL Ontology.
a
name of a binary predicate whose extension denotes addition to a concept.
b
name of a binary predicate whose extension denotes addition to the complement of a concept.
c
name of a ternary predicate whose extension denotes addition to a role.
d
name of a ternary predicate whose extension denotes addition to the complement of a role.
Output:
 
none.

If the KB is inconsistent after possibly augmenting the A-Box according to the input list, the atom evaluates to true, otherwise false.

DL-Syntax

If the option --ontology=file.owl is specified on the command-line, then DL-atoms which access the ontology file.owl of the following forms might be used.

A DL-atom for concept queries has the form DL[input; Query](X), where input is a comma-separated list of expressions of type E+=p or E-=p to extend concept (role) E or -E with the individuals in the unary (binary) predicate p, respectively, and Query is the concept to query. The atom will evaluate the true for all values X which are in concept Query if the ontology is extended as defined by input. The program

student(X) :- &cDL["http://example.org/univ.owl",a,b,c,d,"student"](X).
a(freshman,X) :- attends(X,Y), firstyearcourse(Y).
might also be written as
student(X) :- DL[freshman+=a; student](X).
a(X) :- attends(X,Y), firstyearcourse(Y).

Similarily, a DL-atom for role queries has the form DL[input; Query](X,Y), where input is a comma-separated list as described above, and Query is the role to query. The atom will evaluate the true for all pairs (X,Y) which are in role Query if the ontology is extended as defined by input.

Finally, a DL-atom for consistency check has the form DL[input](), where input is a comma-separated list as described above. The atom will evaluate the true if the ontology is consistent after extending it as defined by input.

Further command-line options

The plugin further supports the option --optimize, which automatically rewrites DL-atoms and DL-related external atoms to improve efficiency. Currently, the single optimization rule rewrites default-negated consistency checks to inconsistency checks, which turns the external atom into a monotonic one and might increase efficiency.

$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