Title: ObjectOriented RuleML for RDF: Facts, Queries, and Inferences
1Object-OrientedRuleML for RDFFacts, Queries,
and Inferences
- Harold Boley, NRC IIT e-Business
- (with help from Said Tabet, Duncan Johnston-Watt,
Benjamin Grosof, Bruce Spencer, Steve
Ross-Talbot, Mike Dean, and Gerd Wagner) - On leave from DFKI GmbH
W3C Semantic Web Architecture Meeting, Technical
Plenary and WG Meeting Event, Cambridge, MA,
USA,, 3-7 March 2003
2Introduction
- Increased mutual RuleML-RDF(S) integration
- RDF(S) needs rules for query, inference,
transformation - RuleML rules need alternative syntactic encodings
inRDF and OWL - RuleML and OWL overlap as KRsDescription Logic
Programs - RuleML variables need types URIrefs to RDFS/OWL
classes - re A. Object-oriented RuleML is useable as an RDF
query, inference, and transformation language - Rules over positional (triple-like) facts 2001
- Rules over richer object-oriented facts 2003
- Queries and inferences (conjunctive) over OO
facts(linked via named or anonymous/blank
nodes) - Queries and inferences over OO facts
withbNode-embedded descriptions
Intro
3The First RDF Graph
How to serialize this RDF graph (from MS)
Intro
4RDF Triples as Positional Facts
- RDF triples map to positional facts, wherethe
Property maps to a binary relation,the
Subject to its first argument, andthe
Object to its second argument
"http//www.w3.org/Home/Lassila has creator
Ora Lassila" ltfactgt lt_headgt ltatomgt
lt_oprgt ltrel href"http//dublincore.org/docu
ments/dces/index.shtml.rdfCreator"/gt
lt/_oprgt ltind href"http//www.w3.org/Home/Lass
ila"/gt ltindgtOra Lassilalt/indgt lt/atomgt
lt/_headgt lt/factgt
Triples Rules
_head (system) role
5RDF RuleML Triple Roundtrip
Turn the has creator triple, as a RuleML
rulebase, again into RDF
ltrdfRDF xmlnsrdf"rdf" xmlnsruleml"ruleml"
xmlns"ruleml"gt ltrulebasegt lt_clausesgt
ltrdfSeqgt ltrdfligt ltfactgt lt_headgt
ltatomgt lt_oprgt ltrel
href"http//dublincore.org/documents/dces/index.s
html.rdfCreator"/gt lt/_oprgt lt_arggt
ltrdfSeqgt ltrdfligt ltind
href"http//www.w3.org/Home/Lassila"/gt
lt/rdfligt ltrdfligt ltind
rulemlcdata"Ora Lassila"/gt lt/rdfligt
lt/rdfSeqgt lt/_arggt lt/atomgt
lt/_headgt lt/factgt lt/rdfligt
lt/rdfSeqgt lt/_clausesgt lt/rulebasegt lt/rdfRDFgt
Triples Rules
6RDF/RuleML Rules Over Positional Facts
- RDF/RuleML rules over positional (triple-like)
facts provequeried triples, top-down, or derive
new triples, bottom-up
IF "Page has creator Person" THEN
"Page was accessed by Person" ltimpgt
lt_bodygt ltatomgt lt_oprgt ltrel
href"http//dublincore.org/documents/dces/index.s
html.rdfCreator"/gt lt/_oprgt
ltvargtPagelt/vargt ltvargtPersonlt/vargt lt/atomgt
lt/_bodygt lt_headgt ltatomgt lt_oprgt ltrel
href"http//logging.org/vocabulary/xyz.rdfAccess
ed"/gt lt/_oprgt ltvargtPagelt/vargt
ltvargtPersonlt/vargt lt/atomgt lt/_headgt lt/impgt
_body (system) role
Triples Rules
_head (system) role
7RDF Descriptions as Object-Oriented Facts
- Object-Oriented RuleML has been implemented as an
extension of, and XSLT translator to, Positional
RuleML - RDF descriptions map to object-oriented facts,
wherethe Subject maps to a relation (cf. rel.DB
tuples),each Property maps to a role, andeach
Object maps to its filler - The First RDF Triple above becomes the RDF/XML
description on the following slide - This maps to an object-oriented RDF/RuleML fact,
shown underneath
OO Rules
8ltrdfRDFgt xmlnsrdf"http//www.w3.org/1999/02
/22-rdf-syntax-ns" xmlnss"http//dublincore
.org/documents/dces/index.shtml.rdf"gt
ltrdfDescription about"http//www.w3.org/Home/Las
sila"gt ltsCreatorgtOra Lassilalt/sCreatorgt
lt/rdfDescriptiongt lt/rdfRDFgt
resource ? rel literal ? ind
OO Rules
9RDF/RuleML Rules OverObject-Oriented Facts
- RDF/RuleML rules over object-oriented facts can
provequeried descriptions or derive new
description-like facts
ltrulemlrulebasegt ltimpgt lt_bodygt
ltatomgt lt_oprgtltvargtPagelt/vargtlt/_oprgt
lt_r n"sCreator"gtltvargtPersonlt/vargtlt/_rgt
lt/atomgt lt/_bodygt lt_headgt ltatomgt
lt_oprgtltvargtPagelt/vargtlt/_oprgt lt_r
n"tAccessed"gtltvargtPersonlt/vargtlt/_rgt
lt/atomgt lt/_headgt lt/impgt lt/rulemlrulebasegt
IF "Page has creator Person" THEN
"Page was accessed by Person"
OO Rules
10Bottom-Up RDF/RuleML Derivations
ofObject-Oriented Facts
- RDF/RuleML rule over above object-oriented fact
derivesa new description in bottom-up / forward
manner
ltrulemlrulebasegt ltfactgt lt_headgt
ltatomgt lt_oprgtltrel uriref"http//www.
w3.org/Home/Lassila"/gtlt/_oprgt lt_r
n"sCreator"gtltindgtOra Lassilalt/indgtlt/_rgt
lt/atomgt lt/_headgt lt/factgt lt/rulem
lrulebasegt
derives
OO Rules
ltfactgt lt_headgt ltatomgt
lt_oprgtltrel uriref"http//www.w3.org/Home/Lassila"
/gtlt/_oprgt lt_r n"sAccessed"gtltindgtOra
Lassilalt/indgtlt/_rgt lt/atomgt lt/_headgt
lt/factgt
new
11Top-Down RDF/RuleML Queries OverObject-Oriented
Facts
- RDF/RuleML rule over above object-oriented fact
provesa queried description in top-down /
backward manner
ltrulemlquerygt lt_bodygt ltatomgt
lt_oprgtltvargtPagelt/vargtlt/_oprgt lt_r
n"tAccessed"gtltvargtPersonlt/vargtlt/_rgt
lt/atomgt lt/_bodygt lt/rulemlquerygt binds ltvargtP
agelt/vargt to ltrel uriref"http//www.w3.org/Home/
Lassila"/gt and ltvargtPersonlt/vargt to ltindgtOra
Lassilalt/indgt
WHICH "Page was accessed by
Person" ?
OO Queries
12Intermediate Nodes for RDF Descriptions and
Object-Oriented Facts
How to serialize this RDF graph (from MS)
Named Nodes
13Intermediate Nodes for RDF Descriptions and
Object-Oriented Facts (Contd)
- RDF descriptions and object-oriented facts can
employnamed intermediate nodes (e.g., staff IDs
as froma corporate relational DB used as
URIrefs) - The following classical two RDF/XML
descriptionslink Oras homepage with his staff
ID as a named intermediate node
http//www.w3.org/staffId/85740, which gives
further information via literals - These map to two object-oriented RDF/RuleML facts
linked in the same fashion, shown interleaved
Named Nodes
14Named Nodes
15Conjunctive RDF/RuleML Queries OverObject-Oriente
d Node-Linked Facts
- Conjunctive RDF/RuleML query of object-oriented
facts allows a (relational-like) join over a link
variable
ltrulemlquerygt lt_bodygt ltandgt ltatomgt
lt_oprgtltrel uriref"http//www.w3.org/Home/La
ssila"/gtlt/_oprgt lt_r n"sCreator"gtltvargtIDlt
/vargtlt/_rgt lt/atomgt ltatomgt
lt_oprgtltvargtIDlt/vargtlt/_oprgt lt_r
n"vName"gtltvargtNlt/vargtlt/_rgt lt_r
n"vEmail"gtltvargtElt/vargtlt/_rgt lt/atomgt
lt/andgt lt/_bodygt lt/rulemlquerygt binds ltvargtIDlt/
vargt to ltrel uriref"http//www.w3.org/staffId/857
40"/gt and ltvargtNlt/vargt to ltindgtOra
Lassilalt/indgt and ltvargtElt/vargt to
ltindgtlassila_at_w3.orglt/indgt
WHAT IS "/ Home/Lassila Creators
ID" AND "that IDs Name N Email
E" ?
Named Nodes
16Blank Nodes in RDF Descriptions and
Object-Oriented Facts
How to serialize this RDF graph (from MS)
bNodes
17Blank Nodes in RDF Descriptions and
Object-Oriented Facts (Contd)
- RDF descriptions and object-oriented facts can
employanonymous (blank) intermediate nodes (as
implicit in RDFs most abbreviated purely
striped syntax) - The following RDF/XML description embeds in
Oras homepage a blank intermediate node, which
gives two bits of literal information - This maps to an object-oriented RDF/RuleML fact
embedding an object-oriented cterm in a similar
way, shown underneath
bNodes
18ltrdfRDFgt ltrdfDescription about"http//www.w3.
org/Home/Lassila"gt ltsCreatorgt
ltrdfDescriptiongt ltvNamegtOra
Lassilalt/vNamegt ltvEmailgtlassila_at_w3.orglt/
vEmailgt lt/rdfDescriptiongt
lt/sCreatorgt lt/rdfDescriptiongt lt/rdfRDFgt
ltrulemlrulebasegt ltfactgt lt_headgt
ltatomgt lt_oprgtltrel uriref"http//www.w3.or
g/Home/Lassila"/gtlt/_oprgt lt_r
n"sCreator"gt ltctermgt
lt_opcgtltctor/gtlt/_opcgt lt_r
n"vName"gtltindgtOra Lassilalt/indgtlt/_rgt
lt_r n"vEmail"gtltindgtlassila_at_w3.orglt/indgtlt/_rgt
lt/ctermgt lt/_rgt lt/atomgt
lt/_headgt lt/factgt lt/rulemlrulebasegt
bNodes
19RDF/RuleML Rules Over Object-Oriented Facts with
bNode-Embedded Descriptions
- RDF/RuleML rules over object-oriented facts can
alsoprove queried descriptions with embedded
descriptions
ltrulemlrulebasegt ltimpgt lt_bodygt
ltatomgt lt_oprgtltvargtPagelt/vargtlt/_oprgt
lt_r n"sCreator"gtltvargtdescriptionlt/vargtlt/_rgt
lt/atomgt lt/_bodygt lt_headgt
ltatomgt lt_oprgtltvargtPagelt/vargtlt/_oprgt
lt_r n"tAccessed"gtltvargtdescriptionlt/vargtlt/_rgt
lt/atomgt lt/_headgt lt/impgt lt/rulemlruleba
segt
bNodes
20RDF/RuleML Queries Over Object-Oriented Facts
with bNode-Embedded Descriptions
- RDF/RuleML rule over above object-oriented fact
provesa queried description with an embedded
description
ltrulemlquerygt lt_bodygt ltatomgt
lt_oprgtltvargtPagelt/vargtlt/_oprgt lt_r
n"tAccessed"gtltvargtdescriptionlt/vargtlt/_rgt
lt/atomgt lt/_bodygt lt/rulemlquerygt binds ltvargtPag
elt/vargt to ltrel uriref"http//www.w3.org/Home/La
ssila"/gt and ltvargtdescriptionlt/vargt to
ltctermgt lt_opcgtltctor/gtlt/_opcgt
lt_r n"vName"gtltindgtOra Lassilalt/indgtlt/_rgt
lt_r n"vEmail"gtltindgtlassila_at_w3.orglt/in
dgtlt/_rgt lt/ctermgt
bNodes
21Conclusions
- RDF mapped to Object-Oriented RuleMLresource ?
rel element with a uriref attribute literal ?
ind element (then mapped to RDF) - Object-oriented queries can
- employ resource-linked variables in conjunctions
- invoke object-oriented rules in a backward manner
- Object-oriented rules can also be invoked in a
forward manner to derive new OO facts, e.g. using
CommonRules, j-DREW, Jess, or cwm - Handle bNodes in RDF trees via embeddingin
general RDF graphs via generated URIrefs - Model theory can build on RuleMLs
RDF-XML-integrating data model via F-Logic or
TRIPLE
Concs
22References
- Harold Boley Relationships Between Logic
Programming and RDF, in R. Kowalczyk, S.W. Loke,
N.E. Reed, G. Graham (Eds.), Advances in
Artificial Intelligence, LNAI 2112,
Springer-Verlag, 2001 - Harold Boley A Web Data Model Unifying XML and
RDF. Draft, September 2001. - Harold Boley The Rule Markup Language RDF-XML
Data Model, XML Schema Hierarchy, and XSL
Transformations, Invited Talk, INAP2001, Tokyo,
October 2001. - Harold Boley, Said Tabet, and Gerd Wagner
Design Rationale of RuleML A Markup Language for
Semantic Web Rules, Proc. SWWS'01, Stanford,
July/August 2001. - Andreas Eberhart, An Agent Infrastructure based
on Semantic Web Standards, Workshop on Business
Agents and the Semantic Web at the AI 2002,
Calgary, Canada - Andreas Eberhart, Automatic Generation of
Java/SQL based Inference Engines from RDF Schema
and RuleML, International Semantic Web Conference
2002, Sardinia - Benjamin Grosof Representing E-Business Rules
for the Semantic Web Situated Courteous Logic
Programs in RuleML, Proc. Workshop on Information
Technologies and Systems (WITS '01), New Orleans,
December, 2001. - Benjamin Grosof, Mahesh D. Gandhe, and Timothy
W. Finin SweetJess Translating DamlRuleML to
Jess, Proc. International Workshop on Rule Markup
Languages for Business Rules on the Semantic Web,
Sardinia (Italy), June 2002. - Benjamin Grosof and Terrence Poon Representing
Agent Contracts with Exceptions using XML Rules,
Ontologies, and Process Descriptions, Proc.
International Workshop on Rule Markup Languages
for Business Rules on the Semantic Web, Sardinia
(Italy), June 2002. - Steve Ross-Talbot, Harold Boley, and Said Tabet
Playing by the Rules, Application Development
Advisor 6(5), June 2002, 38-43. - Michael Schroeder and Gerd Wagner (Eds.)
Proceedings of the International Workshop on Rule
Markup Languages for Business Rules on the
Semantic Web. Sardinia, Italy, June 14, 2002.
CEUR-WS Publication Vol-60. - Gerd Wagner How to Design a General Rule Markup
Language?, Invited Talk, Workshop XML
Technologien für das Semantic Web (XSW 2002),
Berlin, June 2002.
Refs