2009/2/24 Michael Zimmermann <list@incunabulum.de>
Hi Jean-Marc,
Jean-Marc Vanel wrote:
...
> So in summary, N3 is a user-friendly language allowing to express facts,
> class and properties, and rules.

Nice to see some more work on integrating drools with the semantic web
side. As I have worked on a related topic recently:

-  Do I understand you correctly, that you use Drools as rule engine for
rules + data where rules + data are defined in OWL?

OWL is not a language for rules, it is a language for expressing complex class definitions, e.g; "a vegetarian pizza is a pizza whose topping has no meat" .
 
- What standard are your rules based on?
N3 logic : tutorial:  http://www.w3.org/2000/10/swap/doc/Rules ;
W3C submission: http://www.w3.org/TeamSubmission/n3/#keywords

- How capable is the OWL rules standard compared to Drools?  What do you
think?

First the language is more compact, second you don't need to define Pojo or any classes beforehand. Let's take an example:

@prefix : <http://exampleS.com#> .
{ ?x :parent ?y } =>  { ?y :child ?x }.

Here is the Drools translation that you can run inside EulerGUI, and export out of it :

rule "parents.n3 0"
when
  Triple( $x : subject, predicate == "<http://exampleS.com#parent>", $y : object )
then
  insert( new Triple( $y, "<http://exampleS.com#child>", $x ) );
end

I would say that for pure logic rules (not too many Java calls in RHS) , and moreover if you have some RDF data to process, and OWL class and property definitions, it makes sense to use N3 rules.

EulerGUI offers 3 rules engines. The Drools translation is still lacking many builtin functions that the Prolog EYE engine is offering (http://www.w3.org/TR/xpath-functions/). Also the Prolog engine is able to express logical or (disjunction) in the RHS .
On the other hand, for rules recursively building object graphs, the prolog engine is much too slow.

In fact you can have the best of both worlds. Suppose you have a wealth of Drools rules, plus also some RDF data and OWL ontologies. You can export your RDF data and OWL ontologies as Java ojects ( just one class Triple is used).  Then you can write some Drools rules that express the relations between the Triple objects from the RDF world and the other objects refered to in the Drools rules.
In this scenario, it is notable that the logic of OWL and RDF Schema (transitive property, inheritance, etc), is already expressed as N3 rules (and hence as Drools rules ).

Hope this clarifies.
--
Jean-Marc Vanel
http://jmvanel.free.fr/