Tableaux Implemented - PowerPoint PPT Presentation

About This Presentation
Title:

Tableaux Implemented

Description:

tabl(true(A&B) ... s backtracking mechanism to test one branch and then the ... A:'Did you tell her you love her?' B:'Oh, nice weather today' Our System ... – PowerPoint PPT presentation

Number of Views:27
Avg rating:3.0/5.0
Slides: 22
Provided by: coli9
Category:

less

Transcript and Presenter's Notes

Title: Tableaux Implemented


1
Tableaux Implemented
  • A Tableaux Prover
  • Representation of tableaux
  • Translate tableaux rules to Prolog
  • Bring together this weeks results in a combined
    demo system to see whether our efforts have been
    worthwhile

2
Representing Signed Formulae in Prolog
  • true(walk(john) v talk(john))
  • false(walk(john)v talk(john))

3
Preprocessing
  • Use logical equivalences
  • A ? B ? ? (?A ? ?B)
  • A ? B ? ? (A ? ?B)
  • true(walk(john) v talk(john))
  • gt true((walk(john)talk(john)))
  • A simple prolog predicate does this for us
    (naonly/2).

4
The Driver Predicate
  • theorem(Formula) -
  • naonly(Formula,ConvFormula),
  • \ tabl(false(ConvFormula),,_).
  • There is no way of falsifying the converted input
    Formula.
  • If tabl/3 succeeds Formula not valid.
  • If tabl/3 fails Formula valid.

How is the tableaux represented?
5
Representation of Tableaux
L1
  • We collect literals.
  • One list per branch
  • L1,L2,L3
  • L1,L2,L4,L5
  • L1,L2,L4,L6
  • no more representation of the whole tableau.

L2
L4
L3
L5
L6
6
Tableaux Rules in Prolog
  • Scheme
  • tabl(InFormula,InBranch,OutBranch) -
  • For each connective and sign
  • tabl(false(A),InBranch,OutBranch) -
  • tabl(true(AB),InBranch,OutBranch) -
  • The tabl/3 rules are straightforward translations
    of the tableaux rules. But some details are
    tricky.

Input 1 The formula to be analyzed
Input 2 A list of literals (branch above)
Output Literals from above plus literals from
analyses of InFormula
7
Conjunctive Expansion Negation
  • tabl(true(A),InBranch,OutBranch) -
  • !,tabl(false(A),InBranch,OutBranch).
  • tabl(false(A),InBranch,OutBranch) -
  • !,tabl(true(A),InBranch,OutBranch).
  • Negation of input Formula is eliminated by a
    recursive tabl/3 call with reversed sign.

8
Conjunctive Expansion Conjunction
  • tabl(true(AB),InBranch,OutBranch) -
  • !,tabl(true(A),InBranch,K),
  • tabl(true(B),K,OutBranch).
  • true(sleep(john)snort(john)) Asleep(john)
  • InBranch true(sleep(mary)) Bsnort(john)
  • K true(sleep(mary)),true(sleep(john))
  • OutBranch true(sleep(mary)),true(sleep(john)),
  • false(snort(john))

Two recursive calls of tabl/3. One for each
conjunct. Intermediate branch is handed over in
variable K.
9
Disjunctive Expansion I
  • General Idea Test branches one after another.
  • Advantage Two alternatives. If we come to the
    right branch, we can forget about the left one.

F2
F4
F3
F5



10
Disjunctive Expansion II
  • tabl(false(A _),InBranch,OutBranch) -
  • tabl(false(A),InBranch, OutBranch).
  • tabl(false(_ B),InBranch,OutBranch) -
  • !,tabl(false(B),InBranch, OutBranch).
  • If we succeed on the left branch to prove
    false(A) without a clash, we stop (a model for
    the negation of our suspected theorem has been
    found).
  • Else, we have to try the right branch.
  • Use Prologs backtracking mechanism to test one
    branch and then the other.
  • Two clauses for tabl(false(AB),)

11
Base Case Atomic Formula
  • tabl(AF,InBranch,OutBranch) -
  • OutBranch AFInBranch,
  • \ clash(OutBranch).
  • clash(Branch) -
  • member(true(A),Branch),
  • member(false(A),Branch).
  • If we reach a literal on some branch and there is
    no clash, we stop a counter model has been
    found.
  • Else, we fail. This triggers backtracking for
    further waiting disjunctive expansions.

12
Main Ideas of Our Implementation
  • No explicit representation of the whole tableaux
    We always work on one branch at a time.
  • Branches are represented as lists of literals
    (nothing else matters).
  • Use a sequence of Prolog calls to do tableaux
    construction
  • Conjunctive expansion one clause per
    conjunctive/sign with recursive call(s).
  • Disjunctive expansion two clauses with a
    recursive call, backtracking if fail in first
    clause (i.e. no model found on left branch).

13
  • tabl(true(A),InBranch,OutBranch) -
  • !,tabl(false(A),InBranch,OutBranch).
  • tabl(false(A),InBranch,OutBranch) -
  • !,tabl(true(A),InBranch,OutBranch).
  • tabl(true(A B),InBranch,OutBranch) -
  • !,tabl(true(A),InBranch,K),
  • tabl(true(B),K,OutBranch).
  • tabl(false(A _),InBranch,OutBranch) -
  • tabl(false(A),InBranch,OutBranch).
  • tabl(false(_ B),InBranch, OutBranch) -
  • !,tabl(false(B),InBranch,OutBranch).
  • tabl(AF,InBranch,OutBranch) -
  • OutBranch AFInBranch,
  • \ clash(OutBranch).

14
Online Tableaux Interface
  • See example Interface.htm
  • Course Page
  • Link to tableaux interfaced
  • All Prolog code for download
  • The reader
  • This weeks slides
  • Corrected page of reader
  • Do not hesitate to email us

Try it out!
15
The Proof of the Pudding is in the Eating
  • Towards the end of this course
  • we show a system that combines semantics
    construction with our tableaux prover.
  • Given a model, we check whether a sentence is
  • Informative (is the information not already
    contained in the model)
  • Contradictory
  • Consistent

16
Conversational Maxims
  • Speaker and hearer obey some rules
  • H.P. Grice
  • Maxim of Quality Tell the truth!
  • Maxim of Manner Be relevant!
  • Maximes (and violation hereof) is used in
    conversations (studied by Pragmatics)
  • ADid you tell her you love her?
  • BOh, nice weather today

17
Our System
  • Example model M
  • John is a man.
  • John does not smoke.
  • Every man is human.
  • Every human works.
  • As large conjunctive Formula man(john)forall(x,h
    uman(x)gtwork(x))forall(y,man(y)gthuman(y))smoke(
    john)

18
  • check -
  • lambda(F),
  • M man(john)forall(x,human(x)gtwork(x))forall(y
    ,man
  • checkFormula(F,M).
  • checkFormula(F,M) -
  • theorem(MgtF),
  • nl, write('I know, I know...').
  • checkFormula(F,M) -
  • theorem((MF)),
  • nl, write('Impossible!').
  • checkFormula(_,_) -
  • nl, write('If you say so...').

19
Checking Consistency
  • theorem((MF))
  • Why does this ckeck whether F is inconsistent
    with M?
  • M contains no contradictions.
  • If ? (M ? F) is a theorem, then M ? F is a
    contradiction. This must be due to F because of
    (1).
  • System Demo

20
Extending our System
  • Argumentation, Syllogisms
  • Model extension
  • Extend model with NL input
  • Question answering
  • Question semantics, extend DCG
  • Check it out!
  • Other Systems using NLP and inference
  • Curt (Blackburn/Bos)
  • Doris (Bos)

21
Thanks for your Interest... enjoy Computational
Semantics!
Write a Comment
User Comments (0)
About PowerShow.com