Propositional Definite Clause Logic: Syntax, Semantics and Bottomup Proofs - PowerPoint PPT Presentation

1 / 24
About This Presentation
Title:

Propositional Definite Clause Logic: Syntax, Semantics and Bottomup Proofs

Description:

A knowledge base is a set of definite clauses. CPSC 322, Lecture 20. Slide 8 ... Given a proof procedure, KB g means g can be derived from knowledge base KB. ... – PowerPoint PPT presentation

Number of Views:110
Avg rating:3.0/5.0
Slides: 25
Provided by: con81
Category:

less

Transcript and Presenter's Notes

Title: Propositional Definite Clause Logic: Syntax, Semantics and Bottomup Proofs


1
Propositional Definite Clause Logic Syntax,
Semantics and Bottom-up Proofs Computer Science
cpsc322, Lecture 20 (Textbook Chpt
5.3) February, 27, 2008
2
Lecture Overview
  • Recap Logic intro
  • Propositional Definite Clause Logic Syntax
  • Propositional Definite Clause Logic Semantics
  • PDCL Bottom-up Proof

3
What you already know about logic...
  • From programming Some logical operators
  • If ((amount gt 0) (amount lt 1000)) !(age lt
    30)
  • ...

You know what they mean in a procedural way
Logic is the language of Mathematics. To define
formal structures (e.g., sets, graphs) and to
proof statements about those
We are going to look at Logic as a Representation
and Reasoning System that can be used to
formalize a domain (e.g., an electrical system,
an organization) and to reason about it
4
Propositional (Definite Clauses) Logic
  • We focus on the simplest form of Logic
    Propositional
  • The primitive elements are propositions
    Boolean variables that can be true, false
  • Five logical operators
  • We start from a restricted form of Prop. Logic
  • Only two kinds of statements
  • that a proposition is true
  • that a proposition is true if one or more other
    propositions are true
  • Why still useful?
  • Adequate in many domains (with some adjustments)
  • Reasoning steps easy to follow by humans
  • Inference linear in size of your set of
    statements
  • Similar formalisms used in cognitive architectures

5
PDCL as a simple RRS
  • Representation and Reasoning System Definition
    (RSS)
  • A Representation and Reasoning System (RRS) is
    made up of
  • syntax specifies the symbols used, and how they
    can be combined to form legal sentences
  • semantics specifies the meaning of the symbols
  • reasoning theory or proof procedure a
    specification of how an answer can be produced.

6
Lecture Overview
  • Recap Logic intro
  • Propositional Definite Clause Logic Syntax
  • Propositional Definite Clause Logic Semantics
  • PDCL Bottom-up Proof

7
Propositional Definite Clauses Syntax
Definition (atom) An atom is a symbol starting
with a lower case letter
Definition (body) A body is an atom or is of the
form b1 ? b2 where b1 and b2 are bodies.
Definition (definite clause) A definite clause is
an atom or is a rule of the form h ? b where h
is an atom and b is a body. (Read this as h
if b.'')
Definition (atom) A knowledge base is a set of
definite clauses
8
PDC Syntax Example
  • The following are syntactically correct
    statements in our language
  • ai_is_fun
  • ai_is_fun ? get_good_grade
  • ai_is_fun ? get_good_grade ? not_too_much_work
  • ai_is_fun ? get_good_grade ? not_too_much_work ?
    prof_can_operate_laptop
  • The following statements are syntactically
    incorrect
  • ai_is_fun ? ai_is_boring
  • ai_is_fun ? relaxing_term ? get_good_grade ?
    not_too_much_work

Do any of these statements mean anything?
Syntax doesn't answer this question.
9
Lecture Overview
  • Recap Logic intro
  • Propositional Definite Clause Logic Syntax
  • Propositional Definite Clause Logic Semantics
  • PDCL Bottom-up Proof

10
Propositional Definite Clauses Semantics
Interpretation
Semantics allows you to relate the symbols in the
logic to the domain you're trying to model.
Definition (interpretation) An interpretation I
assigns a truth value to each atom.
11
PDC Semantics Truth Values
We can use the interpretation to determine the
truth value of clauses and knowledge bases
Definition (truth values of statements) A body
b1 ? b2 is true in I if and only if b1 is true in
I and b2 is true in I.
12
PDC Semantics Truth Values
Definition (truth values of statements cont) A
rule h ? b is false in I if and only if b is
true in I and h is false in I.
May seem bizarre/counterintuitive but Does not
make any claim of causation or relevance It is
equivalent to state if b is true I am claiming
that h must be true, otherwise I am not making
any claim
13
PDC Semantics Truth Values (cont)
Definition (truth values of statements cont) A
knowledge base KB is true in I if and only if
every clause in KB is true in I.
14
Models
Definition (model) A model of a set of clauses is
an interpretation in which all the clauses are
true.
15
Example Models
Which interpretations are models?
16
Logical Consequence
Definition (logical consequence) If KB is a set
of clauses and g is a conjunction of atoms, g
is a logical consequence of KB, written KB ? g,
if g is true in every model of KB.
  • we also say that g logically follows from KB,
    or that KB entails g.
  • In other words, KB ? g if there is no
    interpretation in which KB is true and g is
    false.

17
Example Logical Consequences
  • Which of the following is true?
  • KB ? q, KB ? p, KB ? s, KB ? r

18
Lecture Overview
  • Recap Logic intro
  • Propositional Definite Clause Logic Syntax
  • Propositional Definite Clause Logic Semantics
  • PDCL Bottom-up Proof

19
Proofs
  • A proof is a mechanically derivable demonstration
    that a formula logically follows from a knowledge
    base.
  • Given a proof procedure, KB ? g means g can be
    derived from knowledge base KB.
  • Recall KB ? g means g is true in all models of KB.

Definition (soundness) A proof procedure is sound
if KB ? g implies KB ? g.
Definition (completeness) A proof procedure is
complete if KB ? g implies KB ? g.
20
Bottom-up Ground Proof Procedure
  • One rule of derivation, a generalized form of
    modus ponens
  • If h ? b1 ? ? bm is a clause in the knowledge
    base, and each bi has been derived, then h can
    be derived.
  • You are forward chaining on this clause.
  • (This rule also covers the case when m0. )

21
Bottom-up proof procedure
  • KB ? g if g ? C at the end of this procedure
  • C
  • repeat
  • select clause h ? b1 ? ? bm in KB such
    that bi ? C for all i, and h ? C
  • C C ? h
  • until no more clauses can be selected.

22
Bottom-up proof procedure Example
  • g ? f ? e
  • q ? f ? g ? z
  • e ? a ? b
  • a
  • b
  • r
  • f

C repeat select clause h ? b1 ? ? bm
in KB such that bi ? C for all i, and h ?
C C C ? h until no more clauses can be
selected.
r? q? g?
23
Clarification CSP Planning action constraints
  • specify which actions cannot occur simultaneously
  • these are sometimes called mutual exclusion
    (mutex) constraints
  • To be safe make all actions mutually exclusive

If two or more actions can occur simultaneously
(e.g., robot has two hands and can deliver both
coffee and mail) Add row in the action constraint
table to allow for that
24
Next class
  • (still section 5.3)
  • Using PDC Logic to model the electrical domain
  • Reasoning in the electrical domain
  • Soundness and Completeness of Bottom-up Proofs
Write a Comment
User Comments (0)
About PowerShow.com