the logic(s) of logic programming joão alcântara carlos viegas damásio luís moniz pereira centro...

32
The Logic(s) of Logic Programming João Alcântara Carlos Viegas Damásio Luís Moniz Pereira Centro de Inteligência Artificial (CENTRIA) Depto. Informática, Faculdade de Ciências e Tecnologia Universidade Nova de Lisboa 2829-516 Caparica, Portugal Altea, 23-25 October, 200

Upload: cory-bradford

Post on 16-Dec-2015

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: The Logic(s) of Logic Programming João Alcântara Carlos Viegas Damásio Luís Moniz Pereira Centro de Inteligência Artificial (CENTRIA) Depto. Informática,

The Logic(s) of Logic Programming

João AlcântaraCarlos Viegas Damásio

Luís Moniz Pereira

Centro de Inteligência Artificial (CENTRIA)

Depto. Informática, Faculdade de Ciências e Tecnologia

Universidade Nova de Lisboa

2829-516 Caparica, Portugal

Altea, 23-25 October, 2003

Page 2: The Logic(s) of Logic Programming João Alcântara Carlos Viegas Damásio Luís Moniz Pereira Centro de Inteligência Artificial (CENTRIA) Depto. Informática,

Outline

1. Objectives/Motivation

2. Overview of Substructural Logics

3. Frame Semantics for Logic Programming

4. Equilibrium Logics

5. Embeddings of Logic Programming Semantics

6. Conclusions and Future Work

Page 3: The Logic(s) of Logic Programming João Alcântara Carlos Viegas Damásio Luís Moniz Pereira Centro de Inteligência Artificial (CENTRIA) Depto. Informática,

1. Objectives/Motivation

• Definition of a logical framework general enough to capture SM, AS, PAS; WFS, WFSX and WFSXP

– Present version is limited to programs without disjunction and without embedded implications

• Challenge of characterising a logic that deals with these semantics uniformly

• Inspired by Pearce and Cabalar's works, and by Greg Restall's proposals for Substructural Logics

Page 4: The Logic(s) of Logic Programming João Alcântara Carlos Viegas Damásio Luís Moniz Pereira Centro de Inteligência Artificial (CENTRIA) Depto. Informática,

Objectives/Motivation (cont)

• Preliminary difficulties– WFS-based semantics use partial

interpretations, whilst SM, AS and PAS use only total ones.

– Coherence principle is not satisfied in PAS

– WFSXP and PAS are paraconsistent

– In WFSX and WFSXP, '' frustates some expected properties of the implication

Page 5: The Logic(s) of Logic Programming João Alcântara Carlos Viegas Damásio Luís Moniz Pereira Centro de Inteligência Artificial (CENTRIA) Depto. Informática,

2. Overview of Substructural Logics

• They allow us to draw many conclusions collapsed in classical logic– More complex semantics

• We can inflate the number of values for a sentence

• We can provide more places at which sentences are evaluated (points in frames)

Page 6: The Logic(s) of Logic Programming João Alcântara Carlos Viegas Damásio Luís Moniz Pereira Centro de Inteligência Artificial (CENTRIA) Depto. Informática,

Preliminary Definitions

• Point set P = P , is a set P together with a partial order on P.

• The set of propositions on P is the set of all subsets X of P which are closed upwards: if x X and x x’ then x’ X.

• The extensional connectives disjunction and conjunction have the usual interpretation

• Accessibility relations define intensional connectives: necessity and possibility, negation, and conditionals.

Page 7: The Logic(s) of Logic Programming João Alcântara Carlos Viegas Damásio Luís Moniz Pereira Centro de Inteligência Artificial (CENTRIA) Depto. Informática,

Accessibility Relations for Intensional Connectives

• Plump positive two-place (S) – for any x,y,x',y' P, where x S y, x' x and y y' it follows that x' S y'

• Plump negative two-place (C) – for any x,y,x',y' P, where x C y, x' x and y' y it follows that x' C y'

• Plump three-place (R) – for any x, y, z, x',y',z' P, where Rx y z, x' x ,y' y and z z' then Rx' y' z'

Page 8: The Logic(s) of Logic Programming João Alcântara Carlos Viegas Damásio Luís Moniz Pereira Centro de Inteligência Artificial (CENTRIA) Depto. Informática,

