Logics for Data and Knowledge Representation - PowerPoint PPT Presentation

About This Presentation
Title:

Logics for Data and Knowledge Representation

Description:

Representation ClassL (part 1): syntax and semantics ClassL reasoning using DPLL Given the theorem and the correspondences above, ClassL reasoning can be implemented ... – PowerPoint PPT presentation

Number of Views:52
Avg rating:3.0/5.0
Slides: 37
Provided by: disiUnit6
Category:

less

Transcript and Presenter's Notes

Title: Logics for Data and Knowledge Representation


1
Logics for Data and Knowledge Representation
  • ClassL (part 1) syntax and semantics

2
Outline
  • Introduction
  • Syntax
  • Alphabet
  • Formation rules
  • Semantics
  • Class-valuation
  • Venn diagrams
  • Satisfiability
  • Validity
  • Reasoning
  • Comparing PL and ClassL
  • ClassL reasoning using DPLL

3
Introduction ClassL, the logic of classes
INTRODUCTION SYNTAX SEMANTICS REASONING
PL AND CLASSL CLASSL REASONING USING DPLL
  • It is a propositional logic
  • Sentences expressing propositions (something true
    or false)
  • It is also called Propositional Description Logic
    (DL) or ALC DL
  • Different alphabet and semantics w.r.t. PL
    (notational variant)
  • The logical constants (operators) are ?
    (and, intersection), ? (or, disjunction), ?
    (not)
  • Meta-logical symbols ?, ?
  • Extensional interpretation
  • The domain is a set of objects. Propositions are
    interpreted using an extensional interpretation.

4
Intensional vs Extensional interpretation
INTRODUCTION SYNTAX SEMANTICS REASONING
PL AND CLASSL CLASSL REASONING USING DPLL
Intentional interpretation D T, F
Lion
Monkey
Tree
T
F
.
.
Lion2
Lion1
The World
The Mental Model
The Formal Model
4
5
Intensional vs Extensional interpretation
INTRODUCTION SYNTAX SEMANTICS REASONING
PL AND CLASSL CLASSL REASONING USING DPLL
Extensional interpretation D Cita, Kimba,
Simba
Lion
Monkey
Tree
Kimba
.
Cita
.
Simba
.
Lion2
Lion1
The World
The Mental Model
The Formal Model
5
6
Language (Syntax)
INTRODUCTION SYNTAX SEMANTICS REASONING
PL AND CLASSL CLASSL REASONING USING DPLL
  • The syntax of ClassL is similar to PL
  • Alphabet of symbols S0

NOTE not only characters but also words
(composed by several characters) like monkey
are descriptive symbols
6
7
Additional Symbols
INTRODUCTION SYNTAX SEMANTICS REASONING
PL AND CLASSL CLASSL REASONING USING DPLL
  • Auxiliary symbols
  • Parentheses ( )
  • Additional logical constants
  • Logical constants are, for all propositions P
  • ? (falsehood symbol, false, bottom) ? ? P ? P
  • T (truth symbol, true, top) T ? ?
  • Note that differently from PL, in ClassL they are
    not defined symbols but they are logical facts,
    i.e. theorems

7
8
Formation Rules (FR) well formed formulas
INTRODUCTION SYNTAX SEMANTICS REASONING
PL AND CLASSL CLASSL REASONING USING DPLL
  • Well formed formulas (wff) in ClassL can be
    described by the following BNF grammar (codifying
    the rules)
  • ltAtomic Formulagt A B ... P Q ...
    ? ?
  • ltwffgt ltAtomic Formulagt ltwffgt ltwffgt ?
    ltwffgt ltwffgt ? ltwffgt
  • Atomic formulas are also called atomic
    propositions
  • Wff are class-propositional formulas (or just
    propositions)
  • A formula is correct if and only if it is a wff
  • S0 FR define a propositional language

8
9
Semantics means providing an interpretation
INTRODUCTION SYNTAX SEMANTICS REASONING
PL AND CLASSL CLASSL REASONING USING DPLL
  • So far the elements of our propositional language
    are simply strings of symbols
  • without formal meaning
  • The meanings which are intended to be attached to
    the symbols and propositions form the intended
    interpretation s (sigma) of the language

