Jan maluszynski link ping university sweden
1 / 35

On Integrating Rules into the Semantic Web - PowerPoint PPT Presentation

  • Uploaded on

Jan Maluszynski Linköping University Sweden. On Integrating Rules into the Semantic Web. Overview. “Semantic Web” – do we need it? XML and web languages Rules on the web: the RuleML approach The W3C vision of the Semantic Web Towards typed rules Summary. Do we need ”Semantic Web”?.

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about ' On Integrating Rules into the Semantic Web' - avent

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Jan maluszynski link ping university sweden

Jan Maluszynski

Linköping University


On Integrating Rules intothe Semantic Web

WFLP'03, Valencia


  • “Semantic Web” – do we need it?

  • XML and web languages

  • Rules on the web: the RuleML approach

  • The W3C vision of the Semantic Web

  • Towards typed rules

  • Summary

WFLP'03, Valencia

Do we need semantic web
Do we need ”Semantic Web”?

  • Google query: FLP ?

    gives ~170 000 answers: Forever Living Products Family Living Program Forest Legacy Program Finish Line Performance … I admit, the query is not smart…

  • Functional Logic Programming Conference ?

    Michael Hanus

    Conferences related to FLP …WFLP

WFLP'03, Valencia

Adding semantics to the contents
Adding semantics to the contents

  • Annotate web content with a description of its meaning => metadata

    FLP – is a branch of CS Workshop is a Conference Symposium is a Conference

  • Use metadata for reasoning/querying FLP conference / CS? => WFLP, FLOPS

  • Logical foundations?

  • Various web languages needed: how to define them? what is their semantics?

WFLP'03, Valencia


  • Can a software agent plan my travel to WFLP ?Constraints/preferences expressed as rules?

  • Database views

  • Bussiness rules

  • Using them on the web?

WFLP'03, Valencia

Web needs standards
Web needs standards

  • Standard notation for data: XML

  • Standard for creating unique names:


  • Standard for defining web languages

    (sets of XML elements):

    XML Schema, (DTD)

WFLP'03, Valencia




<person age=“25”>

<name>John Smith </name>


<street> Dalav. 21 </street>

<city> Lund </city>







John Smith

Dalav. 21


Tags, Attributes,

  • Standard format facilitates:

  • Definition of self-describing structured data

  • Integration from various sources

WFLP'03, Valencia

Is xml element a term
Is XML element a term ?

<CD price="10.90$" year="1985">

Empire Burlesque

<artist>Bob Dylan</artist>





Empire Burlesque,

artist[Bob Dylan],




Arity of function symbols is not predefined;unordered subterms

WFLP'03, Valencia

Creating unique names
Creating unique names

  • Universal Resource Identifier: URI

    identifies unique resource

    special case: URL

  • Used for creating unique names Namespaces

    The URL may point to a description of the names

    (unique meaning?).

<contact xmlns:work="http://www.liu.ida.se/">

<name>John Smith</name>




WFLP'03, Valencia

Defining a web language syntax
Defining a web language: syntax

  • Language: a set of XML elements

  • Elements ~ trees Define language as a tree-grammar (DTD), place on web

    could we define language in XML?

  • XML Schema language: elements are XML documents

    for any XML Schema document S:

    • The meaning of S is a set of XML documents L(S)

      the function L is the semantics of XML Schema

    • standard on-line validator can check whether any given XML document is in L(S);

    • The validator implements the semantics of the XML Schema

WFLP'03, Valencia

A flavour of xml schema
A flavour of XML Schema

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">

< xsd: element name=“purchaseOrder” type=“POT” />

< xsd: complexType name=“POT”/>

< xsd: sequence>

< xsd: element name=“addr” type=“USAddress”/>

< xsd: element name=“items” type=“Items”/>

< /xsd: sequence>

< xsd: attribute name=“orderDate” type=“xsd:date”/>

< /xsd: complexType>


< / xsd: schema>

Roughly reflected by a rule:

POT  purchaseOrder(USAddress Items)

WFLP'03, Valencia

Regular tree grammars for xml languages
Regular tree grammars for XML languages

ERTG: Nonterminals X in N{POT, USAddr,…}

Terminals t{pOrder, addr,…}/XML tags

Start S in NPOT

Rules X t ( R) R - a regular expression over N














POT   pOrder( USAddr Items) USAddr  addr( Mail Street ZIP City State) Items  items( Item*) Item  it(Artno Quantity) ….





it …

art …

qua …

WFLP'03, Valencia

Regular tree languages
Regular tree languages

  • RTG: each function symbol has fixed arity

    ERTG: arguments of a function symbol defined by a regular expression

  • Regular tree language: a language defined by an RTG

  • Regular tree languages are closed under:

    • intersection

    • union

    • Inclusion is decidable

  • The same holds for languages defined by ERTG

WFLP'03, Valencia

Defining web languages summary
Defining web languages: summary

  • XML schema S defines syntax of L L=L(S)

  • Saccessible by a URL

  • A document x can be validated wrt S x  L ? XML Schema validators

  • Operational semantics: an interpreter for L accessible on the web

  • Declarative semantics ?

