<div class="gmail_quote">2009/2/24 Michael Zimmermann <span dir="ltr">&lt;<a href="mailto:list@incunabulum.de">list@incunabulum.de</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi Jean-Marc,<br><div class="Ih2E3d">
Jean-Marc Vanel wrote:<br>
...<br>
</div><div class="Ih2E3d">&gt; So in summary, N3 is a user-friendly language allowing to express facts,<br>
&gt; class and properties, and rules.<br>
<br>
</div>Nice to see some more work on integrating drools with the semantic web<br>
side. As I have worked on a related topic recently:<br>
<br>
-  Do I understand you correctly, that you use Drools as rule engine for<br>
rules + data where rules + data are defined in OWL?</blockquote><div><br>OWL is not a language for rules, it is a language for expressing complex class definitions, e.g; &quot;a vegetarian pizza is a pizza whose topping has no meat&quot; .<br>
 <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
- What standard are your rules based on?</blockquote><div>N3 logic : tutorial:  <a href="http://www.w3.org/2000/10/swap/doc/Rules" target="_blank">http://www.w3.org/2000/10/swap/doc/Rules</a> ;<br>W3C submission: <a href="http://www.w3.org/TeamSubmission/n3/#keywords">http://www.w3.org/TeamSubmission/n3/#keywords</a><br>
<br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
- How capable is the OWL rules standard compared to Drools?  What do you<br>
think?</blockquote><div><br>First the language is more compact, second you don&#39;t need to define Pojo or any classes beforehand. Let&#39;s take an example:<br><br>@prefix : &lt;<a href="http://exampleS.com#">http://exampleS.com#</a>&gt; .<br>
{ ?x :parent ?y } =&gt;  { ?y :child ?x }.<br><br>Here is the Drools translation that you can run inside EulerGUI, and export out of it :<br><br>rule &quot;parents.n3 0&quot;<br>when<br>  Triple( $x : subject, predicate == &quot;&lt;<a href="http://exampleS.com#parent">http://exampleS.com#parent</a>&gt;&quot;, $y : object )<br>
then<br>  insert( new Triple( $y, &quot;&lt;<a href="http://exampleS.com#child">http://exampleS.com#child</a>&gt;&quot;, $x ) );<br>end<br><br>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.<br>
<br>EulerGUI offers 3 rules engines. The Drools translation is still lacking many builtin functions that the Prolog EYE engine is offering (<a href="http://www.w3.org/TR/xpath-functions/">http://www.w3.org/TR/xpath-functions/</a>). Also the Prolog engine is able to express logical or (disjunction) in the RHS .<br>
On the other hand, for rules recursively building object graphs, the prolog engine is much too slow.<br><br>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.<br>
 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 ).<br><br>Hope this clarifies.<br></div></div>-- <br>
Jean-Marc Vanel<br><a href="http://jmvanel.free.fr/">http://jmvanel.free.fr/</a><br>