LDK R Logics for Data and Knowledge Representation Modeling First version by Alessandro Agostini and...

Preview:

Citation preview

LLogics for DData and KKnowledgeRRepresentation

Modeling

First version by Alessandro Agostini and Fausto GiunchigliaSecond version by Fausto Giunchiglia and Rui Zhang

OutlinesModeling Logical Modeling

Domain Language Interpretation Model Theory

Expressiveness Expressiveness VS. Efficiency Efficiency VS. Complexity Decidability Algorithm

First version by Alessandro Agostini and Fausto GiunchigliaSecond version by Fausto Giunchiglia and Rui Zhang

11/20092

Modeling

11/20093 First version by Alessandro Agostini and Fausto GiunchigliaSecond version by Fausto Giunchiglia and Rui Zhang

World

LanguageL

TheoryTH

DomainD

ModelM

DataKnowledge

Meaning

Model

SemanticGap

Outlines ModelingLogical Modeling

Domain Language Interpretation Model Theory

Expressiveness Expressiveness VS. Efficiency Efficiency VS. Complexity Decidability Algorithm

First version by Alessandro Agostini and Fausto GiunchigliaSecond version by Fausto Giunchiglia and Rui Zhang

11/20094

Logical Modeling

11/20095 First version by Alessandro Agostini and Fausto GiunchigliaSecond version by Fausto Giunchiglia and Rui Zhang

Logical Modeling ElementsThe basic elements in the diagram are:

1. Domain (objects, classes, relations, functions)2. Logical Language 3. Interpretation (of the language)4. Model5. Theory / Knowledge Base (data and knowledge)6. Truth-relation / logical entailment (|=)

(deduction reasoning, inference)

We illustrate each element in turn.

First version by Alessandro Agostini and Fausto GiunchigliaSecond version by Fausto Giunchiglia and Rui Zhang

11/20096

DomainDomain (D) = the chosen objects from the

world

Example (LDKR class): the members of the LDKR class define a domain D; D is a finite set. The “type” of the elements in D is: person.

We will deal only with finite domains!

Question: what are we leaving out?

First version by Alessandro Agostini and Fausto GiunchigliaSecond version by Fausto Giunchiglia and Rui Zhang

11/20097

Language Language (L) = a logical language

1. L’s alphabet of symbols Σ contains at least one of the logical symbols: ∧, ∨, ¬, →, ∀, ∃;2. L has clear formation rules for formulas.

Example (cont’): any logical language with =, (, ), professor, student1, student2,... in Σ.

Note that English can be restricted to a propositional language, ...but it is not logical (informal syntax).

First version by Alessandro Agostini and Fausto GiunchigliaSecond version by Fausto Giunchiglia and Rui Zhang

11/20098

Logical Language (Syntax)The first step in setting up a logical language

(viz. a formal language) is to list the symbols, that is, the alphabet of (formal) symbols (Σ). formal symbol = a character, or group of

characters taken from some alphabet.

Symbols in Σ can be divided in ‘descriptive’ (non-logical) and ‘non-descriptive’ (logical).

First version by Alessandro Agostini and Fausto GiunchigliaSecond version by Fausto Giunchiglia and Rui Zhang

11/20099

Example (Monkey-Bananas Problem) In the sentence “There is a monkey in a

laboratory with some bananas”:

Descriptive symbols are: ‘monkey’, ‘laboratory',‘bananas’, ...

Non-descriptive symbols are: ‘there is’, ‘with some’, ‘a’, ‘in’, ...

First version by Alessandro Agostini and Fausto GiunchigliaSecond version by Fausto Giunchiglia and Rui Zhang

11/200910

Formal Syntax Formal Syntax: the set of “rules” saying how

to construct the expressions of the language from the alphabet of symbols, (i.e., the syntax) is a grammar (i.e., formal).

Formal syntax is often called an abstract syntax, in contrast to the concrete syntax used, e.g., in implementations.

Example: context-free grammars.

First version by Alessandro Agostini and Fausto GiunchigliaSecond version by Fausto Giunchiglia and Rui Zhang

11/200911

Interpretation Interpretation (I) = a mapping of L into D.

I must be effective (i.e., computable) .

Exampe 1: D = {Fausto, Aundrey} I(prof1) = Fausto, I(studen2) = Audrey

Example: 2: D = <T,F> I(HighBox) = T I(canTakeExam) = F

…First version by Alessandro Agostini and Fausto Giunchiglia

Second version by Fausto Giunchiglia and Rui Zhang11/200912

ModelModel (M) = the abstract (mathematical sense)

representation of the intended truths via interpretation I of language L. M is called L-model of D.

M |=A

to be read as:M satisfies AA holds in MA is TRUE in MM yields A

Example (cont’): D= <T,F>, M such that I(HighBox) = T then M |= Highbox I(canTakeExam) = F then M |= ¬ canTakeExam

...

First version by Alessandro Agostini and Fausto GiunchigliaSecond version by Fausto Giunchiglia and Rui Zhang

11/200913

TheoryTheory T (also L-Theory) = set of facts of L.

