next up previous contents
Next: Examples Up: Corese RDF Query and Previous: A Rule language based   Contents

Features

The rule language enables to create new relations between concepts and to specify the type of a concept.

It also enables to create new concepts in the conclusion when there are free variables. New concepts are created as blank nodes in the target graph.

This feature must be used with care as it may lead the inference engine to loop. In the case where a rule applies on a kind of concept that is created by another rule, this may lead to an infinite loop pattern.

The rule engine creates unique blank nodes given a conclusion binding of a given rule. In such a way that a rule applies only once on a given conclusion binding and hence would not loop if it applies again. Two condition bindings with the same conclusion binding would create the same concept(s).

Example : the rule below creates a concept for the ?a free variable in the conclusion. For a same binding of ?x and ?y for this rule, the engine would create only one concept.

<cos:rule>
<cos:if>
   ?x c:related ?y
</cos:if>

<cos:then>
    ?x c:member ?a
    ?a c:include ?y
</cos:then>
</cos:rule>



Olivier Corby 2005-07-01