The Rule Markup Initiative: RDF Relationships and DTD Modularization - PowerPoint PPT Presentation

1 / 21
About This Presentation
Title:

The Rule Markup Initiative: RDF Relationships and DTD Modularization

Description:

fun uriexp /fun ind oil /ind /nano ur http://www. ... RDF triples as facts described by a DTD in the RuleML family. Example: Next . RuleML in RDF: ... – PowerPoint PPT presentation

Number of Views:49
Avg rating:3.0/5.0
Slides: 22
Provided by: haro60
Learn more at: https://www.ruleml.org
Category:

less

Transcript and Presenter's Notes

Title: The Rule Markup Initiative: RDF Relationships and DTD Modularization


1
The Rule Markup Initiative RDF Relationships
and DTD Modularization
  • Harold Boley
  • Benjamin Grosof
  • Said Tabet

Updated (8 Mar 2001) from talk at RDF Interest
Group Face to face meeting, Technical Plenary
and WG Meeting Event, W3C, Cambridge, Mass.,
26/27 Feb 2001
2
Structure of the RuleML DTD Hierarchy
  • Our system of DTDs (current version 0.7) uses a
    modularization approach similar to XHTML in order
    to accomodate the various rule subcommunities
  • The evolving hierarchy of RuleML DTDs forms
    a partial order with ruleml as the greatest
    element (a ruleml-rooted DAG) -- many
    smallest elements
  • Each DTD node in the hierarchy (conformance
    lattice) corresponds to a specific RuleML
    sublanguage
  • Union (join) of sublanguages reached via
    outgoing links to smaller or equal nodes below
  • Intersection (meet) of sublanguages via
    incoming links from greater or equal nodes above

3
The Module Hierarchy of RuleML DTDs
ruleml
ur-equalog
Rooted DAG will be extended with branches for
further sublanguages
equalog
ur-hornlog
hornlog
ur-datalog
ur-datalog join(ur,datalog)
datalog
bin-datalog
urc-datalog
ur
URL/URI-like ur-objects
urc-bin-datalog
urc-bin-data-ground-log
urc-bin-data-ground-fact
RDF-like triples
4
Initial Example Backward-Rule Notation
Semiformal RuleML markup (still unanalyzed
English relation and individual-constant names)
  • ltifgt
  • ltatomgt
  • ltrelgtmay look atlt/relgt
  • ltvargtyoult/vargt
  • ltur label"Rule-Based Systems"gthttp//www.cs.b
    randeis.edu/...lt/urgt
  • lt/atomgt
  • ltatomgt
  • ltrelgtwant to reviewlt/relgt
  • ltvargtyoult/vargt
  • ltindgtrule principleslt/indgt
  • lt/atomgt
  • lt/ifgt