A fact defines a piece of knowledge (about D), something true in the model.

A finite theory T is called a knowledge base (KB). A database (DB) is the simplest kind of knowledge

base.Example (cont’): T = {¬ canTakeExam,

HighBox}.

We have:M |= T iff M |=A, for each Ai in T

… A model M of a theory T is an interpretation function that satisfies all the facts in T

First version by Alessandro Agostini and Fausto GiunchigliaSecond version by Fausto Giunchiglia and Rui Zhang

11/200914

What is a Logic?Logic = <L, I, |= > where

L: Language = set of phrases/ formulas (alphabet + formation rules)

I: Interpretation Function (what phrases mean in a chosen domain D)

I: L -> D |= : how to compute the fact that a formula A holds in

M (A is TRUE in M), notationally M |= A

with

A |= B in M iff M|=A implies M |= B

First version by Alessandro Agostini and Fausto GiunchigliaSecond version by Fausto Giunchiglia and Rui Zhang

11/200915

How to use logics

1) Define a logic (most often by reseachers), once for all (not a trivial task!)

2) Given a problem the computer scientist must choose the right logic, most often one of the many available

3) The computer scientist writes a theory T

4) The computer scientist uses reasoning services to solve her programs

First version by Alessandro Agostini and Fausto GiunchigliaSecond version by Fausto Giunchiglia and Rui Zhang

11/200916

First version by Alessandro Agostini and Fausto Giunchiglia Second version by Fausto Giunchiglia and Rui Zhang

Reasoning Services

Model Checking (EVAL): Is a sentence ψ true in model M?

Check M |= ψ

Satisfiability (SAT): Is there a model M where ψ is true?

find M such that M |= ψ Validity(VAL): Is ψ true according to all possible

models check whether for all M, M |= ψ

Entailment(ENT): ψ1 true in M (all models) implies ψ2 is true in M (all models).

check A |= B in M by checking M|=A implies M |= B

9/2009

OutlinesLogical Modeling

Domain Language Interpretation Model Theory

Expressiveness Expressiveness VS. Efficiency Efficiency VS. Complexity Decidability Algorithm

First version by Alessandro Agostini and Fausto GiunchigliaSecond version by Fausto Giunchiglia and Rui Zhang

11/200918

An Important Trade-Off There is a trade-off between expressive power

(expressiveness) and computational efficiency provided by a (logical) language. This trade-off is a measure of the tension

between specification and automation.

To use logic for modeling, the modeler must trading off expressiveness in the language for more tractable forms of reasoning services.

First version by Alessandro Agostini and Fausto GiunchigliaSecond version by Fausto Giunchiglia and Rui Zhang

11/200919

ExamplesPropositional:

“I like skiing” : I-like-skiing “Fausto likes skiing”: Fausto-like-skiing

Modal: “I believe I like skiing”: B(I-like-skiing), BI(like-skiing)

First-order: “Every person likes skiing”: ∀person.like-

skiing(person) “I like skiing” : like-skiing (I) “Fausto likes skiing” : like-skiing(Fausto)

Description Logics “Every person likes cars”: person < exists likes. Car

First version by Alessandro Agostini and Fausto GiunchigliaSecond version by Fausto Giunchiglia and Rui Zhang

11/200920

Efficiency VS. Complexity Efficient (Webster). Performing in the best

possible manner; satisfactory and economical to use. In modeling it applies to reasoning; In this case we use the more specific terminology

computational complexity (time, space,...) in place of term efficiency.

Complexity: (or computational complexity) of reasoning is the difficulty to compute a reasoning task expressed by using a logic. with degrees of expressiveness, we may classify

the logical languages according to some “degrees of complexity”.

First version by Alessandro Agostini and Fausto GiunchigliaSecond version by Fausto Giunchiglia and Rui Zhang

11/200921

Degrees of Complexity (NEW)The basic “degrees of complexity” are:

Here comes the axis of complexity

First version by Alessandro Agostini and Fausto GiunchigliaSecond version by Fausto Giunchiglia and Rui Zhang

11/200922

Decidability

First version by Alessandro Agostini and Fausto GiunchigliaSecond version by Fausto Giunchiglia and Rui Zhang

11/200923

What is an Algorithm?Decidability is strictly related to the notion of

“algorithm.” There were two main approaches, and many equivalent definitions:

K. Gödel (1934): recursive functions.Alonzo Church (1936): lambda-calculus.S.C. Kleene (1936): functional equations.

Alan M. Turing (1936-37): Turing machines.Emil L. Post (1936): Post machines.

Functional approach

es

Computational

approaches

First version by Alessandro Agostini and Fausto GiunchigliaSecond version by Fausto Giunchiglia and Rui Zhang

11/200924

Decision Procedures and Decidable LogicsA decision procedure is an algorithm that,

given a decision problem, terminates with the correct yes/no answer.

A logic is decidable if there exists a decision procedure for that logic.

In this course we focus on logics that are expressive enough to model real problems but are still decidable.

First version by Alessandro Agostini and Fausto GiunchigliaSecond version by Fausto Giunchiglia and Rui Zhang

11/200925

Recommended