1 W3C Rules Interchange Format Basic Logic Dialect Chris Welty IBM Research & RIF WG co-Chair.
-
Upload
tyler-mcnulty -
Category
Documents
-
view
213 -
download
0
Transcript of 1 W3C Rules Interchange Format Basic Logic Dialect Chris Welty IBM Research & RIF WG co-Chair.
1
W3C Rules Interchange FormatBasic Logic Dialect
Chris Welty
IBM Research &
RIF WG co-Chair
2
Rules, rules, rules…
3
The Web Standards
4
Semantic Web Layer Cake V1
5
Semantic Web Layer Cake Vpast
IRI/Unicode
RDF
RDFS
OWL
Rules
Logic
Proof
Trust
Signature
6
Semantic Web Layer Cake Vpresent
IRI/Unicode
RDF
RDFS
Rules
Logic Framework
Trust
Encryption
Proof
OWL
SP
AR
QL
Signature
Standards
RulesRDFS
Rules
7
RIF Background
• Semantic web approach– interoperability requires a formal semantics
• The OWL WG approach– Start with something (DAML+OIL)
• Literally hundreds of rule system implementations– JSR-94, ISO-Prolog, CLIPS, OPS…– http://www.w3.org/2005/rules/wg/wiki/List_of_Rule_Systems– Already several “SW” rule languages
• SWRL, RuleML, WRL, SWSL, KAON2, TRIPLE, JenaRules…– Everyone wants “their” system/technique/theory to be the SW
rule standard• Workshop April ‘05
– http://www.w3.org/2004/12/rules-ws/– Outcome: Nash Equilibrium…
8
Wherefore the RIFt(s)?• OWL DL < OWL < FOL
– Original idea to add full first-order at the logic level– Semantic web very “open world”
• Most back-end DBs support closed queries• Many rule systems have non-FO features
– CWA/NAF– Procedural Attachment– Rule ordering– Non-monotonicity… can’t be layered on OWL
• Not a strict SW layering already– OWL restricted dialects (DL) not layered on (all of) RDF/S
semantics– RDF & RDFS not layered at all
9
Enter the Vendors
• “Rule systems Vendors”– $1B/year existing market– iLog, Fair Isaac, Haley, …
• Database vendors– Oracle, IBM
• OMG PRR effort– Simple production rules– Event-condition-action– Vendors understand the value of standardization– Interchange already a priority– …a common semantics?
10
“One must understand, [rule systems] include a version of negation that is
operationally well-defined. The problem is to make semantic sense of it.”
Fitting, 1999
11
Approach 1
• Define a super-language so expressive that any language can be translated to/from it– The CL and IKL approach
@deprecated: infeasible for this group, as major differences appeared irreconcilable (e.g. non-mon vs. mon)
12
Approach 2
• Define a core language that accounts for the intersection of all rule language capabilities– E.g. Horn, datalog, …
@postponed: The production rule, logic programming, and FO core is not clear
13
Approach 3
• Define a logic-based core and a separate production-rule core. If there is an intersection, define the common core (which may possibly be just a syntax)@version: 0.1 BLD
14
Approach 3a
• Define a framework in the form of a menu of syntactic and semantic features that can be combined into dialects– @version 0.0.1 (FLD)
15
Credits
• BLD Editors– Michael Kifer (U. Stonybrook), Harold Boley (NRCC)
• Active WG members– Adrian Paschke (REWERSE), Axel Polleres (DERI),
Dave Reynolds (HP), Gary Hallmark (ORACLE), Hassan Aït-Kaci (ILOG), Igor Mozetic (JFI), John Hall (OMG), Jos de Bruijn (FUB), Leora Morgenstern (IBM), Mike Dean (SRI), and Stella Mitchell (IBM)
• WG Team– Chris Welty (IBM), Christian de Sainte Marie (ILOG),
and Sandro Hawke (W3C/MIT)
16
BLD Overview
• Definite Horn rules – Disjunction of atoms with exactly one positive literal
• Equality, functions, and a standard first-order semantics
• Syntactic features – objects and frames– internationalized resource identifiers (IRIs) as
identifiers– XML Schema data types and builtins
• XML (1.0) syntax with normative XMLS definition• Non-normative presentation syntax• Metadata and imports
17
Symbols
• Used to identify constants, variables, functions, predicates
• "literal"^^<symspace-identifier>– Notable symbol spaces: xsd:string, rif:local,
rif:iri– “Chris”^^<xsd:string>– “
http://www.w3.org/1999/02/22-rdf-syntax-ns#type”^^<rif:iri>
– “Person1”^^rif:local
18
Rules
• IF <condition> THEN <conclusion>– <condition> aka rule body, antecedant– <conclusion> aka rule head, consquent
• BLD rule:– (Forall var* <conclusion> :- <condition>)– Conclusions may contain conjunction– Conditions may contain conjunction, disjunction, and
existential
• Restrictions on conclusion– No existential, disjunction, external functions
19
Horn Extensions
• Functions and external calls
• Equality (in conclusion and condition)
• Frames– Objects with slots and values– Special syntactic treatment of type and
subclass
• Named argument functions and predicates– However all arguments must be provided
20
Structure
• Rules occur in GroupsGroup( (Forall ?x _Q(?x) :- _P(?x))
(Forall ?x _Q(?x) :- _R(?x)) )
• Groups occur in DocumentsDocument(
Group((Forall ?x _Q(?x) :- _P(?x))
(Forall ?x _Q(?x) :- _R(?x)))
Group((Forall ?y _R(?y) :- ex:op(?y))))
21
Simple ExampleDatabase mapping
Document( Prefix(dbp http://dbpedia.org/property/)Prefix(my http://mydata.org/resource#)Prefix(rdfs http://www.w3.org/2000/01/rdf-schema#)Group ( Forall ?mname ?aname ?movie ?actor
my:actorIn(?aname ?mname) :- And( dbp:starring(?movie ?actor)
rdfs:label(?movie ?mname)rdfs:label(?actor ?aname))))
22
Document( Prefix(dbp http://dbpedia.org/property/)Prefix(my http://mydata.org/resource#)Prefix(rdfs http://www.w3.org/2000/01/rdf-schema#)Group ( Forall ?mname ?aname ?movie ?actor
my:actorIn(?aname ?mname) :- And(?movie[dbp:starring -> ?actor
rdfs:label -> ?mname] ?actor[rdfs:label ?aname])))
Simple Example w/ FramesDatabase mapping
23
Document( Prefix(dbp http://dbpedia.org/property/)Prefix(my http://mydata.org/resource#)Prefix(rdfs http://www.w3.org/2000/01/rdf-schema#)Group ( Forall ?mname ?aname ?movie ?actor
my:actorIn(actor->?aname movie->?mname) :- And(?movie[dbp:starring -> ?actor
rdfs:label -> ?mname] ?actor[rdfs:lasbel ?aname])))
Named Arguments
24
And (Exists ?Buyer (cpt:purchase(?Buyer ?Seller cpt:book(?Author bks:LeRif) curr:USD(49))) ?Seller=?Author )
<And><formula><Exists><declare><Var>Buyer</Var></declare> <formula><Atom><op><Const type="&rif;iri">&cpt;purchase</Const></op> <args ordered="yes"><Var>Buyer</Var> <Var>Seller</Var> <Expr><op><Const type="&rif;iri">&cpt;book</Const></op> <args ordered="yes"> <Var>Author</Var> <Const
type="&rif;iri">&bks;LeRif</Const></args> </Expr> <Expr><op><Const type="&rif;iri">&curr;USD</Const></op> <args ordered="yes"> <Const type="&xsd;integer">49</Const></args> </Expr> </args> </Atom></formula> </Exists></formula> <formula><Equal> <side><Var>Seller</Var></side> <side><Var>Author</Var></side> </Equal></formula></And>
XML Syntax
25
Metadata
• Can hang off any “class element”
<And><meta> <Frame> <object><Const type="rif:local">pd</Const></object> <slot ordered="yes"> <Const type="&rif;iri">&dc;publisher</Const> <Const type="&rif;iri">&w3;W3C</Const> </slot> </Frame> </meta>
<formula>...</formula></And>
26
Metadata
• Can hang off any “class element”
<Group><meta> <Frame> <object><Const type="rif:local">pd</Const></object> <slot ordered="yes"> <Const type="&rif;iri">&dc;publisher</Const> <Const type="&rif;iri">&w3;W3C</Const> </slot> </Frame> </meta>
...</Group>
27
Metadata
• Can hang off any “class element”
<Document><meta> <Frame> <object><Const type="rif:local">pd</Const></object> <slot ordered="yes"> <Const type="&rif;iri">&dc;publisher</Const> <Const type="&rif;iri">&w3;W3C</Const> </slot> </Frame> </meta>
...</Document>
28
Status
• RIF BLD to Last Call June 23
• RIF RDF&OWL to Last Call June 23
• Last call indicates “final version for external review”
• w3.org/2005/rules