Frames for Substructural Logics

• A Frame F is a point set P together with any number of accessibility relations on P.

• Evaluating formulae– Intensional connectives with accessibility relations in

the frame– Plump conditions guarantee that satisfies heredity:

• If (M,x) F and x y then (M,y) F

Page 9: The Logic(s) of Logic Programming João Alcântara Carlos Viegas Damásio Luís Moniz Pereira Centro de Inteligência Artificial (CENTRIA) Depto. Informática,

3. Point Set for LP (Motivation)

thn ttnthp ttp

thn ttnthp ttp

thn ttnthp ttp

thn ttnthp ttp

A, not A

A, A, not A

not A, not A

A

w wA w A wSymbology:

a)

b)

c)

d)

Page 10: The Logic(s) of Logic Programming João Alcântara Carlos Viegas Damásio Luís Moniz Pereira Centro de Inteligência Artificial (CENTRIA) Depto. Informática,

Frame for Logic Programming

thn ttnthp ttp

P = [hhp,htp,thp,ttp,hhn,htn,thn,ttn],

hhn htnhhp htp

81 possible “propositions”

Enough to capture SM, AS, PAS; WFS, WFSX and WFSXP

Page 11: The Logic(s) of Logic Programming João Alcântara Carlos Viegas Damásio Luís Moniz Pereira Centro de Inteligência Artificial (CENTRIA) Depto. Informática,

Frame for Logic Programming

• Syntax: given a set of atoms , if , are

formulae, p , , not , ^, ( ), , , , , and are also formulas

• Interpretation in a point w: Iw - set of atoms

• HT4-Interpretation (Bh,Bt), in which

Bh = (Ihhp,Ihhn,Ihtp,Ihtn) Bt = (Ithp,Ithn,Ittp,Ittn) and Ihxp Itxp, Itxn Ihxn,

x {h,t}

Page 12: The Logic(s) of Logic Programming João Alcântara Carlos Viegas Damásio Luís Moniz Pereira Centro de Inteligência Artificial (CENTRIA) Depto. Informática,

Evaluation on Frames

• Given an HT4-Interpretation M = (Bh,Bt), in P = {hhp,htp,thp,ttp,hhn,htn,thn,ttn}, with the set of points W = {hhp,htp,thp,ttp,hhn,htn,thn,ttn} we say

1. (M,w) p iff p Iw , where p

2. (M,w) for all w W

3. (M,w) for no w W 4. (M,w) iff (M,w) and (M,w) 5. (M,w) iff (M,w) or (M,w)

Page 13: The Logic(s) of Logic Programming João Alcântara Carlos Viegas Damásio Luís Moniz Pereira Centro de Inteligência Artificial (CENTRIA) Depto. Informática,

Explicit Negation - R

hhn

thn

htn

ttn

hhp

thp

htp

ttp

R is plump negative two-place

