30
Three words about RDF University of Rome "Tor Vergata" ART: Artificial Intelligence Research @ Tor Vergata Author Manuel Fiorelli <[email protected] > Date May 11 2012 lastupdate: Mon, 15 May 2012 14:50:00 +0000

Three words about RDF University of Rome "Tor Vergata" ART: Artificial Intelligence Research @ Tor Vergata Author Manuel Fiorelli Date May 11 2012 lastupdate:

Embed Size (px)

Citation preview

Page 1: Three words about RDF University of Rome "Tor Vergata" ART: Artificial Intelligence Research @ Tor Vergata Author Manuel Fiorelli Date May 11 2012 lastupdate:

Three words about RDF

University of Rome "Tor Vergata"ART: Artificial Intelligence Research @ Tor Vergata

Author

Manuel Fiorelli<[email protected]>

Date

May 11 2012lastupdate: Mon, 15 May 2012 14:50:00 +0000

Page 2: Three words about RDF University of Rome "Tor Vergata" ART: Artificial Intelligence Research @ Tor Vergata Author Manuel Fiorelli Date May 11 2012 lastupdate:

Introduction (1)

Humans know something about the world, when they have an idea about the possible ways the world is arranged. Humans rely on that mental model of the world to:●figure out things they have not been told explicitly;●foresee how the world will evolve or react to their actions;●to plan the interaction with the environment.

The idea behind knowledge based systems is to provide machines with a finite set of explicitly represented ideas (a knowledge base), which may allow machines to reason in a way that may replace the human thinking.

Page 3: Three words about RDF University of Rome "Tor Vergata" ART: Artificial Intelligence Research @ Tor Vergata Author Manuel Fiorelli Date May 11 2012 lastupdate:

Introduction (2)

The basic idea about the world is the fact that two things are related in some way (e.g. bob is married to jane). The simplest knowledge base comprises a finite set of those relation assertions (i.e. a triple, in RDF). RDF (Resource Description Framework) is a Recommendation from the W3C going on that direction.RDF-PRIMER:"RDF is based on the idea of identifying things using Web identifiers (called Uniform Resource Identifiers, or URIs), and describing resources in terms of simple properties and property values. This enables RDF to represent simple statements about resources as a graph of nodes and arcs representing the resources, and their properties and values".

Page 4: Three words about RDF University of Rome "Tor Vergata" ART: Artificial Intelligence Research @ Tor Vergata Author Manuel Fiorelli Date May 11 2012 lastupdate:

Outline

Abstract syntaxA conceptualization over the available syntaxes, allowing to manage RDF descriptions from a more abstract point of view. 

Concrete syntaxesDefine how RDF descriptions are written concretely: in general, as sequences of characters.There will be several concrete syntaxes to meet different requirements: eg. human readability, memory occupation, .... 

Model Theoretic SemanticsDefines how to interpret an RDF description. It is built on top of the abstract syntax.

Page 5: Three words about RDF University of Rome "Tor Vergata" ART: Artificial Intelligence Research @ Tor Vergata Author Manuel Fiorelli Date May 11 2012 lastupdate:

Abstract syntax

●GraphoTriple

URI Blank Node Literal

o VocabularyoSyntactic freedomoMerge

 

Page 6: Three words about RDF University of Rome "Tor Vergata" ART: Artificial Intelligence Research @ Tor Vergata Author Manuel Fiorelli Date May 11 2012 lastupdate:

Abstract Syntax - RDF Graph

A (RDF) graph is a set* of triples. *Order and multiplicity of triples are not relevant.

A triple is made of a subject, a predicate and an object.

The subject may be a URI or a blank node.The predicate may be a URI.The object may be a URI, a blank node or a literal. The sets of URIs, blank nodes and literals are pairwise disjoint.

Two triples are equal if their corresponding components are equal (see next slides).

Page 7: Three words about RDF University of Rome "Tor Vergata" ART: Artificial Intelligence Research @ Tor Vergata Author Manuel Fiorelli Date May 11 2012 lastupdate:

Abstract Syntax- URI

A URI is a uniform resource identifier (as per RFC 2396) with additional constraints (e.g. they have to be absolute). Two URIs are equal if they compare as equal character by character as strings.  Concrete syntaxes may allow alternatives to absolute URI:●qualified names●even, relative URIs

but those constructs ultimately have to be mapped to absolute URI by the interpreter.

