Presentation is loading. Please wait.

Presentation is loading. Please wait.

RuleML Rules Lite Harold Boley, NRC IIT e-Business Said Tabet, Macgregor Corp With Key Contributions from the Joint Committee DAML PI Meeting, Captiva.

Similar presentations


Presentation on theme: "RuleML Rules Lite Harold Boley, NRC IIT e-Business Said Tabet, Macgregor Corp With Key Contributions from the Joint Committee DAML PI Meeting, Captiva."— Presentation transcript:

1 RuleML Rules Lite Harold Boley, NRC IIT e-Business Said Tabet, Macgregor Corp With Key Contributions from the Joint Committee DAML PI Meeting, Captiva Island, FL, USA 17 Oct. 2003

2 RuleML Rules Lite 1 Introduction Starting point of RuleML Rules Lite is Datalog RuleML 0.8RuleML 0.8 Main elements: facts and rules (also queries) „Minimal“: Predicates restricted to unary / binary – Compatible with OWL-DL – Certain unary predicates also usable for typing rule variables (untyped ones being of type 'any') In the following: – Use case – Data model – Concrete syntax – Herbrand-like models

3 RuleML Rules Lite 2 BinDataLog Rules Lite: Source Variants Use case: Geography Example: stretches rule English: „An object x stretches an object y if y has x as a part and x and y are co-flanked “ PR-Prolog: stretches(?x,?y) :- has_as_part(?y,?x), co-flanked(?x,?y).

4 RuleML Rules Lite 3 Rules and Facts from PR-Prolog Source stretches(?x,?y) :- has_as_part(?y,?x), co-flanked(?x,?y). co-flanked(?x,?y) :- flanked_by(?x,?z), flanked_by(?y,?z). continent(North_America). country(Canada). country(USA). province(Ontario). oceanpair(Oceanics). ocean(Atlantic). ocean(Pacific). has_as_part(North_America,Canada). has_as_part(North_America,USA). has_as_part(Canada,Ontario). area(Canada,sqkm9976140). area(USA,sqkm9629091). flanked_by(North_America,Oceanics). flanked_by(Canada,Oceanics). flanked_by(USA,Oceanics). eastern(Oceanics,Atlantic). western(Oceanics,Pacific).

5 RuleML Rules Lite 4 The Data Model of RuleML Rules Lite Unifies the XML and RDF Models XML based on, possibly attributed, left-to-right ordered, node-labeled trees, reminiscent of parse (syntax) trees RDF based on directed, arc-labeled (unordered) graphs with two kinds of nodes, resources and literals, the latter not allowing outgoing arcs XML and RDF employ different data models: A unified data model is used in RuleML Rules Lite

6 RuleML Rules Lite 5 BinDataLog Rules Lite: Tree Data Model RuleML Lite rules are graphically modeled as trees, here illustrated for the stretches rule RDF graph for OO roles: (arc-)labeled, unordered children XML tree for predicate arguments: unlabeled, ordered children imp stretches x atom headbody opr has_as_part var y x y co-flanked x opr var y atom stretches(?x,?y) :- has_as_part(?y,?x), co-flanked(?x,?y).

7 RuleML Rules Lite 6 RuleML Rules Lite Concrete Markup Syntax Webized-only, abridged version of the XML markup of RuleML 0.8, compatible with RDF and OWL The (always empty) 'ind' element is used – in the first or second argument position – for 'href'-naming individual constants A new 'data' element is used – in the second argument position – for tagging various data types as content (cf. RDF literals)

8 RuleML Rules Lite 7 Webizing Constants and Relations Webized individual constants: constant is replaced by as in RuleML 0.8 Webized relation symbols: relation is replaced by

9 RuleML Rules Lite 8 Uniform Webizing Syntax Individuals as well as unary and binary predicates can be webized by augmenting, within the href's, their symbolic "#"-names by URIs, so that two possibilities result: *1* Symbolic names: with "#"-prefixed fragment identifiers (local only, corresponding to the pre-webized situation) *2* URIs: with "#"-separated fragment identifiers (cf. RDF)

10 RuleML Rules Lite 9 Webizing – Use Case (I) PR-Prolog (with N3-like URIs and namespace declarations): w := http://www.waters.org. continent( ).... ( ).... (North_America,Canada).... (,Pacific).

11 RuleML Rules Lite 10 Webizing – Use Case (II) XML: <rulebase xmlns:w="http://www.waters.org" >.........

12 RuleML Rules Lite 11 Abridging RuleML 0.8 Tags in Rules Lite *1* The earlier will be abridged to *2* The earlier atom1...atomK will be abridged to atom1...atomK (K = 0, 1,...) *3* Similarly, atom1...atomK could be abridged to atom1...atomK (for OWL Rules) *4* Prefix form term1...termN will be allowed (0 < N < 3); Postfix form term1…termN will be forbidden (0 < N < 3) *5* The earlier... will be further abridged to...

