Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge...

55
Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1 / 29

Transcript of Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge...

Page 1: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

Knowledge Representation andSemantic Web

Mario Alviano

University of Calabria, Italy

A.Y. 2017/2018

1 / 29

Page 2: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

Outline

1 Organization

2 Introduction

3 Fundamental questionsLanguagesLogic

4 Overview of the course

2 / 29

Page 3: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

Outline

1 Organization

2 Introduction

3 Fundamental questionsLanguagesLogic

4 Overview of the course

3 / 29

Page 4: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

About me

Mario AlvianoFirst and second degrees in Computer SciencePhD in Computer Science — Logic programming for AIFor details: http://www.alviano.net/

Consultation hourWednesday 10:30 – 11:30Check my website for changesYou may write me an e-mail to check if I will be in my office

4 / 29

Page 5: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

Course web page

https://www.mat.unical.it/ComputerScience/KnowledgeManagement

Hint

You can receive update messages via email1 Register yourself on the wiki

(unless you already did)2 Subscribe on the page

5 / 29

Page 6: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

Schedule

When?

Tuesday 17:00 – 19:00Wednesday 08:30 – 10:30Thursday 10:30 – 13:30

What?

Lectures and exercises, including PC exercises

Where?

Lab 31/a (here)

Check the web page for possible changes!

6 / 29

Page 7: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

Exams and attendance

Exams

Written, including PC exercisesDates to be fixedHomeworks presented in the class matter!(Up to around 3 bonus points on the first exam after thecourse)

Attendance

Attendance of the lectures is mandatoryTo access the exam you have to attend at least 70% of thecourse

7 / 29

Page 8: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

Exams and attendance

Exams

Written, including PC exercisesDates to be fixedHomeworks presented in the class matter!(Up to around 3 bonus points on the first exam after thecourse)

Attendance

Attendance of the lectures is mandatoryTo access the exam you have to attend at least 70% of thecourse

7 / 29

Page 9: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

Teaching material

Slides and material on the web page

https://www.mat.unical.it/ComputerScience/KnowledgeManagement

Suggested books

1 F. UriarteIntroduction to Knowledge Management

2 A. Asperti, A. CiabattoniLogica a Informatica

3 J. GallierLogic for Computer Science: Foundations of AutomaticTheorem Proving

4 D. Allemang, J. HendlerSemantic Web for the Working Ontologist

5 G. Antoniou, F. van HarmelenA Semantic Web Primer

8 / 29

Page 10: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

Outline

1 Organization

2 Introduction

3 Fundamental questionsLanguagesLogic

4 Overview of the course

9 / 29

Page 11: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

Why Semantic Web?

WWW history1980ies: Hypertext1990/1991: http://info.cern.ch1993: Mosaic Web Browser (later Netscape Navigator)1994: World Wide Web Consortium (W3C)1995: HTML 2.01997: HTML 3.21997: HTML 4.02000: HTML 4.01

Hyperlinked documents for humans are difficult to accessfor machinesSemantic Web: WWW also for machines

10 / 29

Page 12: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

Why Semantic Web?

WWW history1980ies: Hypertext1990/1991: http://info.cern.ch1993: Mosaic Web Browser (later Netscape Navigator)1994: World Wide Web Consortium (W3C)1995: HTML 2.01997: HTML 3.21997: HTML 4.02000: HTML 4.01

Hyperlinked documents for humans are difficult to accessfor machines

Semantic Web: WWW also for machines

10 / 29

Page 13: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

Why Semantic Web?

WWW history1980ies: Hypertext1990/1991: http://info.cern.ch1993: Mosaic Web Browser (later Netscape Navigator)1994: World Wide Web Consortium (W3C)1995: HTML 2.01997: HTML 3.21997: HTML 4.02000: HTML 4.01

Hyperlinked documents for humans are difficult to accessfor machinesSemantic Web: WWW also for machines

10 / 29

Page 14: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

Semantic Web Stack

11 / 29

Page 15: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

The route to the Semantic Web

The Semantic Web relies on Knowledge Representation andReasoning (KRR), the engineering part of KnowledgeManagement (KM).

Knowledge Management, a term from business

Identify, create, represent, distribute and enableadoption of insights, experiences, and practices.

Knowledge Management consists of1 Knowledge Acquisition2 Knowledge Representation3 Automated Reasoning

KRR = 2 + 3

12 / 29

Page 16: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

The route to the Semantic Web

The Semantic Web relies on Knowledge Representation andReasoning (KRR), the engineering part of KnowledgeManagement (KM).

Knowledge Management, a term from business

Identify, create, represent, distribute and enableadoption of insights, experiences, and practices.