Page 8: Three words about RDF University of Rome "Tor Vergata" ART: Artificial Intelligence Research @ Tor Vergata Author Manuel Fiorelli Date May 11 2012 lastupdate:

Abstract Syntax - Blank node

A blank node (BNode) is a term drawn from an infinite set of distinguished terms.

The set of blank nodes is somewhat arbitrary, provided that it is disjoint from both the sets of URIs and the set of literals.

The abstract syntax only requires that given two blank nodes it is possible to ascertain whether they are equal or not.

Page 9: Three words about RDF University of Rome "Tor Vergata" ART: Artificial Intelligence Research @ Tor Vergata Author Manuel Fiorelli Date May 11 2012 lastupdate:

Abstract Syntax - Literal (1)

A literal identifies a value by means of a lexical representation.A literal is made up  of:●a lexical form (being a UNICODE string in Normal Form C)●and optionally,oeither, a language tag (RFC-3066), normalized to lower

caseoor, a datatype URI (e.g. http://www.w3.org/2001/XMLSchema#integer)

A literal is said to be: ●a typed literal, if it has a datatype URI●a plain literal, otherwise.

Page 10: Three words about RDF University of Rome "Tor Vergata" ART: Artificial Intelligence Research @ Tor Vergata Author Manuel Fiorelli Date May 11 2012 lastupdate:

Abstract Syntax - Literal (2)

Two literals are equal if their lexical forms compare as equal character by character and both:●have language tags comparing as equal,●have a datatype URI comparing as equal,●have no optional part.

 

Page 11: Three words about RDF University of Rome "Tor Vergata" ART: Artificial Intelligence Research @ Tor Vergata Author Manuel Fiorelli Date May 11 2012 lastupdate:

Abstract SyntaxNames and VocabularyURIs and literals are called collectively names. A vocabulary is a set of names. The vocabulary of an RDF graph is the set of names occurring within its triples. Note that the datatype URI within a typed literal has not to belong to the vocabulary of the graph. 

Page 12: Three words about RDF University of Rome "Tor Vergata" ART: Artificial Intelligence Research @ Tor Vergata Author Manuel Fiorelli Date May 11 2012 lastupdate:

Abstract Syntax - Freedom

RDF has a very free syntax, since the same URI may be used as a predicate, a subject or an object.

When dealing with formal reasoning over RDF descriptions, this freedom has to be reduced in some extent, in order to avoid undecidability issues. Another issue is the computational complexity of those tasks.

Informally a task is said to be undecidable iff it is not decidableiffthere is no always-halting Turing Machine solving it

Page 13: Three words about RDF University of Rome "Tor Vergata" ART: Artificial Intelligence Research @ Tor Vergata Author Manuel Fiorelli Date May 11 2012 lastupdate:

Abstract Syntax - Merge

Given a set G of RDF graphs, their merge is an RDF graph whose set of triples is the union of the set of triples obtained from each graph renaming the blank nodes so that they are not shared by any two graphs.

The ability to easy merge RDF graphs is regarded as an important feature of RDF, towards the solution of the integration problem.

Page 14: Three words about RDF University of Rome "Tor Vergata" ART: Artificial Intelligence Research @ Tor Vergata Author Manuel Fiorelli Date May 11 2012 lastupdate:

Graphical notation

ex:manuel ex:armandoex:knows

ex:hasAddress

Via del Politecnico, 1

ex:street

Rome

ex:city

00173

ex:zipCode

For the sake of clarity URIs are abbreviated with qnames (assuming that a suitable mapping of prefixes exists)

Page 15: Three words about RDF University of Rome "Tor Vergata" ART: Artificial Intelligence Research @ Tor Vergata Author Manuel Fiorelli Date May 11 2012 lastupdate:

Concrete syntaxes

Page 16: Three words about RDF University of Rome "Tor Vergata" ART: Artificial Intelligence Research @ Tor Vergata Author Manuel Fiorelli Date May 11 2012 lastupdate:

Concrete syntaxes Turtle: Terse RDF Triple LanguageTurtle is a textual (concrete) syntax for RDF, allowing for a compact and human friendly representation of an RDF description.

@prefix ex: <http://example.org/ns#> . ex:manuel ex:knows ex:armando . ex:armando ex:hasAddress [    ex:street "Via del Politecnico, 1" ;     ex:zipCode "00040" ;    ex:city "Rome"] .

ex:city is a qualified name standing for the URI obtained concatenating http://example.org/ns# and city.

Page 17: Three words about RDF University of Rome "Tor Vergata" ART: Artificial Intelligence Research @ Tor Vergata Author Manuel Fiorelli Date May 11 2012 lastupdate:

Model theoretic semantics

●InterpretationoSimple Interpretation

Denotation of ground graphs Denotation of graphs (possibly with blank nodes) Satisfaction Entailment Inference

  

Page 18: Three words about RDF University of Rome "Tor Vergata" ART: Artificial Intelligence Research @ Tor Vergata Author Manuel Fiorelli Date May 11 2012 lastupdate:

Model theoretic semantics

An RDF description states a set of constraints over the possible ways the world is arranged: the only admissible configurations are those that make the description true.

The truth of an RDF description is formally defined by the model theoretic semantics by means of the notion of interpretation

An interpretation is a formal account of those aspects of a (possible) world which are sufficient to establish the truth or the falsity of a graph. An interpretation is always relative to a vocabulary.

 There will be different interpretations associated with different levels of understanding of the vocabulary.

Page 19: Three words about RDF University of Rome "Tor Vergata" ART: Artificial Intelligence Research @ Tor Vergata Author Manuel Fiorelli Date May 11 2012 lastupdate:

Model theoretic semantics:Simple Interpretation (1)A simple interpretation does not pay a particular attention to any name in the vocabulary V.  

A simple interpretation I of a vocabulary V is a quintuple<IR, IP, IEXT, IS, IL>, where:●A non-empty set IR of resources, called the domain or

universe of I. ●A set IP, called the set of properties of I. ●A mapping IEXT from IP into the powerset of IR x IR.●A mapping IS from URI references in V into (IR IP).∪●A mapping IL from typed literals in V into IR*.●A distinguished subset LV of IR, called the set of literal

values, which contains all the plain literals in V.*a malformed typed literal has to be mapped into a not-a-value resource 

Page 20: Three words about RDF University of Rome "Tor Vergata" ART: Artificial Intelligence Research @ Tor Vergata Author Manuel Fiorelli Date May 11 2012 lastupdate:

Model theoretic semantics:Simple Interpretation (2)RDF assumes that any URI is used consistently: i.e. always denotes the same thing.

A thing may have:●multiple names (non-unique name assumption)●no name

Page 21: Three words about RDF University of Rome "Tor Vergata" ART: Artificial Intelligence Research @ Tor Vergata Author Manuel Fiorelli Date May 11 2012 lastupdate:

Simple InterpretationDenotation of ground graphs (1)An RDF graph is said to be ground if it does not contain any blank node. Given a ground graph G whose vocabulary is V and a simple interpretation I of V, the denotation of G is defined by structural induction over the abstract syntax as follows: if E is a plain literal "aaa" in V then I(E) = aaaif E is a plain literal "aaa"@ttt in V then I(E) = <aaa, ttt>if E is a typed literal in V then I(E) = IL(E)if E is a URI reference in V then I(E) = IS(E)

Page 22: Three words about RDF University of Rome "Tor Vergata" ART: Artificial Intelligence Research @ Tor Vergata Author Manuel Fiorelli Date May 11 2012 lastupdate:

Simple InterpretationDenotation of ground graphs (2)if E is a ground triple s p o. then I(E) = true if s, p and o are in V, I(p) is in IP and <I(s),I(o)> is in IEXT(I(p))otherwise I(E) = false.

if E is a ground RDF graph then I(E) = false if I(T) = false for some triple T in E, otherwise I(E) = true. The two conditions above:

●can deal with triples whose components do not belong to the vocabulary V●do not apply when there are blank nodes.

Page 23: Three words about RDF University of Rome "Tor Vergata" ART: Artificial Intelligence Research @ Tor Vergata Author Manuel Fiorelli Date May 11 2012 lastupdate:

Simple InterpretationBlank nodes (1)Blank nodes can be thought as existentially quantified variables which assert the existence of a resource (belonging to IR), without explicitly giving them a name.

The denotation of an RDF graph with blank nodes requires two additional semantic conditions. If E is an RDF graph then I(E) = true if [I+A'](E) = true for some mapping A' from blank(E) to IR, otherwise I(E) = false If E is a blank node and A(E) is defined then [I+A](E) = A(E)

Page 24: Three words about RDF University of Rome "Tor Vergata" ART: Artificial Intelligence Research @ Tor Vergata Author Manuel Fiorelli Date May 11 2012 lastupdate:

Simple InterpretationBlank nodes (2)Suppose M is a map from a set of blank nodes to some set of literals, URIs and blank nodes;given a graph G, the graph obtained replacing some or all the blank nodes is said to be an instance of G.

Page 25: Three words about RDF University of Rome "Tor Vergata" ART: Artificial Intelligence Research @ Tor Vergata Author Manuel Fiorelli Date May 11 2012 lastupdate:

Simple InterpretationSatisfactionThe satisfaction is a binary relation between an interpretation I and an RDF graph G, I G, such that I(G) = true.⊨ If an agent knows the intended interpretation of a vocabulary, then it is able to assess the truth of any RDF graph. However, in general machines do not "know" the intended interpretation of a vocabulary, thus they have to rely on the notion of entailment.

An RDF graph divides interpretations into two groups: those that satisfy the graph and those that do not satisfy it.

Page 26: Three words about RDF University of Rome "Tor Vergata" ART: Artificial Intelligence Research @ Tor Vergata Author Manuel Fiorelli Date May 11 2012 lastupdate:

Simple InterpretationEntailment A set S of RDF graphs (simply) entails an RDF graph G, S ⊨G, if:for all simple interpretation I . (for all E in S . I E) implies I ⊨ ⊨G In other words, if the graphs in S are true (whatever they mean according to any of the possible interpretations), then G must be true. Merging lemma. The merge of a set S of RDF graphs is entailed by S, and entails every member of S. Hence, a set of graphs may be regarded as a single graph (the merge).  

Page 27: Three words about RDF University of Rome "Tor Vergata" ART: Artificial Intelligence Research @ Tor Vergata Author Manuel Fiorelli Date May 11 2012 lastupdate:

Simple InterpretationInferenceSince entailment does not depend on the intended interpretation, it should be possible to ascertain whether it holds or not by means of syntactic manipulation of those graphs.An inference system allows to pass from known graphs to another graph solely by symbolic manipulation. If the latter is guaranteed to be entailed, then the procedure is said to be correct or valid. For simple entailment a complete and sound inference system is established by the interpolation lemma:S entails a graph E if and only if a subgraph of S is an instance of E. The reasoning procedure is in fact a graph matching algorithm, which is guaranteed to terminate (hence, it is decidable).

Page 28: Three words about RDF University of Rome "Tor Vergata" ART: Artificial Intelligence Research @ Tor Vergata Author Manuel Fiorelli Date May 11 2012 lastupdate:

Conclusions

The presentation is based on the current version of the RDF Recommendation. The RDF Working Group, part of the Semantic Web Activity, is working on a revision of the RDF Recommendation.

The major updates so far:●IRIs replace URIs;●language tagged literals replace plain literals;●language tag are defined per BCP 47.

Page 29: Three words about RDF University of Rome "Tor Vergata" ART: Artificial Intelligence Research @ Tor Vergata Author Manuel Fiorelli Date May 11 2012 lastupdate:

What is going on

●Vocabulary entailment●Time and modalities in RDF●Linked Data

Page 30: Three words about RDF University of Rome "Tor Vergata" ART: Artificial Intelligence Research @ Tor Vergata Author Manuel Fiorelli Date May 11 2012 lastupdate:

References

1.Frank Manola and Eric Miller, Editors. RDF Primer, W3C Recommendation, 10 February 2004.

2.Graham Klyne and Jeremy J. Carroll, Editors. Resource Description Framework (RDF): Concepts and Abstract Syntax, W3C Recommendation 10 February 2004.

3.Patrick Hayes, Editor. RDF Semantics. W3C Recommendation, 10 February 2004.

4.Ronald Brachman and Hector Levesque. Knowledge Representation and Reasoning, The Morgan Kaufmann Series in Artificial Intelligence, Morgan Kaufmann, June 2, 2004.

5.Alberto Pettorossi and Maurizio Proietti. First Order Predicate Calculus and Logic Programming, Second Edition, Aracne Editrice, 2005.

6.Alberto Pettorossi. Elements of Computability, Decidability, and Complexity, Third Edition, Aracne Editrice, 2009.

7.Alberto Pettorossi. Semantics of Programming Languages, Second Edition, Aracne Editrice, 2011