9
10
Extensional Semantics Extensions
INTRODUCTION SYNTAX SEMANTICS REASONING
PL AND CLASSL CLASSL REASONING USING DPLL
  • The semantics of a propositional language of
    classes L are extensional (semantics)
  • The extensional semantics of L is based on the
    notion of extension of a formula (proposition)
    in L
  • The extension of a proposition is the totality,
    or class, or set of all objects D (domain
    elements) to which the proposition applies

11
Extensions - Remarks
INTRODUCTION SYNTAX SEMANTICS REASONING
PL AND CLASSL CLASSL REASONING USING DPLL
  • If a proposition applies to an individual object,
    its extension is simply the one object designated
    (denoted) by the proposition.
  • If a proposition applies to a group of objects,
    its extension is the class consisting of all the
    objects, if any, to which it applies.
  • In ClassL, a proposition is also called a concept

12
Examples
INTRODUCTION SYNTAX SEMANTICS REASONING
PL AND CLASSL CLASSL REASONING USING DPLL
  • Take the proposition lion
  • its extension may include (according to the
    modeler) not only living lions, but also all the
    lions of the past, and those of the future
  • Take the proposition Rome
  • its extension can be simply the singleton set
    whose element is the city of Rome (notice that
    several cities may have the same name, so we need
    to specify which Rome)
  • Take the proposition red ? apple
  • its extension can the class containing all the
    red apples

13
Extensional Interpretation
INTRODUCTION SYNTAX SEMANTICS REASONING
PL AND CLASSL CLASSL REASONING USING DPLL
  • Given a domain (or universe) of interpretation U,
    the extensional interpretation I of a proposition
    P, denoted by I(P) or PI is a subset of U
  • This is fundamental to make the language formal.
  • NOTE By assuming one world, i.e. one domain,
    the extension of a proposition is unique.

Take P airplane. I(airplane)
Boeing747-3001, Boeing747-300n, piper1, piperk,
... all airplanes occurring in the
part of the world being modeled
14
Class-valuation s
INTRODUCTION SYNTAX SEMANTICS REASONING
PL AND CLASSL CLASSL REASONING USING DPLL
  • In extensional semantics, the first central
    semantic notion is that of class-valuation (the
    interpretation function)
  • Given a Class Language L
  • Given a domain of interpretation U
  • A class valuation s of a propositional language
    of classes L is a mapping (function) assigning to
    each formula ? of L a set s(?) of objects
    (truth-set) in U
  • s L ? U

15
Class-valuation s
INTRODUCTION SYNTAX SEMANTICS REASONING
PL AND CLASSL CLASSL REASONING USING DPLL
  • s(?) Ø
  • s(?) U (Universal Class, or Universe)
  • s(P) ? U, as defined by s
  • s(P) a ? U a ? s(P) comp(s(P))
    (Complement)
  • s(P ? Q) s(P) n s(Q) (Intersection)
  • s(P ? Q) s(P) ? s(Q) (Union)

16
Example
INTRODUCTION SYNTAX SEMANTICS REASONING
PL AND CLASSL CLASSL REASONING USING DPLL
  • Suppose Person and Female are atomic formulas
    (also called concepts)
  • Person ? Female
  • denotes those persons that are female
  • Person ? ?Female
  • denotes those that are not female
  • Person ? ?Person
  • is the concept describing the whole world (?)

17
Venn Diagrams and Class-Values
INTRODUCTION SYNTAX SEMANTICS REASONING
PL AND CLASSL CLASSL REASONING USING DPLL
  • By regarding propositions as classes, it is very
    convenient to use Venn diagrams
  • Venn diagrams are used to represent extensional
    semantics of propositions in analogy of how
    truth-tables are used to represent intentional
    semantics
  • Venn diagrams allow to compute a class valuation
    ss value in polynomial time
  • In Venn diagrams we use intersecting circles to
    represent the extension of a proposition, in
    particular of each atomic proposition
  • The key idea is to use Venn diagrams to symbolize
    the extension of a proposition P by the device of
    shading the region corresponding to the
    proposition, as to indicate that P has a meaning
    (i.e., the extension of P is not empty).

