a goal-directed calculus for standard conditional logicspozzato/oldws/cilc 2007 a.pdf · a...
TRANSCRIPT
A Goal-Directed Calculus forStandard Conditional Logics
Nicola Olivetti1 and Gian Luca Pozzato2
1 LSIS - UMR CNRS 6168 Universite Paul Cezanne (Aix-Marseille 3), Avenue
Escadrille Normandie-Niemen 13397 Marseille Cedex 20 - France
[email protected] Dipartimento di Informatica - Universita degli Studi di Torino, corso Svizzera 185 -
10149 Turin - Italy
A Goal-Directed Calculus for Standard Conditional Logics – p. 1
Introduction
• Proof methods for conditional logics
A Goal-Directed Calculus for Standard Conditional Logics – p. 2
Introduction
• Proof methods for conditional logics
• Goal-directed calculi for conditional logics
A Goal-Directed Calculus for Standard Conditional Logics – p. 2
Introduction
• Proof methods for conditional logics
• Goal-directed calculi for conditional logics
• Simple implementation in SICStus Prolog
A Goal-Directed Calculus for Standard Conditional Logics – p. 2
Outline
• Introduction to CL
• Sequent calculi SeqS’
A Goal-Directed Calculus for Standard Conditional Logics – p. 3
Outline
• Introduction to CL
• Sequent calculi SeqS’
• Goal-directed calculi U S’
A Goal-Directed Calculus for Standard Conditional Logics – p. 3
Outline
• Introduction to CL
• Sequent calculi SeqS’
• Goal-directed calculi U S’
• GOALDUCK: implementation of U S’
A Goal-Directed Calculus for Standard Conditional Logics – p. 3
Introduction to Conditional Logics
• Extensions of classical logic obtained by adding the
conditional operator ⇒
A Goal-Directed Calculus for Standard Conditional Logics – p. 5
Introduction to Conditional Logics
• Extensions of classical logic obtained by adding the
conditional operator ⇒
• Long history (Stalnaker and Lewis early 70s)
• Formalization of hypothetical reasoning : “if A were the
case then B”
• Formalization of counterfactual sentences : conditionals
of the form “if A were the case then B would be the
case", where A is false
A Goal-Directed Calculus for Standard Conditional Logics – p. 5
Introduction to Conditional Logics
• Recently, conditional logics have found applications in
several areas of artificial intelligence and knowledge
representation
A Goal-Directed Calculus for Standard Conditional Logics – p. 6
Introduction to Conditional Logics
• Recently, conditional logics have found applications in
several areas of artificial intelligence and knowledge
representation
• Formalization of knowledge update and revision [Gra98]
• Correspondence between AGM revision and conditional
logics
• Ramsey test : A ⇒ B “holds" in a knowledge base K if
and only if B “holds" in the knowledge base K
revised/updated with A
• (RT) K ⊢ A ⇒ B iff K ◦ A ⊢ B (◦ ≡ revision/update
operator)
A Goal-Directed Calculus for Standard Conditional Logics – p. 6
Introduction to Conditional Logics
• modelization of hypothetical queries in deductive databases
and logic programming [GGM+00]
• modelization of causal inference and reasoning about action
execution in planning [Sch99, GS04]
• modelization of actions and causations
[Pea99, Pea00, GP98]
A Goal-Directed Calculus for Standard Conditional Logics – p. 7
Introduction to Conditional Logics
• modelization of hypothetical queries in deductive databases
and logic programming [GGM+00]
• modelization of causal inference and reasoning about action
execution in planning [Sch99, GS04]
• modelization of actions and causations
[Pea99, Pea00, GP98]
• very few proof methods (and even less theorem provers)
A Goal-Directed Calculus for Standard Conditional Logics – p. 7
Conditional Logics
• Propositional conditional language L defined from:
A Goal-Directed Calculus for Standard Conditional Logics – p. 8
Conditional Logics
• Propositional conditional language L defined from:
• a set of propositional variables ATM
A Goal-Directed Calculus for Standard Conditional Logics – p. 8
Conditional Logics
• Propositional conditional language L defined from:
• a set of propositional variables ATM
• symbols of false ⊥ and true ⊤
A Goal-Directed Calculus for Standard Conditional Logics – p. 8
Conditional Logics
• Propositional conditional language L defined from:
• a set of propositional variables ATM
• symbols of false ⊥ and true ⊤
• set of connectives ¬, →, ∨, ∧, ⇒
A Goal-Directed Calculus for Standard Conditional Logics – p. 8
Conditional Logics
• Propositional conditional language L defined from:
• a set of propositional variables ATM
• symbols of false ⊥ and true ⊤
• set of connectives ¬, →, ∨, ∧, ⇒
• Formulas:
A Goal-Directed Calculus for Standard Conditional Logics – p. 8
Conditional Logics
• Propositional conditional language L defined from:
• a set of propositional variables ATM
• symbols of false ⊥ and true ⊤
• set of connectives ¬, →, ∨, ∧, ⇒
• Formulas:
• atomic formulas: ⊥, ⊤, and the propositional variables of
ATM
A Goal-Directed Calculus for Standard Conditional Logics – p. 8
Conditional Logics
• Propositional conditional language L defined from:
• a set of propositional variables ATM
• symbols of false ⊥ and true ⊤
• set of connectives ¬, →, ∨, ∧, ⇒
• Formulas:
• atomic formulas: ⊥, ⊤, and the propositional variables of
ATM
• if A is a formula, then ¬A is a complex formula
A Goal-Directed Calculus for Standard Conditional Logics – p. 8
Conditional Logics
• Propositional conditional language L defined from:
• a set of propositional variables ATM
• symbols of false ⊥ and true ⊤
• set of connectives ¬, →, ∨, ∧, ⇒
• Formulas:
• atomic formulas: ⊥, ⊤, and the propositional variables of
ATM
• if A is a formula, then ¬A is a complex formula
• if A and B are formulas, A → B, A ∨ B, A ∧ B, and A ⇒
B are complex formulas
A Goal-Directed Calculus for Standard Conditional Logics – p. 8
Conditional Logics
• Example : (P → R) → (Q ⇒ ⊥)
• Example : (P ⇒ Q) ⇒ R
A Goal-Directed Calculus for Standard Conditional Logics – p. 9
Conditional Logics
• Example : (P → R) → (Q ⇒ ⊥)
• Example : (P ⇒ Q) ⇒ R
• Possible world structures (as in modal logics)
• The conditional operator is a sort of modality indexed by a
formula of the same language
A Goal-Directed Calculus for Standard Conditional Logics – p. 9
Conditional Logics
• Example : (P → R) → (Q ⇒ ⊥)
• Example : (P ⇒ Q) ⇒ R
• Possible world structures (as in modal logics)
• The conditional operator is a sort of modality indexed by a
formula of the same language
• Lack of a universally accepted semantics
• Two most popular semantics:
• selection function semantics
• sphere semantics
A Goal-Directed Calculus for Standard Conditional Logics – p. 9
Conditional Logics
• Example : (P → R) → (Q ⇒ ⊥)
• Example : (P ⇒ Q) ⇒ R
• Possible world structures (as in modal logics)
• The conditional operator is a sort of modality indexed by a
formula of the same language
• Lack of a universally accepted semantics
• Two most popular semantics:
• selection function semantics
• sphere semantics
A Goal-Directed Calculus for Standard Conditional Logics – p. 10
Selection function model
M = 〈W, f, [ ]〉
• W is a non empty set of items called worlds
• f is the selection function
f : W × 2W −→ 2W
• [ ] is the evaluation function :
• [⊥] = ∅
• [A → B]=(W - [A]) ∪ [B]
• [A ⇒ B]={w ∈ W | f (w, [A]) ⊆ [B]}
A Goal-Directed Calculus for Standard Conditional Logics – p. 11
Conditional Logics
• Intuitive meaning: given a world w and a formula A, f
selects the worlds most “similar” to w given A
A Goal-Directed Calculus for Standard Conditional Logics – p. 12
Conditional Logics
• Intuitive meaning: given a world w and a formula A, f
selects the worlds most “similar” to w given A
• A ⇒ B holds in w if B holds in all worlds selected by f for w
and A
A Goal-Directed Calculus for Standard Conditional Logics – p. 12
Conditional Logics
• Intuitive meaning: given a world w and a formula A, f
selects the worlds most “similar” to w given A
• A ⇒ B holds in w if B holds in all worlds selected by f for w
and A
• A ⇒ B holds in w if B holds in f(w,A)
A Goal-Directed Calculus for Standard Conditional Logics – p. 12
Conditional Logics
• Intuitive meaning: given a world w and a formula A, f
selects the worlds most “similar” to w given A
• A ⇒ B holds in w if B holds in all worlds selected by f for w
and A
• A ⇒ B holds in w if B holds in f(w,A)
• Normality condition : f(w, [A]) rather than f(w,A)
A Goal-Directed Calculus for Standard Conditional Logics – p. 12
Conditional Logics
• Intuitive meaning: given a world w and a formula A, f
selects the worlds most “similar” to w given A
• A ⇒ B holds in w if B holds in all worlds selected by f for w
and A
• A ⇒ B holds in w if B holds in f(w,A)
• Normality condition : f(w, [A]) rather than f(w,A)
• Equivalent to: if [A] = [A′], then f(w,A) = f(w,A′)
A Goal-Directed Calculus for Standard Conditional Logics – p. 12
Conditional Logics
• Semantics of the basic normal conditional system CK
• CK is the fundamental system (as K for modal logic)
• Formulas valid in CK are valid in every selection function
model
• Other conditional systems are obtained by assuming further
properties on the selection function
System Axiom Model condition
ID A ⇒ A f(w, [A]) ⊆ [A]
MP (A ⇒ B) → (A → B) w ∈ [A] → w ∈ f(w, [A])
A Goal-Directed Calculus for Standard Conditional Logics – p. 13
Proof methods for Conditional Logics
• Very few proof methods for conditional logics
A Goal-Directed Calculus for Standard Conditional Logics – p. 15
Proof methods for Conditional Logics
• Very few proof methods for conditional logics
• Sequent calculi SeqS’ for:
A Goal-Directed Calculus for Standard Conditional Logics – p. 15
Proof methods for Conditional Logics
• Very few proof methods for conditional logics
• Sequent calculi SeqS’ for:
• the basic system CK
A Goal-Directed Calculus for Standard Conditional Logics – p. 15
Proof methods for Conditional Logics
• Very few proof methods for conditional logics
• Sequent calculi SeqS’ for:
• the basic system CK
• extensions with ID and MP
A Goal-Directed Calculus for Standard Conditional Logics – p. 15
Sequent Calculi SeqS’
• Labelled deductive system
A Goal-Directed Calculus for Standard Conditional Logics – p. 16
Sequent Calculi SeqS’
• Labelled deductive system
• Labels used to represent possibile worlds
A Goal-Directed Calculus for Standard Conditional Logics – p. 16
Sequent Calculi SeqS’
• Labelled deductive system
• Labels used to represent possibile worlds
• 2 kinds of labelled formulas:
• world formulas x : A
• transition formulas xA
−→ y
A Goal-Directed Calculus for Standard Conditional Logics – p. 16
Sequent Calculi SeqS’
• Labelled deductive system
• Labels used to represent possibile worlds
• 2 kinds of labelled formulas:
• world formulas x : A
• transition formulas xA
−→ y
• representing:
• A holds in the world x
• y ∈ f(x, [A])
A Goal-Directed Calculus for Standard Conditional Logics – p. 16
Sequent Calculi SeqS’
• A sequent is a pair
〈Γ,∆〉
Γ ⊢ ∆
• Γ and ∆ are multisets of labelled formulas
A Goal-Directed Calculus for Standard Conditional Logics – p. 17
Sequent Calculi SeqS’
• A sequent is a pair
〈Γ,∆〉
Γ ⊢ ∆
• Γ and ∆ are multisets of labelled formulas
• Intuitive meaning of Γ ⊢ ∆:
• every model that satisfies all labelled formulas of Γ in the
respective worlds (specified by the labels) satisfies at least
one of the labelled formulas of ∆ (in those worlds)
A Goal-Directed Calculus for Standard Conditional Logics – p. 17
(AX) ! , x : P ! ", x : P (P " ATM )
(A!) ! , x : ! " " (A!) ! " ", x : !
! ! ", x : A(¬R)
! ! ", x : ¬A(¬L) ! , x : A ! "! , x : ¬A ! "
(!L)! , x : A ! B " "
! , x : A, x : B ! "(!R)
! ! ", x : A " B
! ! ", x : A ! ! ", x : B
(!L)! , x : A ! " ! , x : B ! "
! , x : A ! B " "
! ! ", x : A, x : B(!R)
! ! ", x : A " B
(! L)! , x : A! B " "
! ! ", x : A ! , x : B ! "(! R)
! ! ", x : A" B
! , x : A ! ", x : B
(! L)! , x : A! B " "
! , x : A! B " ", x A#$ y ! , x : A! B , y : B " "(! R)
! ! ", x : A" B
! , x A!" y # ", y : B
! , x A!" y # ", x B!" y
u : A ! u : B u : B ! u : A(EQ)
! ! ", x A"# x , x : A
! ! ", x A"# x(MP )
! , x A!" y # "(ID) ! , x A!" y , y : A # "
Uniform Proofs
• SeqS’ calculi used to develop goal-directed proof
procedures for conditional logics
• paradigm of Uniform Proofs [MNPS91, GO00]
• extensions of logic programming based on conditional logics
• generalization of conventional logic programming
A Goal-Directed Calculus for Standard Conditional Logics – p. 19
Uniform Proofs
• SeqS’ calculi used to develop goal-directed proof
procedures for conditional logics
• paradigm of Uniform Proofs [MNPS91, GO00]
• extensions of logic programming based on conditional logics
• generalization of conventional logic programming
• Sequent Γ ⊢ G where:
• Γ represents the “program” or “database”
• G is the “goal” whose proof is searched
A Goal-Directed Calculus for Standard Conditional Logics – p. 19
Uniform Proofs
• Basic idea: backward proof of Γ ⊢ G is driven by the goal G
A Goal-Directed Calculus for Standard Conditional Logics – p. 20
Uniform Proofs
• Basic idea: backward proof of Γ ⊢ G is driven by the goal G
• G is stepwise decomposed according to its logical structure
by the rules of the calculus, until its atomic constituents are
reached
A Goal-Directed Calculus for Standard Conditional Logics – p. 20
Uniform Proofs
• Basic idea: backward proof of Γ ⊢ G is driven by the goal G
• G is stepwise decomposed according to its logical structure
by the rules of the calculus, until its atomic constituents are
reached
• The connectives in G can be interpreted operationally as
search instructions
A Goal-Directed Calculus for Standard Conditional Logics – p. 20
Uniform Proofs
• Basic idea: backward proof of Γ ⊢ G is driven by the goal G
• G is stepwise decomposed according to its logical structure
by the rules of the calculus, until its atomic constituents are
reached
• The connectives in G can be interpreted operationally as
search instructions
• To prove an atomic goal Q, one looks in Γ for one “clause”
whose head matches with Q and tries to prove the “body” of
the clause
A Goal-Directed Calculus for Standard Conditional Logics – p. 20
Uniform Proofs
• Not every provable sequent admits a uniform proof
• One must identify a (significant) fragment of the langauge
allowing uniform proofs
A Goal-Directed Calculus for Standard Conditional Logics – p. 21
Uniform Proofs
• Not every provable sequent admits a uniform proof
• One must identify a (significant) fragment of the langauge
allowing uniform proofs
• We distinguish:
• database formulas (D-formulas)
• transition formulas xA
−→ y
• formulas that can be asked as goals (G-formulas)
A Goal-Directed Calculus for Standard Conditional Logics – p. 21
Uniform Proofs
• Not every provable sequent admits a uniform proof
• One must identify a (significant) fragment of the langauge
allowing uniform proofs
• We distinguish:
• database formulas (D-formulas)
• transition formulas xA
−→ y
• formulas that can be asked as goals (G-formulas)
• Goal-directed calculi for conditional logics: U S’
A Goal-Directed Calculus for Standard Conditional Logics – p. 21
Uniform Proofs
• Fragment of L allowing uniform proofs:
• D = G → Q | A ⇒ D
• G = Q | ⊤ | G ∧ G | G ∨ G | A ⇒ G
• A = Q | A ∧ A | A ∨ A
A Goal-Directed Calculus for Standard Conditional Logics – p. 22
Uniform Proofs
• Fragment of L allowing uniform proofs:
• D = G → Q | A ⇒ D
• G = Q | ⊤ | G ∧ G | G ∨ G | A ⇒ G
• A = Q | A ∧ A | A ∨ A
• database Γ = D-formulas + transition formulas
A Goal-Directed Calculus for Standard Conditional Logics – p. 22
Calculi U S’
• U S’ calculi are sound and complete for the selected
fragment
A Goal-Directed Calculus for Standard Conditional Logics – p. 23
Calculi U S’
• U S’ calculi are sound and complete for the selected
fragment
• Example : reading of a conditional A ⇒ B
• “if the current state is updated with A then B holds”
• (A might be an action) “as an effect of A, B holds” or
“having performed A, B holds”
A Goal-Directed Calculus for Standard Conditional Logics – p. 23
Calculi U S’
• formula of type A: either an atomic formula or a boolean
combination of conjunctions and disjunctions of atomic
formulas
• Flat(x : A): flats the conjunction/disjunction into sets of
atomic formulas and SG ∈ Flat(x : G)}
• Flat(x : Q) = {{x : Q}}, with Q ∈ ATM
• Flat(x : F ∨ G) = Flat(x : F ) ∪ Flat(x : G)
• Flat(x : F ∧ G) = {SF ∪ SG | SF ∈ Flat(x : F )}
A Goal-Directed Calculus for Standard Conditional Logics – p. 24
(U trans) ! !GD xA"# y ! Flat(u : A!) !GD u : A and Flat(u : A) !GD u : A! if x
A!"# y $ !
(U!) ! "GD x : !
if y : A1 ! A2 ! . . .! An ! (G " Q)
(U ax) ! !GD x : Q if x : Q " !
(U !) ! "GD x : G1 !G2 ! ! "GD x : G1 or ! "GD x : G2
(U prop) ! !GD x : Q ! ! !GD y A1"# x1 ,! !GD x1A2"# x2 , . . . ,! !GD xn!1
An"# x ,! !GD x : G
(U !) ! "GD x : G1 !G2 ! ! "GD x : G1 and ! "GD x : G2
! !
and x != y
(U !)CK ! "GD x : A! G ! !, xA#$ y "GD y : G (y new)
(U !)ID ! "GD x : A! G ! !, xA#$ y, Flat(y : A) "GD y : G (y new)
(U trans)MP ! !GD xA"# x ! ! !GD x : A
GOALDUCK: implementation of U S’
• GOALDUCK: simple implementation of the calculi U S’
• SICStus Prolog program of only eight clauses: each one of
them implements a rule of U S’
A Goal-Directed Calculus for Standard Conditional Logics – p. 25
GOALDUCK: implementation of U S’
• GOALDUCK: simple implementation of the calculi U S’
• SICStus Prolog program of only eight clauses: each one of
them implements a rule of U S’
• Goal-directed proof search implemented by a predicate
prove(Goal,Gamma,Trans,Labels).
A Goal-Directed Calculus for Standard Conditional Logics – p. 25
GOALDUCK: implementation of U S’
• GOALDUCK: simple implementation of the calculi U S’
• SICStus Prolog program of only eight clauses: each one of
them implements a rule of U S’
• Goal-directed proof search implemented by a predicate
prove(Goal,Gamma,Trans,Labels).
which succeeds iff G, represented by Goal, derives from
the KB Γ, represented by the list of world formulas Gamma
and by the list of transition formulas Trans
A Goal-Directed Calculus for Standard Conditional Logics – p. 25
GOALDUCK: implementation of U S’
prove([X,A => G],Gamma,Trans,Labels):-
generateLabel(Y,Labels),
prove([Y,G],Gamma,[[X,A,Y]|Trans],[Y|Labels]).
prove([X,Q],Gamma,Trans,Labels):-
member([Y,F=>(G->Q)],Gamma),atom(Q),
prove([X,G],Gamma,Trans,Labels),extract(F,List),
proveList(X,Y,List,Gamma,Trans,Labels).
A Goal-Directed Calculus for Standard Conditional Logics – p. 26
GOALDUCK: implementation of U S’
prove([X,A,Y], ,Trans, ):-
member([X,AP,Y],Trans),
flat(A,FlattenedA),flat(AP,FlattenedAP),
proveFlat([x,A],[],[],[x],x,FlattenedAP),
proveFlat([x,AP],[],[],[x],x,FlattenedA).
A Goal-Directed Calculus for Standard Conditional Logics – p. 27
Performances of GOALDUCK
Theorem prover positive answers negative answers timeouts
CondLean 47 0 53
GOALDUCK 67 16 17
• 100 goal
• 20 propositional variables in the database, only 3 in the
goals
• 200 formulas in the database
• time limit: 100ms
A Goal-Directed Calculus for Standard Conditional Logics – p. 28
Conclusions
• We have provided goal-directed calculi for normal
conditional logics: U S’
A Goal-Directed Calculus for Standard Conditional Logics – p. 30
Conclusions
• We have provided goal-directed calculi for normal
conditional logics: U S’
• Sound and complete wrt to the semantics, if the language
considered is restricted to a specific fragment allowing
uniform proofs
A Goal-Directed Calculus for Standard Conditional Logics – p. 30
Conclusions
• We have provided goal-directed calculi for normal
conditional logics: U S’
• Sound and complete wrt to the semantics, if the language
considered is restricted to a specific fragment allowing
uniform proofs
• GOALDUCK: simple implementation in SICStus Prolog
A Goal-Directed Calculus for Standard Conditional Logics – p. 30
Conclusions
• We have provided goal-directed calculi for normal
conditional logics: U S’
• Sound and complete wrt to the semantics, if the language
considered is restricted to a specific fragment allowing
uniform proofs
• GOALDUCK: simple implementation in SICStus Prolog
• no other goal-directed calculi/theorem provers in the
literature
A Goal-Directed Calculus for Standard Conditional Logics – p. 30
Future Work
• Further investigation could lead to the development of
extensions of logic programming based on conditional logics
A Goal-Directed Calculus for Standard Conditional Logics – p. 31
Future Work
• Further investigation could lead to the development of
extensions of logic programming based on conditional logics
• We aim to develop goal-directed calculi for other conditional
logics (CEM, CS), in order to extend GOALDUCK to support
all of them
A Goal-Directed Calculus for Standard Conditional Logics – p. 31
Future Work
• Further investigation could lead to the development of
extensions of logic programming based on conditional logics
• We aim to develop goal-directed calculi for other conditional
logics (CEM, CS), in order to extend GOALDUCK to support
all of them
• Broader language allowing uniform proofs
A Goal-Directed Calculus for Standard Conditional Logics – p. 31
Future Work
• Further investigation could lead to the development of
extensions of logic programming based on conditional logics
• We aim to develop goal-directed calculi for other conditional
logics (CEM, CS), in order to extend GOALDUCK to support
all of them
• Broader language allowing uniform proofs
• Increase GOALDUCK’s performances by experimenting
standard refinements and heuristics
A Goal-Directed Calculus for Standard Conditional Logics – p. 31
References
[GGM+00] D. M. Gabbay, L. Giordano, A. Martelli, N. Olivetti,
and M. L. Sapino. Conditional reasoning in logic
programming. Journal of Logic Programming,
44(1-3):37–74, 2000.
[GO00] D. M. Gabbay and N. Olivetti. Goal-directed Proof
Theory. Kluwer Academic Publishers, 2000.
[GP98] D. Galles and J. Pearl. An axiomatic character-
ization of causal counterfactuals. Foundation of
Science, 3(1):151–182, 1998.
[Gra98] G. Grahne. Updates and counterfactuals. Journal
of Logic and Computation, 8(1):87–117, 1998.
[GS04] L. Giordano and C. Schwind. Conditional logic
of actions and causation. Artificial Intelligence,
157(1-2):239–279, 2004.
[MNPS91] D. Miller, G. Nadathur, F. Pfenning, and A. Scedrov.
Uniform proofs as a foundation for logic program-
ming. In Annal of Pure and Applied Logic, 51(1-
2):125–157, 1991.
32-1
[Pea99] J. Pearl. Reasoning with cause and effect.
In T. Dean, editor, Proceedings of IJCAI 1999
(16th International Joint Conference on Artificial
Intelligence), pages 1437–1449, Stockholm, Swe-
den, 1999. Morgan Kaufmann.
[Pea00] J. Pearl. Causality: Model, Reasoning and
Inference. Cambridge University Press, 2000.
[Sch99] C. B. Schwind. Causality in action theories.
Electronic Transactions on Artificial Intelligence
(ETAI), 3(A):27–50, 1999.
32-2