Knowledge Management consists of1 Knowledge Acquisition2 Knowledge Representation3 Automated Reasoning

KRR = 2 + 3

12 / 29

Page 17: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

The route to the Semantic Web

The Semantic Web relies on Knowledge Representation andReasoning (KRR), the engineering part of KnowledgeManagement (KM).

Knowledge Management, a term from business

Identify, create, represent, distribute and enableadoption of insights, experiences, and practices.

Knowledge Management consists of1 Knowledge Acquisition2 Knowledge Representation3 Automated Reasoning

KRR = 2 + 3

12 / 29

Page 18: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

The route to the Semantic Web

The Semantic Web relies on Knowledge Representation andReasoning (KRR), the engineering part of KnowledgeManagement (KM).

Knowledge Management, a term from business

Identify, create, represent, distribute and enableadoption of insights, experiences, and practices.

Knowledge Management consists of1 Knowledge Acquisition2 Knowledge Representation3 Automated Reasoning

KRR = 2 + 3

12 / 29

Page 19: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

SECI model

Nonaka&Takeuchi

Tacit KnowledgeExplicit Knowledge

SocializationExternalizationCombinationInternalization

13 / 29

Page 20: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

Data, Information, Knowledge pyramid

14 / 29

Page 21: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

Data vs Information

745d51b8683b37806641074955a03d4e

md5sum of debian-7.2.0-amd64-xfce-CD-1.iso

Inca quipu

15 / 29

Page 22: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

Data vs Information

745d51b8683b37806641074955a03d4e

md5sum of debian-7.2.0-amd64-xfce-CD-1.iso

Inca quipu

15 / 29

Page 23: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

Data vs Information vs Knowledge

Pioneer plaque Voyager Golden Record

16 / 29

Page 24: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

Outline

1 Organization

2 Introduction

3 Fundamental questionsLanguagesLogic

4 Overview of the course

17 / 29

Page 25: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

Fundamental questions

Knowledge Representation and ReasoningDrawing conclusions from represented knowledge

How is the knowledge represented?How do we draw conclusions?

18 / 29

Page 26: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

Fundamental questions

Knowledge Representation and ReasoningDrawing conclusions from represented knowledgeHow is the knowledge represented?

How do we draw conclusions?

18 / 29

Page 27: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

Fundamental questions

Knowledge Representation and ReasoningDrawing conclusions from represented knowledgeHow is the knowledge represented?How do we draw conclusions?

18 / 29

Page 28: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

Outline

1 Organization

2 Introduction

3 Fundamental questionsLanguagesLogic

4 Overview of the course

19 / 29

Page 29: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

Languages

Which languages are suitable for Knowledge Representationand Reasoning?

Natural languages?Formal languages?

20 / 29

Page 30: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

Languages

Which languages are suitable for Knowledge Representationand Reasoning?

Natural languages?

Formal languages?

20 / 29

Page 31: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

Languages

Which languages are suitable for Knowledge Representationand Reasoning?

Natural languages?Formal languages?

20 / 29

Page 32: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

Natural languages (1)

It is raining.

If it is raining, the street is wet.

We can conclude thatThe street is wet.

21 / 29

Page 33: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

Natural languages (1)

It is raining.If it is raining, the street is wet.

We can conclude thatThe street is wet.

21 / 29

Page 34: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

Natural languages (1)

It is raining.If it is raining, the street is wet.

We can conclude thatThe street is wet.

21 / 29

Page 35: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

Natural languages (2)

ConsiderMario teaches the students in the classroom.

How to interpret it?

1 Mario teaches in the classroom.2 the students in the classroom.

All sorts of difficulties for automation!

Natural languages are not suitable forKnowledge Representation and Reasoning

22 / 29

Page 36: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

Natural languages (2)

ConsiderMario teaches the students in the classroom.

How to interpret it?1 Mario teaches in the classroom.

2 the students in the classroom.

All sorts of difficulties for automation!

Natural languages are not suitable forKnowledge Representation and Reasoning

22 / 29

Page 37: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

Natural languages (2)

ConsiderMario teaches the students in the classroom.

How to interpret it?1 Mario teaches in the classroom.2 the students in the classroom.

All sorts of difficulties for automation!

Natural languages are not suitable forKnowledge Representation and Reasoning

22 / 29

Page 38: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

Natural languages (2)

ConsiderMario teaches the students in the classroom.

How to interpret it?1 Mario teaches in the classroom.2 the students in the classroom.

All sorts of difficulties for automation!

Natural languages are not suitable forKnowledge Representation and Reasoning

22 / 29

Page 39: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

Formal languages

Knowledge Representation and Reasoning needsformal languages