18
Venn Diagram of P, ?
INTRODUCTION SYNTAX SEMANTICS REASONING
PL AND CLASSL CLASSL REASONING USING DPLL
Venn diagrams are built starting from a main
box which is used to represent the Universe U.
s(P)
P
s(?)
The falsehood symbol corresponds to the empty set.
?
19
Venn Diagram of P,?
INTRODUCTION SYNTAX SEMANTICS REASONING
PL AND CLASSL CLASSL REASONING USING DPLL
P corresponds to the complement of P w.r.t. the
universe U.
s(P)
P
s(?)
The truth symbol corresponds to the universe U.
19
20
Venn Diagram of P ? Q and P ? Q
INTRODUCTION SYNTAX SEMANTICS REASONING
PL AND CLASSL CLASSL REASONING USING DPLL
The intersection of P and Q
s(P ? Q)
P
Q
s(P ? Q)
The union of P and Q
P
Q
20
21
How to use Venn diagrams exercise 1
INTRODUCTION SYNTAX SEMANTICS REASONING
PL AND CLASSL CLASSL REASONING USING DPLL
  • Prove by Venn diagrams that s(P) s(P)
  • Case s(P) Ø

s(P)
?
s(P)
s(P)
?
21
22
How to use Venn diagrams exercise 1
INTRODUCTION SYNTAX SEMANTICS REASONING
PL AND CLASSL CLASSL REASONING USING DPLL
  • Prove by Venn diagrams that s(P) s(P)
  • Case s(P) U

s(P)
s(P)
?
s(P)
22
23
How to use Venn diagrams exercise 1
INTRODUCTION SYNTAX SEMANTICS REASONING
PL AND CLASSL CLASSL REASONING USING DPLL
  • Prove by Venn diagrams that s(P) s(P)
  • Case s(P) not empty and different from U

s(P)
P
s(P)
P
s(P)
P
23
24
How to use Venn diagrams exercise 2
INTRODUCTION SYNTAX SEMANTICS REASONING
PL AND CLASSL CLASSL REASONING USING DPLL
  • Prove by Venn diagrams that s((A ? B)) s( A ?
    B)
  • Case s(A) and s(B) not empty (other cases as
    homework)

s((A ? B))
s(A ? B)
A
B
A
B
s( A ? B)
s( A)
A
B
A
B
s( B)
A
B
24
25
Truth Relation (Satisfaction Relation)
INTRODUCTION SYNTAX SEMANTICS REASONING
PL AND CLASSL CLASSL REASONING USING DPLL
  • Let s be a class-valuation on language L, we
    define the truth-relation (or class-satisfaction
    relation) ? and write
  • s ? P
  • (read s satisfies P) iff s(P) ? Ø
  • Given a set of propositions G, we define
  • s ? G
  • iff s ? ? for all formulas ? ? G

26
Model and Satisfiability
INTRODUCTION SYNTAX SEMANTICS REASONING
PL AND CLASSL CLASSL REASONING USING DPLL
  • Let s be a class valuation on language L. s is a
    model of a proposition P (set of propositions G)
    iff s satisfies P (G).
  • P (G) is class-satisfiable if there is a class
    valuation s such that s ? P (s ? G).

27
Satisfiability, an example
INTRODUCTION SYNTAX SEMANTICS REASONING
PL AND CLASSL CLASSL REASONING USING DPLL
  • Is the formula P (A ? B) satisfiable?
  • In other words, there exist a s that satisfies
    P? YES!
  • In order to prove it we use Venn diagrams and it
    is enough to find one.
  • s is a model for P

A
B
27
28
Truth, satisfiability and validity
INTRODUCTION SYNTAX SEMANTICS REASONING
PL AND CLASSL CLASSL REASONING USING DPLL
  • Let s be a class valuation on language L.
  • P is true under s if P is satisfiable (s ? P)
  • P is valid if s ? P for all s (notation ? P)
  • In this case, P is called a tautology (always
    true)
  • NOTE the notions of true and false are
    relative to some truth valuation.
  • NOTE A proposition is true iff it is satisfiable

29
Validity, an example
INTRODUCTION SYNTAX SEMANTICS REASONING
PL AND CLASSL CLASSL REASONING USING DPLL
  • Is the formula P A ? A valid?
  • In other words, is P true for all s? YES!
  • In order to prove it we use Venn diagrams, but
    we need to discuss all cases.

