O-DEVICE is a system developed by Georgios Meditskos and Nick Bassiliades, members of the Intelligent Systems and Knowledge Processing (ISKP) group of the Department of informatics of Aristotle University of Thessaloniki.

Home | Predefined schema | Rule Abstract Syntax | O-DEVICE Rules | Dynamic Rules | Query Language

Abstract Syntax of Rules
We describe the abstract syntax we use for the presentation of O-DEVICE inference rules since we consider that a detailed and direct representation of the CLIPS production rules is out of the scope. With this abstract syntax we want to present the idea behind each rule in a simple and understandable way and no implementation aspects which may differ from system to system.

Intuitively, rules can be classified into two categories. The rules of the first category read ontology information in the form of triples and materialize the information in the form of classes, properties and objects. At the same time, they apply semantic transformations whenever is necessary based on the already existing information in the knowledge base by combining triples and objects in order to retain the consistency. The second category contains rules that perform more sophisticated semantic derivations and are applied only in the objects of the knowledge base. These rules are the result of our dynamic approach of generating inference rules.

Consequently, the complete representation of the rules requires the definition of a syntax able to represent and combine both triples and objects of the knowledge base. Each production rule of the system contains a head (IF part) and a body (THEN part). In order for a rule to be activated, all the conditional elements must be hold true and the rule fires (the actions are applied) according to a conflict resolution strategy. The representation of such a rule follows the BNF notation can be found here .

In the head of a rule, each object of the knowledge base is represented using the notation: object(is-a “class name”)(name “object name”)(“slot-name” “values”) where the is-a part denotes the class where the object belongs, the name part the name of the object and a slot part(s) describing the name of the slot(s) and the values. All the slots of the classes are defined as multislots, i.e. each slot can take more than one values in a form of list. A list in a rule can be matched using a variety of methods. A whole list can be obtained using the symbol $?, e.g. $?L, or for traversing the list element by element it can be used the notation $? ?x $? where ?x is an element of the list. Furthermore in both cases, it is feasible to apply functions in an inline way. A description of all the available inline functions can be found in the end of the page. For example, the syntax $? ?x & IN $?L $? matches an element ?x of a list which exists (IN) a list $?L. Finally logical operators can be used, such as AND, OR and NOT.

Each triple is represented using the notation triple(?s ?p ?o) where ?s, ?p and ?o is the subject, predicate and object of the triple respectively. For each element of the triple the inline use of function is allowed. Furthermore there is the possibility to call a function in the head of the rule using the test operator. The function should return a Boolean type in order for the syntax to be valid.

The body of a rule consists of a number of function calls that are executed upon the satisfaction of the conditions of the head of the rule. A list of the valid functions can be found in the end of the page. Below there is an example rule that covers most of the syntax characteristics.

Rule_No
IF triple(?s rdf:type ?o & IN [a b])
NOT object(name ?s)
THEN create-object(?o ?s)

The above rule finds a triple that has any subject ?s, a predicate value equal to rdf:type and an object ?o which belongs to a list containing the elements a and b (in other words the object should be the value a or b). Furthermore, the subject of the triple must not exist as an object in the knowledge base. In the body, the rule calls the function create-object with the ?o and ?s parts of the triple as parameters.

Here you can found a detailed description of all rules.