WFLP'03, Valencia

Ruleml rules on the web
RuleML: rules on the web

  • Rule Markup Language Initiative:

    => Standardize mark-up for selected rule languages!

    A small family sufficient to embed various applications (?)

  • Develop XML schema for XML encoding of a rule language L e.g. for Datalog

  • Put it on the web: URL

    • Operational semantics: rule engine(s)

    • Declarative semantics,

XML code

XML code

XML schema for L

L Rules in syntax 1

L Rules in syntax 2

WFLP'03, Valencia

Logic on the web
Logic on the web

  • Define XML syntax for logic languages (different logics) Model-theoretic semantics, Automatic reasoners

  • Proposed logics include:

    • Description logics (work in progress DAML+OIL, OWL)

    • Datalog….

      In a chosen logic:

  • Provide a set of formulae (encoded in XML) specific axioms

  • Automatic reasoning system answers queries

WFLP'03, Valencia

W3c view of the semantic web
W3C view of the Semantic Web

  • Layers of tightly connected langugages.

    XML provides the syntactic basis for all layers

  • What are the connections between the layers?



RDF Schema


XML + NS + XML Schema



WFLP'03, Valencia

Rdf rdf schema
RDF + RDF Schema

  • A (still evolving) notation encoded in XML [Beckett D. (ed.) 2002]

  • For modeling application domains Classes, Subclasses, Properties(Slots), Literals

  • Basic construct: sentence:Subject Predicate Object

    • Encoded in XML,

    • Can be seen as ground atomic formula,

    • Represented as graph

  • Model theoretic semantics [P. Hayes (ed.) 2003]

  • Editors, query tools exist

WFLP'03, Valencia

A flavour of rdf schema
A flavour of RDF Schema


s = rdfs:subClassOf

t = rdf:type





















WFLP'03, Valencia

Description logics
Description Logics

  • A family of KR formalisms, based on FOPL decidable, supported by automatic reasoning systems

  • Used for modelling of application domains

  • Classification of concepts and individuals concepts (unary predicates), subconcept (subsumption), roles (binary predicates), individuals (constants), constructors for building concepts, equality …

    [Baader et al. 2002]

WFLP'03, Valencia

Example dl al

R atomic role, A atomic concept

C,D  A | (atomic concept)

T | (universal concept)

 | (bottom concept)

A | (atomic negation)

C  D | (intersection)

R.C |(value restriction)

 R.T | limited ex. Quantification

Add more constructors: another DL

RI I I AI  I

TI = I

I = Ø

(A)I = I \ AI

(CD)I = CIDI

( R.C)I =

{a  I|b.(a,b) RIb CI }

( R.T)I = {a  I| b.(a,b) RI}

Example DL: AL

WFLP'03, Valencia

Modelling with dls
Modelling with DLs

  • A set of equational axioms T(terminology, T-box)Woman  Person Female Man  Person  Female

  • Automated check for (C, D concepts):

    • Satisfiability of C:

      is there a model I of T such that CI nonempty?

      Man  Woman ?

    • Subsumption: CI DI for every model I of T ?

      Reduces to unsatisfiability C  D

  • Add assertions about individuals: Man(Peter) … Query the obtained knowledge base K. Ground membership query: Person(Peter)?

    Find all the individuals in K that are instances of a given concept

WFLP'03, Valencia

W3c ontology language owl
W3C Ontology Language OWL

  • An expressive description logic Under development [Dean et al. (eds) 2002]

  • Encoded in XML

  • Extending (?) RDFS Some problems with that [Patel-Schneider, Fensel 2002] Ontology: a conceptual model of the application domain; OWL ontology: a set of OWL statements – XML encoding of a set of DL axioms

WFLP'03, Valencia

Rdf schema primitives in dl perspective

Class : Atomic concept

Property: Atomic role

A is a subclass of B: A  B

P is a subproperty of R: P  R

A is a range of R :

T   R.A

A is a domain of R

T   R-.A

RDF Schema primitives in DL perspective

A,B atomic concepts

P,R atomic roles,

T universal concept

( R.C)I =

{a  I|b.(a,b) RIb CI }

R- inverse

WFLP'03, Valencia

Ontologies and xml schema
Ontologies and XML Schema

  • Ontology: a conceptual model of the application domain

  • Data will be represented in XML; document structure must be imposed

  • A systematic approach for translating an ontology into a specific XML Schema [Klein, Fensel et al. 2000]:

    • represent: a class C by an element definition;

    • the properties of C correspond to subelements

    • subclasses modelled by XML Schema extension

    • multiple inheritance cannot be directly expressed

WFLP'03, Valencia

Modeling ontology with rt grammar
Modeling Ontology with RT Grammar ?

Person  p(S (M|W)? T?)

TaxP  p(S (M|W)? T)

M  p( sex(m) W? T?)

W  p( sex(f) M? T?)