with reasoning capabilities

Knowledge Representation and Reasoning needs(mathematical) logic!

23 / 29

Page 40: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

Formal languages

Knowledge Representation and Reasoning needsformal languageswith reasoning capabilities

Knowledge Representation and Reasoning needs(mathematical) logic!

23 / 29

Page 41: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

Formal languages

Knowledge Representation and Reasoning needsformal languageswith reasoning capabilities

Knowledge Representation and Reasoning needs(mathematical) logic!

23 / 29

Page 42: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

Outline

1 Organization

2 Introduction

3 Fundamental questionsLanguagesLogic

4 Overview of the course

24 / 29

Page 43: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

Mathematical logic

Julius Benedict (Arnold Schwarzenegger)[to the bad guy]:

You have no respect for logic.And I have no respect for thosewith no respect for logic.You’re a very stupid person.

[The bad guy gets beaten badly]

We conclude

If you don’t have respect for logic,you may get beaten up by ArnoldSchwarzenegger

How to draw such a conclusionautomatically?

25 / 29

Page 44: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

Mathematical logic

Julius Benedict (Arnold Schwarzenegger)[to the bad guy]:

You have no respect for logic.And I have no respect for thosewith no respect for logic.You’re a very stupid person.

[The bad guy gets beaten badly]

We conclude

If you don’t have respect for logic,you may get beaten up by ArnoldSchwarzenegger

How to draw such a conclusionautomatically?

25 / 29

Page 45: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

Mathematical logic

Julius Benedict (Arnold Schwarzenegger)[to the bad guy]:

You have no respect for logic.And I have no respect for thosewith no respect for logic.You’re a very stupid person.

[The bad guy gets beaten badly]

We conclude

If you don’t have respect for logic,you may get beaten up by ArnoldSchwarzenegger

How to draw such a conclusionautomatically?

25 / 29

Page 46: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

Automated Reasoning

Consider a sack of beans

1 2 3

1 All beans from the sack are green2 These are beans from the sack3 These are green beans

Deduction

1 + 2 ⇒ 3

Induction

2 + 3 ⇒ 1

Abduction

1 + 3 ⇒ 2

26 / 29

Page 47: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

Automated Reasoning

Consider a sack of beans

1 2 3

1 All beans from the sack are green2 These are beans from the sack3 These are green beans

Deduction

1 + 2 ⇒ 3

Induction

2 + 3 ⇒ 1

Abduction

1 + 3 ⇒ 2

26 / 29

Page 48: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

Automated Reasoning

Consider a sack of beans

1 2 3

1 All beans from the sack are green2 These are beans from the sack3 These are green beans

Deduction

1 + 2 ⇒ 3

Induction

2 + 3 ⇒ 1

Abduction

1 + 3 ⇒ 2

26 / 29

Page 49: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

Automated Reasoning

Consider a sack of beans

1 2 3

1 All beans from the sack are green2 These are beans from the sack3 These are green beans

Deduction

1 + 2 ⇒ 3

Induction

2 + 3 ⇒ 1

Abduction

1 + 3 ⇒ 2

26 / 29

Page 50: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

Automated Reasoning

Consider a sack of beans

1 2 3

1 All beans from the sack are green2 These are beans from the sack3 These are green beans

Deduction

1 + 2 ⇒ 3

Induction

2 + 3 ⇒ 1

Abduction

1 + 3 ⇒ 2

26 / 29

Page 51: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

Automated Reasoning

Consider a sack of beans

1 2 3

1 All beans from the sack are green2 These are beans from the sack3 These are green beans

Deduction

1 + 2 ⇒ 3

Induction

2 + 3 ⇒ 1

Abduction

1 + 3 ⇒ 2

26 / 29

Page 52: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

Automated Reasoning

Consider a sack of beans

1 2 3

1 All beans from the sack are green2 These are beans from the sack3 These are green beans

Deduction

1 + 2 ⇒ 3

Induction

2 + 3 ⇒ 1

Abduction

1 + 3 ⇒ 2

26 / 29

Page 53: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

Outline

1 Organization

2 Introduction

3 Fundamental questionsLanguagesLogic

4 Overview of the course

27 / 29

Page 54: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

Overview of the course

The remainder of the course will be more technical!

Description LogicsSemantic WebPropositional LogicFirst-Order Logic

Semantic Web

RDF, RDF-S and OWLXML and XML SchemaXPath and XSLT

28 / 29

Page 55: Knowledge Representation and Semantic Webalviano/archives/teaching/krr... · Knowledge Representation and Semantic Web Mario Alviano University of Calabria, Italy A.Y. 2017/2018 1/29.

END OF THELECTURE

29 / 29