13 RuleML Rules Lite 12 BinDataLog RuleML Lite: Use Case Rule x y y x x y A rule in RuleML Lite is marked up as an imp element that has two children: a _ head role with an atom element augmented – before or after – by a _ body role with 1 or more (here: 2) atom elements stretches(?x,?y) :- has_as_part(?y,?x), co-flanked(?x,?y).

14 RuleML Rules Lite 13 BinDataLog RuleML Lite: Use Case Facts...... sqkm 9976140... A fact in RuleML Lite is marked up as a facto element that has two or three children: an _ opr role with a relation name followed by an argument that is an ind element and an optional argument that is an ind or data element

15 RuleML Rules Lite 14 Conjunctive Retrieval Queries – as 'Negative' Integrity Constraints PR-Prolog: continent(x), ocean(x) XML: x x A query in RuleML Lite is marked up as a query element that has one child: a _ body role with 1 or more (here: 2) atom elements

16 RuleML Rules Lite 15 Inferential Queries – Step 1 PR-Prolog: stretches(?x,North_America) XML: x

17 RuleML Rules Lite 16 Inferential Queries – Step 2 PR-Prolog: has_as_part(North_America,?x), co-flanked(?x,North_America) XML: x x

18 RuleML Rules Lite 17 Inferential Queries – Step 3 PR-Prolog: co-flanked(?x,North_America) where ?x = Canada XML: x where x =

19 RuleML Rules Lite 18 Inferential Queries – Step 4 PR-Prolog: ?x = Canada XML: x =

20 RuleML Rules Lite 19 Inferential Queries – Step 2’ PR-Prolog: has_as_part(North_America,?x), co-flanked(?x,North_America) XML: x x

21 RuleML Rules Lite 20 Inferential Queries – Step 3’ PR-Prolog: co-flanked(?x,North_America) where ?x = USA XML: x where x =

22 RuleML Rules Lite 21 Inferential Queries – Step 4’ PR-Prolog: ?x = USA XML: x =

23 RuleML Rules Lite 22 DL-Augmented Herbrand Model PR-Prolog: continent(North_America). country(Canada). country(USA). province(Ontario). oceanpair(Oceanics). ocean(Atlantic). ocean(Pacific). has_as_part(North_America,Canada). has_as_part(Canada,Ontario). has_as_part(North_America,Ontario). % from OWL area(Canada,sqkm9976140). area(USA,sqkm9629091). flanked_by(North_America,Oceanics). flanked_by(Canada,Oceanics). flanked_by(USA,Oceanics). flanks(Oceanics,North_America). % from OWL flanks(Oceanics,Canada). % from OWL flanks(Oceanics,USA). % from OWL co-flanked(North_America,Canada). co-flanked(Canada,North_America). co-flanked(North_America,USA). co-flanked(USA,North_America). co-flanked(Canada,USA). co-flanked(USA,Canada). co-flanked(North_America,North_America). co-flanked(Canada,Canada). co-flanked(USA,USA). stretches(Canada,North_America). stretches(USA,North_America). eastern(Oceanics,Atlantic). western(Oceanics,Pacific).

24 RuleML Rules Lite 23 DTD for Rules Lite – Facts and Rules <!-- The CDATA must be either URIs with "#"-separated fragment identifiers (for URI naming) or local, "#"-prefixed fragment identifiers (for symbolic naming) -->

25 RuleML Rules Lite 24 XML Schema (I) – Facts and Rules

26 RuleML Rules Lite 25 XML Schema (II) – Facts and Rules

27 RuleML Rules Lite 26 Work in Progress on Industrial Applications Fraud detection rules Mortgage loan rules Policies and regulations for financial services

28 RuleML Rules Lite 27 Conclusions After definition of RuleML Rules Lite as an XML DTD & Schema, next step has been to modify existing parsers, generators, and XSLT translators to implement syntax for rule interchange Two engines running tested with discount rules (Jess, Rules.NET) Serialization to Java and.NET object models Further implementations have been envisaged for jDREW, OWL engines, Jena 2, and cwm Since RuleML Rules Lite semantically is a kind of RDF Rules, a pure RDF version is being considered Intertranslation and convergence with OWL Rules (Lite) will be important future JC work item to synergize communities To demonstrate the extension path to N-ary relations, ternary predicates could be added later as exemplified in http://www.daml.org/listarchive/joint-committee/1444.html http://www.daml.org/listarchive/joint-committee/1444.html As an alternative or complement, transition to full Horn logic could be attempted


Download ppt "RuleML Rules Lite Harold Boley, NRC IIT e-Business Said Tabet, Macgregor Corp With Key Contributions from the Joint Committee DAML PI Meeting, Captiva."

Similar presentations


Ads by Google