T  tax(#Pcdata)

S  sex(m|f)

Man  Person

Woman Person

Taxpayer  Person






WFLP'03, Valencia

Adding rule level
Adding rule level

  • Should build-up on the ontology level

    How ontologies relate to XML data on the web?

  • What kind of rules?

    Datalog, (extensions: negation, prioritized rules, fuzzy,…)

    Query rules for XML-data


  • What kind of integration?

    How to add rules on top of ontologies (RDFS, DLs) ? Integrate Description Logic(s) with Datalog

WFLP'03, Valencia

Integration of datalog with dl 1
Integration of Datalog with DL (1)

CARIN [Levy, Rousset 1998], a family of languages

Two sets of axioms are provided: (1) T-box in a description logic (2)Rules and ground facts:

p1(X1),…,pn(Xn)  q(Y) Xi Y vectors of variables

  • concept predicates, role predicates, can be used in the body but not in the head; the other: ordinary predicates

  • all variables of the head appear in the body; no/limited recursion

  • Ground atomic queries only; special inference procedure needed/provided

WFLP'03, Valencia

Integration of datalog with dl 2
Integration of Datalog with DL (2)

Description Logic Programs [Grosof et al. 2003]

  • A restricted DL language, where DL axioms can be transformed into logically equivalent Horn clauses., e.g. PQ  Q(X) P(X)

  • The syntactic restrictions are somewhat complex

  • DLP is less expressive than DAML+OIL but can model a subset of RDFS

    The advantage: use of LP engines for query answering; non-monotonic extensions possible

WFLP'03, Valencia

Typing datalog with dls
Typing Datalog with DLs

  • Rationale: An ontology describes classes of application data; Rules describe data manipulation;

    Man  Person Woman Person Taxpayer  Person

    lives(X,M), couple(X,Y), interestpaid(Y,Z)  taxdeduction(X,Z,M)

    TYPES: lives: Person, Municipality couple:Man,Woman interestpaid:Person, Amount taxdeduction: Taxpayer, Amount, Municipality

    X:Person  X:Man

    Check in DL : (Man  Person)  Taxpayer NO!

    Clear separation of reasoning in DL from answering Datalog queries;

WFLP'03, Valencia

Typechecking of rules
Typechecking of rules




T(r(X …Y))

q1(X … Y) … qn(X … Y) r(X … Y)




T(X) = T1(X)…Tn(X)

T(Y) = T1(Y)…Tn(Y)

WFLP'03, Valencia

Conceptual vs concrete
Conceptual vs. Concrete

XML encoding


XML Schema



Datalog rules

XML rules ?

WFLP'03, Valencia

Towards a typed xml rule language
Towards a typed XML rule language

  • Query and transformation rule:

    q1,…, qn c

    inproc[[ author[X],title[Y] ]], article[[ author[X],title[Y] ]]  multi[X]

    [[…]] – allows matching term to include additional subterms Xcerpt: Query and Transformation Language [Bry, Schaffert 2002]

  • Types: approximate the XML databaseby a regular tree language T :

    • Matching qi ,c against T gives T(qi ), T(c)

      Matching : intersection of regular tree languages

    • T(qi ) binds variables: T(Xi )

    • Compute T(X)=T(X1 ) …T(Xn), construct T’(c)

    • Check T’(c)  T(c)

WFLP'03, Valencia


  • A perspective of the ongoing development

  • Research issues:

    • Integration of rules and ontologies

    • Deriving XML schemata from ontologies

    • Type checking of rules

      • Datalog rules typed by DLs

      • XML transformation rules typed by RTLs derived from XML schemata

WFLP'03, Valencia


F.Baader, D. Calvanese, D. McGuiness, D.Nardi and P. Patel-Schneider (eds) The Description Logic Handbook. Cambridge University Press, 2002.

D. Beckett (ed.) RDF/XML Syntax Specification (Revised) W3C November 2002.

F.Bry and S. Schaffert. Towards a Declarative Query and Transformation Language for XML and Semistructured Data. Proc. ICLP2002

H.Comon, M.Dauchet, R.Gilleron, F.Jacquemard, D.Lugiez, S.Tison and M. Tommasi. Tree Automata Techniques and Applications. http://www.grappa.univ-lille3.fr/tata

M.Dean, D.Connolly, F.van Harmelen, J.Hendler, I.Horrocks, D.L.McGuiness, P.F.Patel-Scheider and L.A.Stein (Eds.). OWL Web Ontology Language, Reference Version 1.0, W3C,Working Draft November 2002

B. N. Grosof, I. Horrocks, R.Volz and S.Decker. Description Logic Programs: Combining Logic Programs with Description Logic. Proc. of WWW2003, Budapest.

P.Hayes (ed.) RDF Semantics, W3C Working Draft January 2003

M. Klein, D. Fensel, F. van Harmelen andI. Horrocks, The relation between ontologies and schema-languages: translating OIL specifications in XML Schema.Proc of the Workshop on Ontologies and Problem Solving Methods, ECAI 2000

A.Levy and M-C.Rousset. CARIN: A Representation Language Combining Horn rules and Description Logics. Artificial Intelligence 104(1-2), 1998, 165-209.

P.F. Patel-Schneider and D.Fensel. Layering the Semantic Web: Problems and Directions. Proc. ISWC2002, LNCS2342 pp. 16-29

Rule Markup Language Initiative. http://www.ruleml.org

WFLP'03, Valencia