Case s(A) empty if s(A) is empty, then s(A) is
the universe U
?
Case s(A) not empty if s(A) is not empty, s(A)
covers all the other elements of U
A
29
30
Reasoning on Class-Propositions
INTRODUCTION SYNTAX SEMANTICS REASONING
PL AND CLASSL CLASSL REASONING USING DPLL
  • Given a class-propositions P we want to reason
    about the following
  • Model checking Does s satisfy P? (s ? P?)
  • Satisfiability Is there any s such that s ? P?
  • Unsatisfiability Is it true that there are no s
    satisfying P?
  • Validity Is P a tautology? (true for all s)

30
31
Class-Values and Truth-Values
INTRODUCTION SYNTAX SEMANTICS REASONING
PL AND CLASSL CLASSL REASONING USING DPLL
  • Intensional Interpretation the intentional
    interpretation ? of a proposition P determines a
    truth-value ?(P)
  • P holds
  • Extensional Interpretation the extensional
    interpretation of s of P determines a class of
    objects s(P)
  • x belongs to P or x in P or x is an
    instance of P
  • What is the relation between ?(P) and s(P)? (see
    next slides)

31
32
PL and ClassL table of the symbols
INTRODUCTION SYNTAX SEMANTICS REASONING
PL AND CLASSL CLASSL REASONING USING DPLL
PL ClassL
Syntax ? ?
? ?
? ?
? ?
? ?
P, Q... P, Q...
Semantics ?true, false ?o, (compare models)
  • RECALL A proposition P is true (in a model) iff
    P is satisfiable
  • NOTE There is no logical implication (yet)

32
33
PL and ClassL are notational variants
INTRODUCTION SYNTAX SEMANTICS REASONING
PL AND CLASSL CLASSL REASONING USING DPLL
  • Theorem P is satisfiable w.r.t. an intensional
    interpretation ? if and only if P is
    satifisfiable w.r.t. an extensional
    interpretation s
  • ?(P) implies s(P)
  • Build s(P) from ?(P) by substituting true with U
    and false with empty set.
  • s(P) implies ?(P)
  • Less trivial. Build first a s(P) which is
    equivalent to s(P) and which uses only U and
    empty set.

33
34
ClassL reasoning using DPLL
INTRODUCTION SYNTAX SEMANTICS REASONING
PL AND CLASSL CLASSL REASONING USING DPLL
  • Given the theorem and the correspondences above,
    ClassL reasoning can be implemented using DPLL.
  • The first step consists in translating P into P
    expressed in PL
  • Model checking Does s satisfy P? (s ? P?)
  • Find the corresponding model ? and check that
    v(P) true
  • Satisfiability Is there any s such that s ? P?
  • Check that DPLL(P) succeeds and returns a ?
  • Unsatisfiability Is it true that there are no s
    satisfying P?
  • Check that DPLL(P) fails
  • Validity Is P a tautology? (true for all s)
  • Check that DPLL(?P) fails

34
35
Entailment in ClassL
INTRODUCTION SYNTAX SEMANTICS REASONING
PL AND CLASSL CLASSL REASONING USING DPLL
  • Logical consequence (entailment) is not preserved
    in ClassL
  • Intersection
  • s ? P and s ? Q may not imply that s ? P ? Q
  • implies s ? ? (P
    ? Q) (sometimes)
  • Satisfiability in an extensional interpretation
    is richer than in an intensional interpretation
  • NOTE about union
  • s ? P and s ? Q, implies s ? P ? Q (always)
  • NOTE about complement
  • If s ? P implies s ? ?P (sometimes)

35
36
Entailment in ClassL
INTRODUCTION SYNTAX SEMANTICS PL AND
CLASSL CLASSL REASONING USING DPLL
  • Suppose that Male and Female are satisfiable.
  • Is Male ? Female satisfiable in PL?
  • And Male ? Female in ClassL?
  • It is clear that if we assume that they are
    disjoint
  • 1. It cannot be ? ? Male and ? ? Female for the
    same ?
  • 2. s ? Male and s ? Female do not imply that s ?
    Male ? Female
  • 3. We have that s ? Male ? Female
  • 4. We have that s ? Male and s ? ?Male
  • IMPORTANT NOTE
  • In PL, ? ? A and ? ? B implies that ? ? A ? B
    (same ?!)
  • In ClassL, s ? A and s ? B may not imply that s ?
    A ? B (same s!)
  • Think to the case Male and ?Male above.

36
Write a Comment
User Comments (0)
About PowerShow.com