5
RuleML Elements of Datalog DTD Clocksin/Mellish
Sample Prolog Clauses
Rule (Non-unit clause)
Fact (Unit clause)
ltifgt ltatomgt ltrelgtlikeslt/relgt
ltindgtMarylt/indgt ltindgtwinelt/indgt lt/atomgt
ltand/gt lt/ifgt likes(mary,wine).
ltifgt ltatomgt ltrelgtlikeslt/relgt likes(
ltindgtJohnlt/indgt john, ltvargtxlt/vargt X )
lt/atomgt - ltatomgt ltrelgtlikeslt/relgt
likes( ltvargtxlt/vargt X,
ltindgtwinelt/indgt wine ) . lt/atomgt lt/ifgt
Empty and ? true premise ? factual rule
6
RuleML Element of UR-Hornlog DTD Proposed
W3C-Page Authentication Rule
Tim Berners-Lee (preliminary) Any person (x) may
register
ltifgt ltatomgt ltrelgtmay registerlt/relgt
ltvargtxlt/vargt lt/atomgt ltandgt ltatomgt
ltrelgtpersonlt/relgt ltvargtxlt/vargt lt/atomgt
lt/andgt lt/ifgt
7
RuleML Element of UR-Hornlog DTD Proposed
W3C-Page Authentication Rule
Tim Berners-Lee (preliminary) Any person (x) who
was some time in the last 2 months an employee of
an organization (y) may register
ltatomgt ltrelgtemployee inlt/relgt
ltvargtxlt/vargt ltvargtylt/vargt ltctermgt
ltctorgtlastlt/ctorgt ltctermgt
ltctorgtmonthlt/ctorgt ltindgt2lt/indgt
lt/ctermgt lt/ctermgt lt/atomgt lt/andgt lt/ifgt
ltifgt ltatomgt ltrelgtmay registerlt/relgt
ltvargtxlt/vargt lt/atomgt ltandgt ltatomgt
ltrelgtpersonlt/relgt ltvargtxlt/vargt lt/atomgt
ltatomgt ltrelgtorganizationlt/relgt
ltvargtylt/vargt lt/atomgt
. . .
8
RuleML Element of UR-Hornlog DTD Proposed
W3C-Page Authentication Rule
Tim Berners-Lee Any person (x) who was some time
in the last 2 months an employee of an
organization (y) which was some time in the last
2 months a W3C member may register
ltatomgt ltrelgtmember inlt/relgt
ltvargtylt/vargt ltur label"W3C"gthttp//
www.w3.org/lt/urgt ltctermgt
ltctorgtlastlt/ctorgt ltctermgt
ltctorgtmonthlt/ctorgt ltindgt2lt/indgt
lt/ctermgt lt/ctermgt lt/atomgt
lt/andgt lt/ifgt
ltifgt ltatomgt ltrelgtmay registerlt/relgt
ltvargtxlt/vargt lt/atomgt ltandgt ltatomgt
ltrelgtpersonlt/relgt ltvargtxlt/vargt lt/atomgt
ltatomgt ltrelgtorganizationlt/relgt
ltvargtylt/vargt lt/atomgt
ltatomgt ltrelgtemployee inlt/relgt
ltvargtxlt/vargt ltvargtylt/vargt ltctermgt
ltctorgtlastlt/ctorgt ltctermgt
ltctorgtmonthlt/ctorgt ltindgt2lt/indgt
lt/ctermgt lt/ctermgt lt/atomgt
9
RuleML Elements of UR-Equalog DTD Equation for
URI Expansion
uriexp(daml) http//www.daml.org/
ltifgt lteqgt ltnanogt ltfungturiexplt/fungt
ltindgtdamllt/indgt lt/nanogt
lturgthttp//www.daml.org/lt/urgt lt/eqgt
ltand/gt lt/ifgt
10
RuleML Elements of UR-Equalog DTD Equations for
URI Expansion
URLs/URIs or URs as 1st-class citizens
uriexp(daml) http//www.daml.org/
ltifgt lteqgt ltnanogt ltfungturiexplt/fungt
ltindgtdamllt/indgt lt/nanogt
lturgthttp//www.daml.org/lt/urgt lt/eqgt
ltand/gt lt/ifgt
uriexp(oil) http//www.ontoknowledge.org/oil/
ltifgt lteqgt ltnanogt ltfungturiexplt/fungt
ltindgtoillt/indgt lt/nanogt
lturgthttp//www.ontoknowledge.org/oil/lt/urgt
lt/eqgt ltand/gt lt/ifgt
Empty and ? true premise ? unconditional equatio
n
. . .
11
Two-Way Relationship Between RuleML and RDF
  • RDF in RuleML
  • RDF triples as facts described by a DTD in the
    RuleML family
  • Example Next slide
  • RuleML in RDF
  • RDF graphs and serializations for RuleML rules
  • To be treated in later slides

12
RuleML Element of URC-Bin-Data-Ground-Fact
DTDRDF Triple as Very Special Rule
RDF triple (predicate, subject, object) as
atom predicate(subject, object) or rel(ur,
urind) "http//www.w3.org/Home/Lassila has
creator Ora Lassila." (Creator,
http//www.w3.org/Home/Lassila, Ora Lassila)
ltifgt ltatomgt ltrelgtCreatorlt/relgt
lturgthttp//www.w3.org/Home/Lassilalt/urgt
ltindgtOra Lassilalt/indgt lt/atomgt ltand/gt lt/ifgt
13
From the XML Representation to PossibleRDF
Representations of RuleML Rules
  • XML N-ary, positional representation of rules
  • RDF Binary, labeled representation of rules with
    nodes for resources and labels as explicit role
    names
  • Parallel labeled arcs for N-element rulebases and
    N-ary conjunctions Operator, Arg1,..., ArgN for
    relation/function Operator applied toN arguments
    through atoms/nanos

14
XML Representation of Buy Sample
RuleNode-Labeled, Left-to-Right-Ordered Tree
rulebase
if
atom
atom
rel
var
var
var
rel
var
var
var
object
buy
person
merchant
object
sell
merchant
person
Different XML nodes (dots, often omitted) can
carry the same label Implicit left-to-right and
top-down orders could also be made explicit
15
RDF Representation of Buy Sample RuleDirected
Arc-Labeled Graph (Instances)
Element
if1
Conc
Prem
atom1
atom2
Operator
Operator
Arg3
Arg3
Arg1
Arg1
Arg2
Arg2
Name
Name
Name
Name
Name
Name
Name
Name
RDF resources (ovals) are nodes (URIs), hence
require unique indexes RDF literals (rectangles)
are also nodes, hence copies should be identified
16
RDF Representation of Buy Sample RuleDirected
Node/Arc-Labeled Graph (Types)
Element
if
Conc
Prem
atom
atom
Operator
Operator
Arg3
Arg3
Arg1
Arg1
Arg2
Arg2
Name
Name
Name
Name
Name
Name
Name
Name
Same RDF types (ovals) denote different anonymous
resources RDF literals (rectangles) likewise
viewed as anonymous resources
17
The Implemented RDF Representation RuleML as RDF
Serializations Graphs
  • RDF Container Bag for N-element rulebases and
    N-ary conjunctions (Set would be more
    precise)Seq for N-ary argument lists of atoms
    and nanos
  • Preliminary serialization, open to change (see
    above) Joint work with DAML-Rules and
    Triple system,and possibly with Notation 3 and
    Euler
  • Realized by XSLT translator from valid RuleML
    rulebases to RDF short (Description?type)
    syntax(cf. nested property lists)
    http//www.dfki.de/ruleml/rdf/ruledf.xsl
  • Visualized by RDFViz tool http//www.dfki.de/rule
    ml/rdf/buy-rdfviz.gif
  • Queries and inferences can, e.g., be implemented
    via Triple and Euler

