automated reasoning · 2018-12-07 · automated reasoning agostino dovier universita di udine`...

Post on 29-Jun-2020

5 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

AUTOMATED REASONING

Agostino Dovier

Universita di UdineCLPLAB

Udine, December 7, 2018

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 1 / 22

ASP solving (in short)

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 2 / 22

ASP SOLVING IN SHORT

The solving procedure starts from the ground program PThe first solver Smodels was a DPLL-like procedure (with a finalunfounded set check)The breakthrough come with Clasp which is based onconflict-driven clause learningIt starts as in DPLL, then it learns new clauses each time a failureis found

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 3 / 22

ASP SOLVING IN SHORT

ω1︷ ︸︸ ︷(x1 ∨ x31 ∨ ¬x2)∧

ω2︷ ︸︸ ︷(x1 ∨ ¬x3)∧

ω3︷ ︸︸ ︷(x2 ∨ x3 ∨ x4)∧

ω4︷ ︸︸ ︷(¬x4 ∨ ¬x5)∧

ω5︷ ︸︸ ︷(x21 ∨ ¬x4 ∨ ¬x6)∧

ω6︷ ︸︸ ︷(x5 ∨ x6)

You can learn x31 ∨ x1 ∨ x21. (but also ¬x4 ∨ x21—various strategies are defined)[Marques-Silva, Lynce, and Malik. Handbook of Satisfiability, Chapter 4, 2008]

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 4 / 22

ASP SOLVING IN SHORT

ω1︷ ︸︸ ︷(x1 ∨ x31 ∨ ¬x2)∧

ω2︷ ︸︸ ︷(x1 ∨ ¬x3)∧

ω3︷ ︸︸ ︷(x2 ∨ x3 ∨ x4)∧

ω4︷ ︸︸ ︷(¬x4 ∨ ¬x5)∧

ω5︷ ︸︸ ︷(x21 ∨ ¬x4 ∨ ¬x6)∧

ω6︷ ︸︸ ︷(x5 ∨ x6)

You can learn x31 ∨ x1 ∨ x21. (but also ¬x4 ∨ x21—various strategies are defined)[Marques-Silva, Lynce, and Malik. Handbook of Satisfiability, Chapter 4, 2008]

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 4 / 22

ASP SOLVING IN SHORT

The graph is not “written somewhere”; it can be (partially) discovered using the so-calledresolution rule, namely

(α ∨ X) ∧ (β ∨ ¬X) ↔ (α ∨ β)

[Exercise: prove the equivalence!]

In the example:

ω1︷ ︸︸ ︷(x1 ∨ x31 ∨ ¬x2)∧

ω2︷ ︸︸ ︷(x1 ∨ ¬x3)∧

ω3︷ ︸︸ ︷(x2 ∨ x3 ∨ x4)∧

ω4︷ ︸︸ ︷(¬x4 ∨ ¬x5)∧

ω5︷ ︸︸ ︷(x21 ∨ ¬x4 ∨ ¬x6)∧

ω6︷ ︸︸ ︷(x5 ∨ x6)

X6 : ω5 ∧ ω6 ↔ (X21 ∨ ¬X4 ∨ X5)

X5 : (x21 ∨ ¬X4 ∨ X5) ∧ ω4 ↔ (x21 ∨ ¬X4) One could stop here or continue:

X4 : (x21 ∨ ¬X4) ∧ ω3 ↔ (X21 ∨ X2 ∨ X3)

X3 : (X21 ∨ X2 ∨ X3) ∧ ω2 ↔ (X21 ∨ X1 ∨ X2)

X2 : (X21 ∨ X1 ∨ X2) ∧ ω1 ↔ (X21 ∨ X31 ∨ X1)(now we have the decision variable of this level or variables of higher levels: stop)

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 5 / 22

SMODELS: ABSTRACT VIEWUNFOUNDED SET (VAN GELDER ET AL. 1991)

A set of atoms U is an unfounded set for a program P w.r.t. aninterpretation M if for each rule r ∈ P such that head(r) ∈ U it holdsthat

M 6|= Body(r) OR(M |= Body(r) AND) Body+(r) ∩ U 6= ∅

For instance, consider

p :- q, not rq :- p, not s

and suppose M = {p,q}. Then U = {p,q} is an unfounded set.

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 6 / 22

“ABSTRACT” ASP SOLVING

Let us see an abstract description of the ASP solver proposed byYuliya Lierler (Univ. Nebraska at Omaha)

Guess who is who in the picture . . .AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 7 / 22

SMODELS: ABSTRACT VIEW

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 8 / 22

SMODELS: ABSTRACT VIEW

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 9 / 22

CLASP (AND CUD@ASP)

Initial Propagation

Selection

Violation?Fail NoGoodCheckandPropagateNY

ViolationY N

LEVEL=1FailY

Conflict Analysis

N

Update ;Update A;

Update LEVEL

TOTAL Return AY

N

Update A;Increment LEVEL

LEVEL=1

Input ∅

The key of CLASP efficiency is conflict analysis and nogood learning

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 10 / 22

Knowledge Representation

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 11 / 22

INTRODUCTION

Chitta Baral and Michael Gelfond. Logic Programming and KnowledgeRepresentation Journal of Logic Programming 19/20, 73–148, 1994. (PDFavailable on-line)

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 12 / 22

INTRODUCTION

Chitta Baral and Michael Gelfond. Logic Programming and KnowledgeRepresentation Journal of Logic Programming 19/20, 73–148, 1994. (PDFavailable on-line)

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 12 / 22

INTRODUCTION

Chitta Baral and Michael Gelfond. Logic Programming and KnowledgeRepresentation Journal of Logic Programming 19/20, 73–148, 1994. (PDFavailable on-line)

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 12 / 22

INTRODUCTION

Chitta Baral and Michael Gelfond. Logic Programming and KnowledgeRepresentation Journal of Logic Programming 19/20, 73–148, 1994. (PDFavailable on-line)

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 12 / 22

INTRODUCTIONTHE SYLLOGISM

Socrate is a manAll men are mortalTherefore Socrate is mortal

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 13 / 22

INTRODUCTIONTHE SYLLOGISM

Socrate is a manAll men are mortalTherefore Socrate is mortal

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 13 / 22

INTRODUCTIONTHE SYLLOGISM

Socrate is a manAll men are mortalTherefore Socrate is mortal

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 13 / 22

INTRODUCTIONTHE SYLLOGISM

Let us model this statement using f.o.l.Socrate is a man

man(socrate) (1)

All men are mortal

∀X (man(X )→ mortal(X )) (2)

Let’s have a look on the direction of the implication. If rex is a dog wehave that mortal(rex) but not that man(rex) One should know thata dog is not a man (or one can inference that using Complete WorldAssumption).Observe that

(1), (2) |= mortal(socrate)

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 14 / 22

INTRODUCTIONTHE SYLLOGISM

Let us model this statement using f.o.l.Socrate is a man

man(socrate) (1)

All men are mortal

∀X (man(X )→ mortal(X )) (2)

Let’s have a look on the direction of the implication. If rex is a dog wehave that mortal(rex) but not that man(rex) One should know thata dog is not a man (or one can inference that using Complete WorldAssumption).Observe that

(1), (2) |= mortal(socrate)

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 14 / 22

INTRODUCTIONTHE SYLLOGISM

Let us model this statement using f.o.l.Socrate is a man

man(socrate) (1)

All men are mortal

∀X (man(X )→ mortal(X )) (2)

Let’s have a look on the direction of the implication. If rex is a dog wehave that mortal(rex) but not that man(rex) One should know thata dog is not a man (or one can inference that using Complete WorldAssumption).Observe that

(1), (2) |= mortal(socrate)

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 14 / 22

INTRODUCTIONTHE SYLLOGISM

Let us model this statement using f.o.l.Socrate is a man

man(socrate) (1)

All men are mortal

∀X (man(X )→ mortal(X )) (2)

Let’s have a look on the direction of the implication. If rex is a dog wehave that mortal(rex) but not that man(rex) One should know thata dog is not a man (or one can inference that using Complete WorldAssumption).Observe that

(1), (2) |= mortal(socrate)

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 14 / 22

INTRODUCTIONTHE SYLLOGISM

Let us model this statement using f.o.l.Socrate is a man

man(socrate) (1)

All men are mortal

∀X (man(X )→ mortal(X )) (2)

Let’s have a look on the direction of the implication. If rex is a dog wehave that mortal(rex) but not that man(rex) One should know thata dog is not a man (or one can inference that using Complete WorldAssumption).Observe that

(1), (2) |= mortal(socrate)

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 14 / 22

INTRODUCTIONTHE SYLLOGISM

Let us model this statement using f.o.l.Socrate is a man

man(socrate) (1)

All men are mortal

∀X (man(X )→ mortal(X )) (2)

Let’s have a look on the direction of the implication. If rex is a dog wehave that mortal(rex) but not that man(rex) One should know thata dog is not a man (or one can inference that using Complete WorldAssumption).Observe that

(1), (2) |= mortal(socrate)

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 14 / 22

INTRODUCTIONTHE SYLLOGISM

Let us model this statement using f.o.l.Socrate is a man

man(socrate) (1)

All men are mortal

∀X (man(X )→ mortal(X )) (2)

Let’s have a look on the direction of the implication. If rex is a dog wehave that mortal(rex) but not that man(rex) One should know thata dog is not a man (or one can inference that using Complete WorldAssumption).Observe that

(1), (2) |= mortal(socrate)

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 14 / 22

INTRODUCTIONTHE SYLLOGISM

Let us model this statement using f.o.l.Socrate is a man

man(socrate) (1)

All men are mortal

∀X (man(X )→ mortal(X )) (2)

Let’s have a look on the direction of the implication. If rex is a dog wehave that mortal(rex) but not that man(rex) One should know thata dog is not a man (or one can inference that using Complete WorldAssumption).Observe that

(1), (2) |= mortal(socrate)

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 14 / 22

INTRODUCTIONTHE SYLLOGISM

If we discovered thatman(agostino) (3)

we have that(1), (2), (3) |= mortal(socrate)

and(1), (2), (3) |= mortal(agostino)

If, augmenting the premises, theorems that were true remains true(and possibly we have new theorems) we are in a monotonic setting.

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 15 / 22

INTRODUCTIONTHE SYLLOGISM

If we discovered thatman(agostino) (3)

we have that(1), (2), (3) |= mortal(socrate)

and(1), (2), (3) |= mortal(agostino)

If, augmenting the premises, theorems that were true remains true(and possibly we have new theorems) we are in a monotonic setting.

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 15 / 22

INTRODUCTIONNON MONOTONIC SETTINGS

You want to cross the railway.You can cross safely if the train is not there.If the barriers are horizontal the train is there.The barriers are vertical.You’ll probably crossNew info: If there is a power failure the barriers are always horizontalor always vertical.Would you cross now?New info: There is a power failure.Would you cross now?New info: You hear the train noise.Would you cross now?

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 16 / 22

INTRODUCTIONNON MONOTONIC SETTINGS

You want to cross the railway.You can cross safely if the train is not there.If the barriers are horizontal the train is there.The barriers are vertical.You’ll probably crossNew info: If there is a power failure the barriers are always horizontalor always vertical.Would you cross now?New info: There is a power failure.Would you cross now?New info: You hear the train noise.Would you cross now?

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 16 / 22

INTRODUCTIONNON MONOTONIC SETTINGS

You want to cross the railway.You can cross safely if the train is not there.If the barriers are horizontal the train is there.The barriers are vertical.You’ll probably crossNew info: If there is a power failure the barriers are always horizontalor always vertical.Would you cross now?New info: There is a power failure.Would you cross now?New info: You hear the train noise.Would you cross now?

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 16 / 22

INTRODUCTIONNON MONOTONIC SETTINGS

You want to cross the railway.You can cross safely if the train is not there.If the barriers are horizontal the train is there.The barriers are vertical.You’ll probably crossNew info: If there is a power failure the barriers are always horizontalor always vertical.Would you cross now?New info: There is a power failure.Would you cross now?New info: You hear the train noise.Would you cross now?

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 16 / 22

INTRODUCTIONNON MONOTONIC SETTINGS

You want to cross the railway.You can cross safely if the train is not there.If the barriers are horizontal the train is there.The barriers are vertical.You’ll probably crossNew info: If there is a power failure the barriers are always horizontalor always vertical.Would you cross now?New info: There is a power failure.Would you cross now?New info: You hear the train noise.Would you cross now?

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 16 / 22

INTRODUCTIONNON MONOTONIC SETTINGS

You want to cross the railway.You can cross safely if the train is not there.If the barriers are horizontal the train is there.The barriers are vertical.You’ll probably crossNew info: If there is a power failure the barriers are always horizontalor always vertical.Would you cross now?New info: There is a power failure.Would you cross now?New info: You hear the train noise.Would you cross now?

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 16 / 22

INTRODUCTIONNON MONOTONIC SETTINGS

You want to cross the railway.You can cross safely if the train is not there.If the barriers are horizontal the train is there.The barriers are vertical.You’ll probably crossNew info: If there is a power failure the barriers are always horizontalor always vertical.Would you cross now?New info: There is a power failure.Would you cross now?New info: You hear the train noise.Would you cross now?

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 16 / 22

INTRODUCTIONNON MONOTONIC SETTINGS

You want to cross the railway.You can cross safely if the train is not there.If the barriers are horizontal the train is there.The barriers are vertical.You’ll probably crossNew info: If there is a power failure the barriers are always horizontalor always vertical.Would you cross now?New info: There is a power failure.Would you cross now?New info: You hear the train noise.Would you cross now?

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 16 / 22

INTRODUCTIONNON MONOTONIC SETTINGS

You want to cross the railway.You can cross safely if the train is not there.If the barriers are horizontal the train is there.The barriers are vertical.You’ll probably crossNew info: If there is a power failure the barriers are always horizontalor always vertical.Would you cross now?New info: There is a power failure.Would you cross now?New info: You hear the train noise.Would you cross now?

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 16 / 22

INTRODUCTIONNON MONOTONIC SETTINGS

You want to cross the railway.You can cross safely if the train is not there.If the barriers are horizontal the train is there.The barriers are vertical.You’ll probably crossNew info: If there is a power failure the barriers are always horizontalor always vertical.Would you cross now?New info: There is a power failure.Would you cross now?New info: You hear the train noise.Would you cross now?

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 16 / 22

INTRODUCTIONNON MONOTONIC SETTINGS

You want to cross the railway.You can cross safely if the train is not there.If the barriers are horizontal the train is there.The barriers are vertical.You’ll probably crossNew info: If there is a power failure the barriers are always horizontalor always vertical.Would you cross now?New info: There is a power failure.Would you cross now?New info: You hear the train noise.Would you cross now?

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 16 / 22

INTRODUCTIONCOMMONSENSE REASONING

In commonsense reasoning we commonly (sometimes implicitly) usenormative statements of the kind:

A’s are normally B’s

that admit exceptions.

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 17 / 22

INTRODUCTIONCOMMONSENSE REASONING

Suppose that a reasoning agent has the following knowledgeabout birds: birds typically fly and penguins are non flyingbirds. He also knows that Tweety is a bird. Suppose now thatthe agent is hired to build a cage for Tweety, and he leaves offthe roof on the grounds that he does not whether or nor Tweetycan fly. It would be reasonable for us to view this argument asinvalid and to refuse the agent’s product. This would be notthe case if Tweety could not fly for some reason (unknown tothe agent), and we refused to pay for the bird cage becausehad unnecessarily put a roof on it. [McCarthy, 1959]

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 18 / 22

INTRODUCTIONCOMMONSENSE REASONING

Any bird flies, unless it is abnormal.Any penguin is a bird.Any songbird is a bird.Any penguin is abnormal.Put the roof for any flying bird.tweety is a bird.Build the cage for tweetytweety is a songbird

(pingu is a penguin)

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 19 / 22

INTRODUCTIONCOMMONSENSE REASONING

Any bird flies, unless it is abnormal.Any penguin is a bird.Any songbird is a bird.Any penguin is abnormal.Put the roof for any flying bird.tweety is a bird.Build the cage for tweetytweety is a songbird

(pingu is a penguin)

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 19 / 22

INTRODUCTIONCOMMONSENSE REASONING

Any bird flies, unless it is abnormal.Any penguin is a bird.Any songbird is a bird.Any penguin is abnormal.Put the roof for any flying bird.tweety is a bird.Build the cage for tweetytweety is a songbird

(pingu is a penguin)

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 19 / 22

INTRODUCTIONCOMMONSENSE REASONING

Any bird flies, unless it is abnormal.Any penguin is a bird.Any songbird is a bird.Any penguin is abnormal.Put the roof for any flying bird.tweety is a bird.Build the cage for tweetytweety is a songbird

(pingu is a penguin)

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 19 / 22

INTRODUCTIONCOMMONSENSE REASONING

Any bird flies, unless it is abnormal.Any penguin is a bird.Any songbird is a bird.Any penguin is abnormal.Put the roof for any flying bird.tweety is a bird.Build the cage for tweetytweety is a songbird

(pingu is a penguin)

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 19 / 22

INTRODUCTIONCOMMONSENSE REASONING

Any bird flies, unless it is abnormal.Any penguin is a bird.Any songbird is a bird.Any penguin is abnormal.Put the roof for any flying bird.tweety is a bird.Build the cage for tweetytweety is a songbird

(pingu is a penguin)

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 19 / 22

INTRODUCTIONCOMMONSENSE REASONING

Any bird flies, unless it is abnormal.Any penguin is a bird.Any songbird is a bird.Any penguin is abnormal.Put the roof for any flying bird.tweety is a bird.Build the cage for tweetytweety is a songbird

(pingu is a penguin)

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 19 / 22

INTRODUCTIONCOMMONSENSE REASONING

Any bird flies, unless it is abnormal.Any penguin is a bird.Any songbird is a bird.Any penguin is abnormal.Put the roof for any flying bird.tweety is a bird.Build the cage for tweetytweety is a songbird

(pingu is a penguin)

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 19 / 22

INTRODUCTIONCOMMONSENSE REASONING

Any bird flies, unless it is abnormal.Any penguin is a bird.Any songbird is a bird.Any penguin is abnormal.Put the roof for any flying bird.tweety is a bird.Build the cage for tweetytweety is a songbird

(pingu is a penguin)

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 19 / 22

INTRODUCTIONCOMMONSENSE REASONING

Any bird that is not abnormal flies (for←, think of mosquitos)

∀X (bird(X ) ∧ ¬ab(X )→ flies(X )) (4)

Any penguin is a bird. Any songbird is a bird.

∀X (penguin(X )→ bird(X )) (5)

∀X (songbird(X )→ bird(X )) (6)

Any penguin is abnormal. Put the roof for any flying bird.

∀X (penguin(X )→ ab(X )) (7)

∀X (bird(X ) ∧ flies(X )→ put roof cage(X )) (8)

tweety is a bird.bird(tweety) (9)

(4), (5), (6), (7), (8),CWA |= put roof cage(tweety)

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 20 / 22

INTRODUCTIONCOMMONSENSE REASONING

Any bird that is not abnormal flies (for←, think of mosquitos)

∀X (bird(X ) ∧ ¬ab(X )→ flies(X )) (4)

Any penguin is a bird. Any songbird is a bird.

∀X (penguin(X )→ bird(X )) (5)

∀X (songbird(X )→ bird(X )) (6)

Any penguin is abnormal. Put the roof for any flying bird.

∀X (penguin(X )→ ab(X )) (7)

∀X (bird(X ) ∧ flies(X )→ put roof cage(X )) (8)

tweety is a bird.bird(tweety) (9)

(4), (5), (6), (7), (8),CWA |= put roof cage(tweety)

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 20 / 22

INTRODUCTIONCOMMONSENSE REASONING

Any bird that is not abnormal flies (for←, think of mosquitos)

∀X (bird(X ) ∧ ¬ab(X )→ flies(X )) (4)

Any penguin is a bird. Any songbird is a bird.

∀X (penguin(X )→ bird(X )) (5)

∀X (songbird(X )→ bird(X )) (6)

Any penguin is abnormal. Put the roof for any flying bird.

∀X (penguin(X )→ ab(X )) (7)

∀X (bird(X ) ∧ flies(X )→ put roof cage(X )) (8)

tweety is a bird.bird(tweety) (9)

(4), (5), (6), (7), (8),CWA |= put roof cage(tweety)

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 20 / 22

INTRODUCTIONCOMMONSENSE REASONING

If we knew thatsongbird(tweety) (10)

it still holds that

(4), (5), (6), (7), (8), (9), (10),CWA |= put roof cage(tweety)

Let us repeat with pingu. We know that is is a bird:

bird(pingu) (11)

Then(4)–(11),CWA |= put roof cage(pingu)

If we now discover that

penguin(pingu) (12)

We’ll have that:

(4)–(11), (12),CWA 6|= put roof cage(pingu)

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 21 / 22

INTRODUCTIONCOMMONSENSE REASONING

If we knew thatsongbird(tweety) (10)

it still holds that

(4), (5), (6), (7), (8), (9), (10),CWA |= put roof cage(tweety)

Let us repeat with pingu. We know that is is a bird:

bird(pingu) (11)

Then(4)–(11),CWA |= put roof cage(pingu)

If we now discover that

penguin(pingu) (12)

We’ll have that:

(4)–(11), (12),CWA 6|= put roof cage(pingu)

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 21 / 22

INTRODUCTIONCOMMONSENSE REASONING

Default negation and stable models allow us to deal withcommonsense reasoning!

Encode the previous example in ASP.

AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 7, 2018 22 / 22

top related