CS 6795 Semantic Web Techniques

Project 3: Translating Between Subsets of RuleML and Jess


Syllabus
Assigns
Notes
Labs
Project
Resources

Update (part of) the RuleML 0.7 "Animals Knowledge Base" (http://www.dfki.uni-kl.de/ruleml/jess/rules1.xml ) to conform to the current version of Datalog RuleML 0.8, but also allow a _priority role in an imp, as illustrated by the rulebase below. This will serve you as a test base. Adapt the j-DREW RuleML parser to handle the roles _rbaselab, _rlab, and _priority, initially by ignoring their contents. Then read in your AnimalsKB and run queries in j-DREW (bottom-up). Download the Jess rule engine and scripting environment (http://herzberg.ca.sandia.gov/jess/ ). Consider the (small) subset of Jess corresponding to the Datalog RuleML subset needed for your AnimalsKB. Basically, the _head atom of a RuleML imp becomes an assert action in Jess. Apply the XSLT stylesheet http://www.dfki.uni-kl.de/ruleml/jess/RuleMLTransform.xsl  to the original RuleML 0.7 "Animals Knowledge Base". Then modify it for your RuleML 0.8 AnimalsKB to produce the above Jess subset. Run your translated example in the Jess engine. Document your problems and solutions in this experiment.

 

<rulebase>

   <_rbaselab><ind>AnimalsKB</ind></_rbaselab>

 

   <fact>

     <_rlab><ind>fact1</ind></_rlab>

     <_head>

        <atom>

           <_opr>

              <rel>has</rel>

           </_opr>

           <ind>Stretch</ind>

           <ind>hair</ind>

        </atom>

     </_head>

   </fact>

 

   <imp>

     <_rlab><ind>AnimalsRule1</ind></_rlab>

     <_priority><ind>10</ind></_priority>

     <_head>

        <atom>

           <_opr>

              <rel>isa</rel>

           </_opr>

           <var>x</var>

           <ind>mammal</ind>

        </atom>

     </_head>

     <_body>

       <atom>

          <_opr>

             <rel>has</rel>

          </_opr>

          <var>x</var>

          <ind>hair</ind>

       </atom>

     </_body>

   </imp>

 

</rulebase>

 

 


Maintained by Bruce Spencer