## Knowledge Representation and Semantic Web - Academic year 2018/2019

### Course information

**Lecturer**: Mario Alviano

**Office hours**: consult my homepage

### Notice board

**22/01/2019 09:50**: Italian students of the first year can register for the exam from now until 25/01/2019 (please, [re]act as soon as possible).**21/01/2019 10:10**: The issue with ESSE3 is fixed, but the Italian students of the first year have to wait until 23/01/2019 to register for the exam. I apologize for the inconvenience, which anyhow is not due to me. The exam list will remain open until 25/01/2019, but try to register on 23 (in case, report any other issue).**18/01/2019 10:40**: It seems that there is an issue with ESSE3 for the Italian students of the first year. I will add a notice here when I will have more information.**15/01/2019 11:20**: Please, sign in for the exam on ESSE3.**15/12/2018 09:30**: Students who have attended at least 70% of the course: download**22/11/2018 11:45**: No lecture on day 29/11/2018.**02/11/2018 18:30**: On days 15/11/2018 and 29/11/2018 the lecture hall will be MT15.

### Schedule

**Lecture Hall**: Lab 31/a

#### Lectures

- 25/09/2018 17:00-19:00 - Introduction
- 26/10/2018 08:30-10:30 - Ontologies and Semantic Web with Protégé
- 27/10/2018 10:30-13:30 - XML and DTD
- 02/10/2018 17:00-19:00 - XML Schema
- 03/10/2018 08:30-10:30 - Exercises on DTD and XML Schema
- 04/10/2018 10:30-13:30 - XPath
- 09/10/2018 17:00-19:00 - XSLT (part I)
- 10/10/2018 08:30-10:30 - XSLT (part II)
- 11/10/2018 10:30-13:30 - Exercises on XPath and XSLT
- 16/10/2018 17:00-19:00 - Propositional logic: Syntax and semantics
- 17/10/2018 08:30-10:30 - Propositional logic: Properties
- 18/10/2018 10:30-13:30 - Propositional logic: Sequent calculus
- 23/10/2018 17:00-19:00 - Propositional logic: Exercises
- 24/10/2018 08:30-10:30 - Propositional logic: Computation and propositional tableau
- 25/10/2018 10:30-13:30 - Propositional logic: Resolution and DPLL
- 30/10/2018 17:00-19:00 - Propositional logic: Exercises
- 31/10/2018 08:30-10:30 - Propositional logic: Exercises
- 01/11/2018 10:30-13:30 - NO LECTURE
- 06/11/2018 17:00-19:00 - Propositional logic: Computer exercises
- 07/11/2018 08:30-10:30 - Propositional logic: Computer exercises
- 08/11/2018 10:30-13:30 - Propositional logic: Computer exercises
- 10/11/2018 08:30-13:30 - Exam simulation
- 13/11/2018 17:00-19:00 - First-order logic: Syntax and semantics
- 14/11/2018 08:30-10:30 - First-order logic: Semantic notions and sequent calculus
- 15/11/2018 10:30-13:30 - First-order logic: Normal forms, Skolemization and Herbrand theory
- 20/11/2018 17:00-19:00 - First-order logic: Tableau and exercises
- 21/11/2018 08:30-10:30 - First-order logic: Resolution and exercises
- 22/11/2018 10:30-13:30 - First-order logic: Computer exercises
- 27/11/2018 17:00-19:00 - First-order logic: Exercises
- 28/11/2018 08:30-10:30 - Description logics: ALC and its extension
- 29/11/2018 10:30-13:30 - NO LECTURE
- 04/12/2018 17:00-19:00 - Description logics: Exercises
- 05/12/2018 08:30-10:30 - NO LECTURE
- 06/12/2018 10:30-13:30 - Student exercises
- 11/12/2018 17:00-19:00 - NO LECTURE
- 12/12/2018 08:30-10:30 - NO LECTURE
- 13/12/2018 10:30-13:30 - Student exercises
- 15/12/2018 08:30-13:30 - Exam simulation
- 18/12/2018 17:00-19:00 - Student exercises

### Course material

#### Programme (in short)

- Semantic Web
- Description Logics, RDF, RDF-S and OWL
- XML, DTD and XML Schema
- XPath and XSLT

- Classical Logic
- Propositional logic
- First-order logic
- Calculi

#### Slides

Introduction: presentation, handout

XML and DTD: presentation, handout, exercises

XML Schema: presentation, handout, exercises

XPath: presentation, handout, exercises

XSLT (part I): presentation, handout

XSLT (part II): presentation, handout, exercises

Propositional Logic - Syntax and Semantics: presentation, handout

Propositional Logic - Properties: presentation, handout

Propositional Logic - Sequent Calculus: presentation, handout

Propositional Logic - Exercises: presentation, handout

Propositional Logic - Computation and propositional tableau: presentation, handout

Propositional Logic - Resolution and DPLL: presentation, handout

Propositional Logic - Computer exercises: presentation, handout

First-Order Logic - Syntax and semantics: presentation, handout

First-Order Logic - Semantic notions and sequent calculus: presentation, handout

First-Order Logic - Computer exercises: presentation, handout, examples

First-Order logic - Normal forms and Herbrand theory: presentation, handout

First-Order Logic - Tableau: presentation, handout

First-Order Logic - Resolution: presentation, handout

Description Logics: presentation, handout

#### Exercises to Solve at Home

Have a look at the end of the slides; some solutions written in the class can be found here

Exercises to be solved in the classroom (23, 24, 25, 26, 33, 34, 35) and at home by Javier Larrosa: download

Nice collection of exercises (with solutions) by Chiara Ghidini and Luciano Seraﬁni: download

Exercises on Description Logics: download (exercises 1 and 2); download (exercise 10); download (exercises 1, 3 and 4);

#### Programs

Parser for propositional formulas in perl (needs Parse::RecDescent): proplogparser.pl

CNF rewriter in python (needs pyparsing): generate_strict.py (requires wffs in the strict sense), generate.py; examples: demorgan.py, full_adder.py

Cheese Independence Problems (in python): cip.py, cip.rook.py, cip.queen.py, cip.bishop.py

Pizza ontology: pizza.owl

Minesweeper: mine.in

IDP: example1.idp

#### Books

- Beginning XML, 5th Edition - Joe Fawcett, Danny Ayers, Liam R. E. Quin
- Logica a Informatica - Andrea Asperti, Agata Ciabattoni - Mc Graw-Hill, 1997 ISBN: 88-386-0757-5
- Logic for Computer Science: Foundations of Automatic Theorem Proving - Jean Gallier - Wiley, 1986
- Semantic Web for the Working Ontologist - Dean Allemang, Jim Hendler - Morgan Kaufmann, 2008 ISBN: 978-0-123-73556-0
- A Semantic Web Primer - Grigoris Antoniou, Frank van Harmelen - The MIT Press, 2008
- Introduction to Knowledge Management, A brief introduction to the basic elements of knowledge management for non-practitioners interested in understanding the subject - Filomon A. Uriarte, Jr. - Asean Foundation, 2008

#### Web Pages

- Preliminaries
- Propositional Logic
- First-order Logic
- XML, OWL etc

### Exams

- 26/01/2019 9:00 - Lab 31/b
- 19/02/2019 9:00 - Lab 31/b