6. (M,w) iff for all w' s.t. w R w' (M,w')

Page 14: The Logic(s) of Logic Programming João Alcântara Carlos Viegas Damásio Luís Moniz Pereira Centro de Inteligência Artificial (CENTRIA) Depto. Informática,

Default Negation - Rnot

htp htnhhp hhn

ttpttn

thpthn

7. (M,w) not iff for all w' s.t. w Rnot w' (M,w')

Rnot is plump negative two-place

Page 15: The Logic(s) of Logic Programming João Alcântara Carlos Viegas Damásio Luís Moniz Pereira Centro de Inteligência Artificial (CENTRIA) Depto. Informática,

Semi-normality Operator - R^

htp htnhhp hhn

ttp ttnthp thn

8. (M,w) ^ iff exists w' s.t. w R^ w' (M,w')

Page 16: The Logic(s) of Logic Programming João Alcântara Carlos Viegas Damásio Luís Moniz Pereira Centro de Inteligência Artificial (CENTRIA) Depto. Informática,

Possibility Operator - R

htp htnhhp hhn

ttp ttnthp thn

9. (M,w) () iff exists w' s.t. w R w' (M,w')

R is plump

positive two-place

Page 17: The Logic(s) of Logic Programming João Alcântara Carlos Viegas Damásio Luís Moniz Pereira Centro de Inteligência Artificial (CENTRIA) Depto. Informática,

Conditional - R

hhp, hhp, hhp

hhn, hhn, hhn

htp, htp, htp

htn, htn, htn

thp, thp, thp

thn, thn, thn

ttp, ttp, ttp

ttn, ttn, ttn

hhp,hhp,thp

hhn,thn,hhn

thn,hhn,hhn

thn,thn,hhn

htp,htp,ttp

htn,ttn,htn

ttn,htn,htn

ttn,ttn,htn

thp,hhp,thp

hhp,thp,thp

hhp,hhp,thp

thn,thn,hhn

ttp,htp,ttp

htp,ttp,ttp

htp,htp,ttp

ttn,ttn,htn

10. (M,w) iff for all w',w'' s.t. R ww'w'' if (M,w') , then (M,w'')

R is plump positive three-place

Page 18: The Logic(s) of Logic Programming João Alcântara Carlos Viegas Damásio Luís Moniz Pereira Centro de Inteligência Artificial (CENTRIA) Depto. Informática,

Model

• An HT4-Interpretation M is a model of a theory T iff for all w W and all formulae in T, then (M,w)

Page 19: The Logic(s) of Logic Programming João Alcântara Carlos Viegas Damásio Luís Moniz Pereira Centro de Inteligência Artificial (CENTRIA) Depto. Informática,

4. Equilibrium Logics

General Stable Model

General Well-founded Model

A belief set B is a general stable model of a theory T iff (B,B) is h-minimal among models of T

A belief set B is a general well-founded model of T iff (B,B) is t-minimal among the general stable models of T

Page 20: The Logic(s) of Logic Programming João Alcântara Carlos Viegas Damásio Luís Moniz Pereira Centro de Inteligência Artificial (CENTRIA) Depto. Informática,

Minimality Conditions•HT4-Interpretation (Bh,Bt), in which

(Bh,Bt) h (Ch,Ct) iff Bt = Ct and Bh Ch

(Bh,Bt) t (Ch,Ct) iff Bt F Ct

Bh Ch iff Ihxp Jhxp and Jhxn Ihxn, x {h,t}

Bt F Ct iff Ithp Jthp, Jthn Ithn, Jttp Ittp and Ittn Jttn

Bh = {Ihhp,Ihhn,Ihtp,Ihtn} Bt = {Ithp,Ithn,Ittp,Ittn}

Standard ordering:

Fitting’s ordering:

Page 21: The Logic(s) of Logic Programming João Alcântara Carlos Viegas Damásio Luís Moniz Pereira Centro de Inteligência Artificial (CENTRIA) Depto. Informática,

5. Embeddings of LP Semantics

• Difficulties

–WFS-based semantics use partial interpretations, whilst SM, AS and PAS use only total ones.

–Coherence principle is not satisfied in PAS

–WFSXP and PAS are paraconsistent

–In WFSX and WFSXP, '' is not interpreted in the same way as in AS and PAS.

Page 22: The Logic(s) of Logic Programming João Alcântara Carlos Viegas Damásio Luís Moniz Pereira Centro de Inteligência Artificial (CENTRIA) Depto. Informática,

Axioms

A not A

(A) A

() A (A)

not ()

Default Consistency (DC)

Definedness (DE)

Coherence Principle (CP)

No Negative Information (NNI)

Page 23: The Logic(s) of Logic Programming João Alcântara Carlos Viegas Damásio Luís Moniz Pereira Centro de Inteligência Artificial (CENTRIA) Depto. Informática,

Interpreting logic programs rules

•AS and PAS (Nelson's implication)

B A A (B \/ not A)

•WFSX and WFSXp

B A A (B \/ ^B)

Page 24: The Logic(s) of Logic Programming João Alcântara Carlos Viegas Damásio Luís Moniz Pereira Centro de Inteligência Artificial (CENTRIA) Depto. Informática,

Truth-values for SM

V1 = [hhn,htn,thn,ttn]

V2 = [hhn,htn,thn,thp,ttn,ttp] ;

V3 = [hhn,hhp,htn,htp,thn,thp,ttn,ttp]

not A

not A, not A

A, not A

•Axioms: NNI + DC + CP + DE

Page 25: The Logic(s) of Logic Programming João Alcântara Carlos Viegas Damásio Luís Moniz Pereira Centro de Inteligência Artificial (CENTRIA) Depto. Informática,

Truth-values for AS

V1 = [] ;

V2 = [hhn,htn] ;

V3 = [hhn,htn,thn,ttn] ;

V4 = [hhn,htn,thn,thp,ttn,ttp] ;

V5 = [hhn,hhp,htn,htp,thn,thp,ttn,ttp]

not A, not A

A, not A

A, not A

not A

not AAxioms CP + DC + DE

Page 26: The Logic(s) of Logic Programming João Alcântara Carlos Viegas Damásio Luís Moniz Pereira Centro de Inteligência Artificial (CENTRIA) Depto. Informática,

Truth-Values for PASV1 = [] ;

V2 = [thp,ttp] ;

V3 = [hhp,htp,thp,ttp] ;

V4 = [hhn,htn] ;

V5 = [hhn,htn,thp,ttp] ;

V6 = [hhn,htn,thn,ttn] ;

V7 = [hhn,htn,thn,thp,ttn,ttp] ;

V8 = [hhn,hhp,htn,htp,thp,ttp] ;

V9 = [hhn,hhp,htn,htp,thn,thp,ttn,ttp] ;

Axioms

DC + DE

Page 27: The Logic(s) of Logic Programming João Alcântara Carlos Viegas Damásio Luís Moniz Pereira Centro de Inteligência Artificial (CENTRIA) Depto. Informática,

Truth-values for WFS

V1 = [hhn,htn,thn,ttn] ;

V2 = [hhn,htn,thn,ttn,ttp] ;

V3 = [hhn,htn,thn,thp,ttn,ttp] ;

V4 = [hhn,htn,htp,thn,ttn,ttp] ;

V5 = [hhn,htn,htp,thn,thp,ttn,ttp] ;

V6 = [hhn,hhp,htn,htp,thn,thp,ttn,ttp]

Axioms

NNI + DC + CP

Page 28: The Logic(s) of Logic Programming João Alcântara Carlos Viegas Damásio Luís Moniz Pereira Centro de Inteligência Artificial (CENTRIA) Depto. Informática,

Truth-values for WFSX and WFSXp

•WFSX Axioms: DC + CP

15 truth-values

•WFSXp Axioms: CP

25 (coherent) truth-values

In WFSXp semantics, all operators are closed w.r.t. available truth-values !

Page 29: The Logic(s) of Logic Programming João Alcântara Carlos Viegas Damásio Luís Moniz Pereira Centro de Inteligência Artificial (CENTRIA) Depto. Informática,

Results (1)

•SM: NNI + DC + CP + DE

A belief set B is a stable model of a program P iff (B,B) is a general stable model of P

•AS: CP + DC + DE

A belief set B is an answer set of a program P iff (B,B) is a general stable model of P

•PAS: DC + DE

A belief set B is a paraconsistent answer set of a program P iff (B,B) is a general stable model of P

Page 30: The Logic(s) of Logic Programming João Alcântara Carlos Viegas Damásio Luís Moniz Pereira Centro de Inteligência Artificial (CENTRIA) Depto. Informática,

Results (2)

• WFS: NNI + DC + CP

A belief set B is a well-founded model of a program P iff (B,B) is a general well-founded model of P

• WFSX: DC + CP

A belief set B is a WFSX of a program P iff (B,B) is a general well-founded model of P

• WFSXp: CP

A belief set B is a WFSXp of a program P iff (B,B) is a general well-founded model of P

Page 31: The Logic(s) of Logic Programming João Alcântara Carlos Viegas Damásio Luís Moniz Pereira Centro de Inteligência Artificial (CENTRIA) Depto. Informática,

6. Conclusions

• We have defined a logic general enough to capture SM, AS, PAS; WFS, WFSX and WFSXP

• It allows to characterise logically the interrelationship among the semantics

Page 32: The Logic(s) of Logic Programming João Alcântara Carlos Viegas Damásio Luís Moniz Pereira Centro de Inteligência Artificial (CENTRIA) Depto. Informática,

Future Work

• Study of the disjunction for WFS based semantics

• Characterisation of the notion of logical consequence and entailment

• Detection of minimal properties in our frame to capture the cited semantics