0.5setgray0
0.5setgray1
On Logical Foundation of theSemantic Web
An institution-based approach
Dorel Lucanu
{dlucanu}@info.uaic.ro
“Alexandru Ioan Cuza” University, Romania
National university of Singapore, 2005 D. Lucanu: On Logical Foundation of the Semantic Web – p. 1/39
Outline
motivation
institutions
Semantic Web (SW) languagesRDF and RDF SchemaOWLSWRLSWRL FOL
relationships between SW languages
conclusion
National university of Singapore, 2005 D. Lucanu: On Logical Foundation of the Semantic Web – p. 2/39
Motivation
an integrating mathematical structure for Semantic Weblanguages
soundness of the reasoners for Web ontologies
translating Web ontologies into other formalisms
“NOTE: There is a strong correspondence between thesemantics for OWL DL defined in this section(RDF-based) and the Direct Model-Theoretic Semanticsdefined in . . . . If, however, any conflict should ever arisebetween these two forms, then the DirectModel-Theoretic Semantics takes precedence.” (OWLWeb Ontology Language Semantics and Abstract Syntax Section 5.RDF-Compatible Model-Theoretic Semantics,http://www.w3.org/TR/owl-semantics/rdfs.html)
National university of Singapore, 2005 D. Lucanu: On Logical Foundation of the Semantic Web – p. 3/39
Institutions
formalize the notion of "a logic"
study the properties of a logicrepresentationimplementationtranslation of logics
National university of Singapore, 2005 D. Lucanu: On Logical Foundation of the Semantic Web – p. 4/39
Institutions: Ingredients
signatures Σ
formalize vocabulariesExample: (Many Sorted) First Order Logic withEquality (FOLEQ)
Booleans Integers
sorts Bool Int
constants false true : Bool 0 : Int
operations and : Bool Bool→Bool succ pred : Int→Int
× : Int Int→Int
National university of Singapore, 2005 D. Lucanu: On Logical Foundation of the Semantic Web – p. 5/39
Institutions: Ingredients
signatures (continued)
are organized as categories, where the signaturemorphisms formalizes the translations betweenvocabularies
φ : Booleans → Integers
Bool 7→ Intfalse 7→ 0, true 7→ succ(0)and 7→ ×
National university of Singapore, 2005 D. Lucanu: On Logical Foundation of the Semantic Web – p. 6/39
Institutions: Ingredients
sentencesabstracts the notion of formula
is formalized as a functorsen : Sign → Set
sen(Σ) = the set of well-formed first-order formulas builtover Σ(∀ y : Int) y × 0 = 0(∀ y : Bool) y and false = false
if φ : Σ → Σ′ then sen(φ) : sen(Σ) → sen(Σ′)
sen(φ)(y and false = false) = (y × 0 = 0)
Notation: sen(φ)(s)not= φ(s)
National university of Singapore, 2005 D. Lucanu: On Logical Foundation of the Semantic Web – p. 7/39
Institutions: Ingredients
modelsare interpretations of the syntactical constructs
are parameterized over signatures: Mod(Σ) = thecategory of the Σ-models (interpretations of thevovabulary Σ)
are formalized as a functor:Mod : Signop → Cat
if φ : Σ → Σ′ then Mod(φop) : Mod(Σ′) → Mod(Σ)
Z is a model for IntegersMod(φop)(Z) is Z viewed as a model for Booleans
Notation: Mod(φop)(M)not= M�φ
National university of Singapore, 2005 D. Lucanu: On Logical Foundation of the Semantic Web – p. 8/39
Institutions: Ingredients
satisfaction relationrelates the models and the sentences: M |=Σ s
where M is Σ-model and s is a Σ-sentence
it is the subject of the satisfaction condition whichexpresses the invariance of truth under change ofnotation
M ′ |=Σ′ φ(s) iff M ′�φ|=Σ s
where φ : Σ → Σ′, M ′ is a Σ′-model, and s is aΣ-sentence
Z |=Integers y × 0 = 0 iffZ�φ|=Booleans y and false = false
National university of Singapore, 2005 D. Lucanu: On Logical Foundation of the Semantic Web – p. 9/39
Institutions: Specifications and Theories
a specification is a pair (Σ, S), where Σ is a signatureand S is a set of sentences
semantical consequences: (Σ, S) |= s iff(∀M)(M |=Σ S ⇒ M |=Σ s)
a theory is a specfication (Σ, S) s.t.(∀ s)((Σ, S) |= s ⇒ s ∈ S
the inclusion Th → Spec is an equivalence of categories
theoroidal institutions:signatures are theoriesa (Σ, S)-sentence is a Σ-sentence(Σ, S)-models are Σ-models satisfying S
M |=(Σ,S) s iff M |=Σ s
National university of Singapore, 2005 D. Lucanu: On Logical Foundation of the Semantic Web – p. 10/39
Institutions: Properties of interest
theory colimitsthe module expressions are evaluated as colimits oftheories
model amalgamation
expresses the possibility of amalgamation of consistentmodels for different specification modules
liberalityexpresses the possibility of free constructionsgeneralizing the principle of “initial semantics”
National university of Singapore, 2005 D. Lucanu: On Logical Foundation of the Semantic Web – p. 11/39
Relating Institutions
morphism: capture the way in which a “richer”institution is built over a “simpler” one
comorphism: capture the way in which a “simpler”institution is embedded (encoded) into a “richer” one
both are the subject of a corresponding satisfactioncondition
there exist a variety of definitions for morphisms andvariety of definitions for comorphisms in literature
a prover from the target logic can be used to proveproperties from the source logic only if certainconditions are fulfilled
National university of Singapore, 2005 D. Lucanu: On Logical Foundation of the Semantic Web – p. 12/39
Institutions: Main references
Introducing Institutions, by J. Goguen and R. Burstall,1984Institutions: Abstract model theory for specification andprogramming, by J. Goguen and R. Burstall, 1992Structuring theories on consequence, by J. Fiadeiroand A.Sernadas - 1988May I Borrow Your Logic?, by M. Cerioli and J.Meseguer,1993Moving Between Logical Systems, Andrzej Tarlecki,1995Institution Morphisms, by J. Goguen and Gr. Rosu,2002Grothendieck Institutions, by R. Diaconescu
National university of Singapore, 2005 D. Lucanu: On Logical Foundation of the Semantic Web – p. 13/39
Semantic Web
From Semantic Web talk by Tim Berners-Lee at XML 2000
National university of Singapore, 2005 D. Lucanu: On Logical Foundation of the Semantic Web – p. 14/39
RDF
proposed in October 1997
in February 1999 becomes a W3C recommendation
it is a standard for representing information in the Web
a expression in RDF is a collection of triples, eachconsisting of a subject, a property (predicate), and anobject
propertysubject object
National university of Singapore, 2005 D. Lucanu: On Logical Foundation of the Semantic Web – p. 15/39
RDF - example<rdf:Description rdf:about=
"http://www-cs-faculty.stanford.edu/˜knuth/"><hasName rdf:resource="Donald Knuth" />
</rdf:Description>
<rdf:Description rdf:about="http://www.amazon.com/exec/.../104-3442396-7552717">
<hasAuthor rdf:resource="http://www-cs-faculty.stanford.edu/˜knuth/" />
</rdf:Description>
http://.../~knuth/hasAuthor
hasName
http://.../...152717
’Donald Knuth’
National university of Singapore, 2005 D. Lucanu: On Logical Foundation of the Semantic Web – p. 16/39
The institution RDF++
We consider given a datatype D
signatures: Σ = (RR, BN)
sentences: F ::= (s, p, o) | u ≡ v | F ∧ F | ¬ F | (∀ y)F
models: A = (ResA, P ropA, resA, [[ ]]A), whereResA a set of resourcesPropA a set of properties (assume that PropA ⊆ ResA)resA : RR → ResA
[[ ]]A : PropA → P(ResA × (ResA ∪ [[D]]))
satisfaction:A |= (s, p, o) iff resA(p) ∈ PropA and
(resA(s), resA(o)) ∈ [[resA(p)]]AA |= u ≡ v iff resA(u) = resA(v)
National university of Singapore, 2005 D. Lucanu: On Logical Foundation of the Semantic Web – p. 17/39
Interpretation of the blank nodes
Σ = (RR, BN)a Σ-model A and a Σ-sentence s
φ : Σ → Σ′ = (RR ∪ BN, ∅)A |=Σ s iff there is a Σ′-model A′ s.t.
A′�φ= A and A′ |=Σ′ s
The satisfaction of the RDF graphs:
a RDF graf is a set S of triples
A |=Σ S iff A |=Σ ∧s∈S s
which is not always the same with saying that A satisfies allthe sentences in S
National university of Singapore, 2005 D. Lucanu: On Logical Foundation of the Semantic Web – p. 18/39
Interpretation of the blank nodes
Σ = (RR, BN)a Σ-model A and a Σ-sentence s
φ : Σ → Σ′ = (RR ∪ BN, ∅)A |=Σ s iff there is a Σ′-model A′ s.t.
A′�φ= A and A′ |=Σ′ s
The satisfaction of the RDF graphs:
a RDF graf is a set S of triples
A |=Σ S iff A |=Σ ∧s∈S s
which is not always the same with saying that A satisfies allthe sentences in S
National university of Singapore, 2005 D. Lucanu: On Logical Foundation of the Semantic Web – p. 18/39
Interpretation of the blank nodes
Σ = (RR, BN)a Σ-model A and a Σ-sentence s
φ : Σ → Σ′ = (RR ∪ BN, ∅)A |=Σ s iff there is a Σ′-model A′ s.t.
A′�φ= A and A′ |=Σ′ s
The satisfaction of the RDF graphs:
a RDF graf is a set S of triples
A |=Σ S iff A |=Σ ∧s∈S s
which is not always the same with saying that A satisfies allthe sentences in S
National university of Singapore, 2005 D. Lucanu: On Logical Foundation of the Semantic Web – p. 18/39
A specification in RDF++
(Σ, S) ={
({bk , dkhp, hasAuthor , hasName}, ∅),
(bk , hasAuthor , dkhp),
(dkhp, hasName,"Donald Knuth")
}
National university of Singapore, 2005 D. Lucanu: On Logical Foundation of the Semantic Web – p. 19/39
RDF++: properties
SignRDF++ has colimits
e.g., merge:
(RR1 ∩ RR2, ∅) −−−→ (RR1, BN1)yy
(RR2, BN2) −−−→ (RR1 ∪ RR2, BN1∐
BN2)
RDF++ is liberal (free constr. is a generalized Herbrandconstr.)
RDF++ has amalgamation property (Mod(RDF++) preservesfinite limits)
National university of Singapore, 2005 D. Lucanu: On Logical Foundation of the Semantic Web – p. 20/39
The specification RDFV(RDF Vocabulary)
RR(RDF) ={rdf : type, rdf : Property, rdf : list, rdf : nil, . . .}
BN(RDF) = ∅
S(RDF) = {
(rdf : type, rdf : type, rdf : Property),
(rdf : nil, rdf : type, rdf : List),
(∀ s, p, o)(s, p, o) → (p, rdf : type, rdf : Property),
. . .
}
National university of Singapore, 2005 D. Lucanu: On Logical Foundation of the Semantic Web – p. 21/39
RDF Schema
proposed in March 1999
is a standard which describes how to use RDF todescribe RDF vocabularies
it is claimed that it is a semantical extension of RDF
introduces the basic primitives for ontology modeling:classes, subclassessubpropertiesdomain, range. . .
National university of Singapore, 2005 D. Lucanu: On Logical Foundation of the Semantic Web – p. 22/39
RDF Schema: Example
<rdfs:Class rdf:about="Book" />
<rdfs:Class rdf:about="Person" />
<rdfs:Class rdf:about="Author"><rdfs:subClassOf rdf:resource="#Person" />
</rdfs:Class>
<rdf:Property rdf:about="hasAuthor"><rdfs:domain rdf:resource="Book" /><rdfs:range rdf:resource="Author" />
</rdf:Property>
National university of Singapore, 2005 D. Lucanu: On Logical Foundation of the Semantic Web – p. 23/39
RDFS is a theory!RR(RDFS) = RR(RDF) ∪ {rdfs : Class, rdfs : subClassOf,
rdfs : subPropertyOf, rdfs : domain, . . .}BN(RDFS) = those used in sentences
S(RDFS) = S(RDF) ∪
{
(rdf : type, rdfs : domain, rdfs : Resource),
(rdfs : domain, rdfs : domain, rdf : Property),
(∀ u, v , x, y)(x, rdf : domain, y) ∧ (u, x, v) → (u, rdf : type, y)
(∀ x, y)(x, rdfs : subClassOf, y) → (x, rdf : type, rdfs : Class),
(∀ x, y)(x, rdfs : subClassOf, y) → (y , rdf : type, rdfs : Class),
(∀ u, x, y)(x, rdfs : subClassOf, y) ∧ (u, rdf : type, x) → (u, rdf : type, y),
. . .
}
National university of Singapore, 2005 D. Lucanu: On Logical Foundation of the Semantic Web – p. 24/39
The institution RDFS
signatures: theory morphisms RDFS → (Σ, S)
(Sign(RDFS) is a comma category)RDFS → (Σ, S) how use RDF to describe RDF vocabularies
sentences: Σ-sentences
models: (Σ, S)-modelsMod(Σ, S) → Mod(RDFS) → ModRDF semantical extension
satisfaction: A |=RDFS→(Σ,S) s iff A |=Σ s
semantics of a class:[[C]]A = {x | A |= (x, rdf : type, C)}
There is a simple theoroidal comorphism from RDFS toRDF++.
National university of Singapore, 2005 D. Lucanu: On Logical Foundation of the Semantic Web – p. 25/39
OWL
proposed in March 2002a language used to describe Web ontologieshas three levels: OWL LITE, OWL DL, OWL Fullincludes RDF Schemanew items:
makes distinction between individual-valuedproperties and data-valued propertiescardinality restrictionsoperations with classesrestrictions on propertiesontology imports. . .
National university of Singapore, 2005 D. Lucanu: On Logical Foundation of the Semantic Web – p. 26/39
OWL: Example
each book has at least one author
<owl:Class rdf:ID="Author"><rdfs:subClassOf>
<owl:Restriction><owl:onProperty rdf:resource=
"#hasAuthor" /><owl:minCardinality rdf:datatype=
"#&xsd;nonNegativeInteger">1</owl:minCardinality>
</owl:Restriction></rdfs:subClassOf>
</owl:Class>
National university of Singapore, 2005 D. Lucanu: On Logical Foundation of the Semantic Web – p. 27/39
OWL is also a theory!RR(OWL) = RR(RDFS)∪{owl : Thing, owl : Class, owl : subClassOf,
owl : ObjectPropertyO, owl : DatatypeProperty, . . .}BN(OWL) = those used in sentences
S(OWL) = S(RDFS) ∪
{
(owl : Nothing, rdf : type, owl : Class),
(owl : Thing, rdf : type, owl : Class),
¬(∃ x)(x, rdf : type, owl : Nothing),
(∀ x, C)(x, rdf : type, C) ∧ (C, rdf : type, owl : Class) →
(x, rdf : type, owl : Thing), . . .
}
There is a forgetful morphism from OWL to RDFS.There is a simple theoroidal comorphism from OWL to RDF++.
National university of Singapore, 2005 D. Lucanu: On Logical Foundation of the Semantic Web – p. 28/39
OWL DL hides some vocabulary itemsΣ(OWLDL) = hide
rdf:type, rdf: Property,...,owl: TransitiveProperty,...
inΣ(OWL)
. . . and adds some new constraints:
DLCONSTR = {
(∀ x, C)(x, rdf : type, owl : Thing) ∧ (C, rdf : type, owl : Class) →
¬(x ≡ C),
. . .
}
φ : Σ(OWLDL) ↪→ Σ(OWL)Mod(OWLDL) = {A�φ | A ∈ Mod(OWL) ∧ A |= DLCONSTR}
National university of Singapore, 2005 D. Lucanu: On Logical Foundation of the Semantic Web – p. 29/39
The institution OWL
signatures: theory morphisms OWL → (Σ, S)
(Sign(OWL) is a comma category)
sentences: Σ-sentences
models: (Σ, S)-models
satisfaction: A |=(Σ,S) s iff A |=Σ s
There is a forgetful morphism from OWL to RDFS.
There is a simple theoroidal comorphism from OWL to RDF++.
National university of Singapore, 2005 D. Lucanu: On Logical Foundation of the Semantic Web – p. 30/39
OWL: problems with amalgamation
PETS + BOOKS
PETS
-
BOOKS
�
can we amalgamate a PETS-model A1 andBOOKS-model A2 in a PETS+BOOKS model?
NO if [[owl : Thing]]A16= [[owl : Thing]]A2
National university of Singapore, 2005 D. Lucanu: On Logical Foundation of the Semantic Web – p. 31/39
OWL: problems with amalgamation
solution: transform such a diagram into a pushout
PETS + BOOKS
PETS
-
BOOKS
�
∅
φ2
-
�
φ1
we have to consider a ∅-model A0
A1 and A2 are consistent iff A1�φ1= A = A2�φ2
National university of Singapore, 2005 D. Lucanu: On Logical Foundation of the Semantic Web – p. 32/39
SWRL
proposed in November 2004extends OWL with Horn rulesexample: citation implies not self-citation
<ruleml:imp><ruleml:_body>
<swrlx:individualPropertyAtom swrlx:property="writtenBy"><ruleml:var>x1</ruleml:var><ruleml:var>x2</ruleml:var>
</swrlx:individualPropertyAtom>...
</ruleml:_body><ruleml:_head>
...</ruleml:_head>
</ruleml:imp>
National university of Singapore, 2005 D. Lucanu: On Logical Foundation of the Semantic Web – p. 33/39
The institution SWRL
signatures: OWL signatures
sentences:
writtenBy(x1, x2) ∧ citedBy(x1, x3) → x2 6= x3.
models: OWL models
satisfaction: as in OWL and HornLog
There is a forgetful morphism from SWRL to OWL.
There is a simple theoroidal comorphism from SWRL toRDF++.
National university of Singapore, 2005 D. Lucanu: On Logical Foundation of the Semantic Web – p. 34/39
SWRL FOLproposed in November 2004extends OWL with first-order formulasexample: any cited author has written a paper which iscited by someone else
<Assertion owlx:name="Example"><Forall>
<ruleml:var>x1</ruleml:var><Implies><swrlx:classAtom owlx:name="CitedAuthor"><owlx:Class owlx:name="CitedAuthor" /><ruleml:var>x1</ruleml:var>
</swrlx:classAtom><Exists>...
</Exists></Implies>
</Forall></Assertion
National university of Singapore, 2005 D. Lucanu: On Logical Foundation of the Semantic Web – p. 35/39
The institution SWRLFOL
signatures: OWL signatures
sentences:
(∀ x1)CitedAuthor(x1) → (∃ x2, x3)writtenBy(x2, x1) ∧
citedBy(x2, x3)
models: OWL models
satisfaction: as in OWL and FOL
There is a forgetful morphism from SWRLFOL to SWRL.
There is a simple theoroidal comorphism from SWRLFOL toRDF++.
National university of Singapore, 2005 D. Lucanu: On Logical Foundation of the Semantic Web – p. 36/39
Relationships between SW logics
SWRLFOL −−−→ RDF++y =
SWRL −−−→ RDF++y =
OWL −−−→ RDF++y =
RDFS −−−→ RDF++
−−−→ morphism
−−−→ comorphism
National university of Singapore, 2005 D. Lucanu: On Logical Foundation of the Semantic Web – p. 37/39
Conclusioncontributions
the institution RDF++RDFS, OWL, SWRL, and SWRLFOL are in facttheories in RDF++the institutions RDFS, OWL, SWRL, and SWRLFOL definedas particular theoroidal institutionsthe relationships between these institutions
advantages:a rigurous and systematic approach of the logicsunderlying SW languagesan important step towards structuring and re-usingontology partsa solid framework for relating SW languages with otherformalisms and for proving the soundness of thereasoners
National university of Singapore, 2005 D. Lucanu: On Logical Foundation of the Semantic Web – p. 38/39
Questions?
Thank you!
National university of Singapore, 2005 D. Lucanu: On Logical Foundation of the Semantic Web – p. 39/39