18
lt?xml version"1.0" standalone"no"?gt lt!DOCTYPE
rulebase SYSTEM "http//www.dfki.de/ruleml/dtd/rul
eml-datalog-standalone.dtd"gt lt?xml-stylesheet
href"ruledf.xsl" type"text/xsl"?gt lt?cocoon-proce
ss type"xslt"?gt   ltrulebasegt lt!-- In
English This rule says that a person buys an
object from a merchant if the merchant sells the
object to the person. --gt   ltifgt ltatomgt
ltrelgtbuylt/relgt ltvargtpersonlt/vargt
ltvargtmerchantlt/vargt ltvargtobjectlt/vargt
lt/atomgt ltatomgt ltrelgtselllt/relgt
ltvargtmerchantlt/vargt ltvargtpersonlt/vargt
ltvargtobjectlt/vargt lt/atomgt lt/ifgt lt/rulebasegt
19
  lt?xml version"1.0" encoding"UTF-8"?gt ltrdfRDF
xmlnsrdf"http//www.w3.org/1999/02/22-rdf-syntax
-ns" xmlnsruleml"http//www.dfki.de/ruleml/rdf
"gt ltrulemlRulebase about"http//www.xyz.org/an
d-gensym"gt ltrulemlContainergt
ltrdfBaggt ltrdfligt ltrulemlIf
about"http//www.xyz.org/if-gensym"gt
ltrulemlConcgt ltrulemlAtom
about"http//www.xyz.org/atom-gensym"gt
ltrulemlRelatorgt
ltrulemlRel about"http//www.xyz.org/rel-gensym"gt
ltrulemlNamegtbuylt/rulemlName
gt lt/rulemlRelgt
lt/rulemlRelatorgt
ltrulemlContainergt ltrdfSeqgt
ltrdfligt
ltrulemlVar about"http//www.xyz.org/var-gensym"gt
ltrulemlNamegtpersonlt/rule
mlNamegt lt/rulemlVargt
lt/rdfligt
ltrdfligt ltrulemlVar
about"http//www.xyz.org/var-gensym"gt
ltrulemlNamegtmerchantlt/rulemlNamegt
lt/rulemlVargt
lt/rdfligt ltrdfligt
ltrulemlVar about"http//www.xyz.
org/var-gensym"gt
ltrulemlNamegtobjectlt/rulemlNamegt
lt/rulemlVargt
lt/rdfligt lt/rdfSeqgt
lt/rulemlContainergt
lt/rulemlAtomgt lt/rulemlConcgt
20
ltrulemlPremgt
ltrulemlAtom about"http//www.xyz.org/atom-gensym
"gt ltrulemlRelatorgt
ltrulemlRel about"http//www.xyz.org/rel-gens
ym"gt ltrulemlNamegtselllt/ruleml
Namegt lt/rulemlRelgt
lt/rulemlRelatorgt
ltrulemlContainergt ltrdfSeqgt
ltrdfligt
ltrulemlVar about"http//www.xyz.org/var-gensym"gt
ltrulemlNamegtmerchantlt/ru
lemlNamegt lt/rulemlVargt
lt/rdfligt
ltrdfligt ltrulemlVar
about"http//www.xyz.org/var-gensym"gt
ltrulemlNamegtpersonlt/rulemlNamegt
lt/rulemlVargt
lt/rdfligt ltrdfligt
ltrulemlVar about"http//www.xyz.or
g/var-gensym"gt
ltrulemlNamegtobjectlt/rulemlNamegt
lt/rulemlVargt
lt/rdfligt lt/rdfSeqgt
lt/rulemlContainergt
lt/rulemlAtomgt lt/rulemlPremgt
lt/rulemlIfgt lt/rdfligt
lt/rdfBaggt lt/rulemlContainergt
lt/rulemlRulebasegt lt/rdfRDFgt   lt!-- This page
was served in 3565 milliseconds by Cocoon 1.8
--gt  
21
Conclusions
  • RuleML DTD 0.7, a system of 12 DTDs, is available
    at http//www.dfki.de/ruleml/indtd.html sample
    files at http//www.dfki.de/ruleml/exa
  • The rule representation in RDF is described at
    http//www.dfki.de/ruleml/inrdf.html
  • Further rule categories (e.g. ICs and triggers)
    and DTD updates will be available via main RuleML
    page at http//www.dfki.de/ruleml
  • Distributed KR can already be based on current
    DTDs -- using (XSLT) transformations to reach
    follow-up and Participants DTDs
Write a Comment
User Comments (0)
About PowerShow.com