Diagnosis (02) Theory of Reiter Alban Grastien - - PowerPoint PPT Presentation

diagnosis 02
SMART_READER_LITE
LIVE PREVIEW

Diagnosis (02) Theory of Reiter Alban Grastien - - PowerPoint PPT Presentation

Diagnosis (02) Theory of Reiter Alban Grastien alban.grastien@rsise.anu.edu.au Definition of Reiter Diagnosis 1 Naive algorithm 2 Second algorithm: diagnose 3 Definition of Reiter Diagnosis 1 Naive algorithm 2 Second algorithm:


slide-1
SLIDE 1

Diagnosis (02)

Theory of Reiter Alban Grastien alban.grastien@rsise.anu.edu.au

slide-2
SLIDE 2

1

Definition of Reiter Diagnosis

2

Naive algorithm

3

Second algorithm: diagnose

slide-3
SLIDE 3

1

Definition of Reiter Diagnosis

2

Naive algorithm

3

Second algorithm: diagnose

slide-4
SLIDE 4

Reiter Diagnosis

A Reiter Diagnosis of an observed system (SD, COMP, OBS) is a minimal set ∆ such that Φ(∆) is a diagnosis

slide-5
SLIDE 5

Reiter Diagnosis

A Reiter Diagnosis of an observed system (SD, COMP, OBS) is a minimal set ∆ such that Φ(∆) is a diagnosis Remark: a Reiter Diagnosis is a set of components and not a logical sentence but the representation are equivalent

slide-6
SLIDE 6

Consequences of the definition

First consequence

∅ is the only Reiter diagnosis of (SD, COMP, OBS) iff SD ∪ OBS ∪ {¬Ab(c) | c ∈ COMP} is consistant

Second consequence

∆ ⊆ COMP is a Reiter diagnosis iff it is a minimal set such that SD ∪ OBS ∪ {¬Ab(c) | c ∈ COMP \ ∆} is consistant

Problem: How to compute the Reiter diagnoses?

slide-7
SLIDE 7

Example

What are the Reiter Diagnoses in this example?

mult-1 mult-2 mult-3 add-1 add-2 A B C D E X Y Z F G

Observations

In1(m1, 3), In2(m1, 2), In1(m2, 2), In2(m2, 3) In1(m3, 2), In2(m3, 3), Out(a1, 10), Out(a2, 12)

slide-8
SLIDE 8

1

Definition of Reiter Diagnosis

2

Naive algorithm

3

Second algorithm: diagnose

slide-9
SLIDE 9

Lattice of the states

∅ a1 a2 m1 m2 m3 a1, a2 a1, m1 a1, m2 a1, m3 a2, m1 a2, m2 a2, m3 m1, m2 m1, m3 m2, m3 a1, a2 m1 a1, a2 m2 a1, a2 m3 a1, m1 m2 a1, m1 m3 a1, m2 m3 a2, m1 m2 a2, m1 m3 a2, m2 m3 m1, m2 m3 a1, a2, m1, m2 a1, a2, m1, m3 a1, a2, m2, m3 a1, m1, m2, m3 a2, m1, m2, m3 a1, a2, m1 m2, m3

slide-10
SLIDE 10

Lattice of the states

∅ a1 a2 m1 m2 m3 a1, a2 a1, m1 a1, m2 a1, m3 a2, m1 a2, m2 a2, m3 m1, m2 m1, m3 m2, m3 a1, a2 m1 a1, a2 m2 a1, a2 m3 a1, m1 m2 a1, m1 m3 a1, m2 m3 a2, m1 m2 a2, m1 m3 a2, m2 m3 m1, m2 m3 a1, a2, m1, m2 a1, a2, m1, m3 a1, a2, m2, m3 a1, m1, m2, m3 a2, m1, m2, m3 a1, a2, m1 m2, m3

slide-11
SLIDE 11

Naive algorithm

Test and generate

Explore the lattice from the root Do not develop a node ∆ of the lattice such that there exists ∆′ ⊂ ∆ that is a Reiter diagnosis Test if SD ∪ OBS ∪ {¬Ab(c) | c ∈ COMP \ ∆} is consistant

If it is consistant, we have found a diagnosis Otherwise, we have to develop this state

Problem

Very inefficient

slide-12
SLIDE 12

1

Definition of Reiter Diagnosis

2

Naive algorithm

3

Second algorithm: diagnose

slide-13
SLIDE 13

Algorithm 2: Diagnose

Rely on the notions of

Conflict Hitting Set

slide-14
SLIDE 14

Reiter conflict

A Reiter conflict is a set of components C ⊆ COMP that cannot all have a normal behavior Formally: a set C is a Reiter conflict if SD ∪ OBS ∪ {¬Ab(c) | c ∈ C} is inconsistant

slide-15
SLIDE 15

Reiter conflict

A Reiter conflict is a set of components C ⊆ COMP that cannot all have a normal behavior Formally: a set C is a Reiter conflict if SD ∪ OBS ∪ {¬Ab(c) | c ∈ C} is inconsistant A Reiter conflict C is minimal iff no subset of C is a Reiter conflict

slide-16
SLIDE 16

Example

What Reiter Conflicts can you find in this example?

mult-1 mult-2 mult-3 add-1 add-2 A B C D E X Y Z F G

Observations

In1(m1, 3), In2(m1, 2), In1(m2, 2), In2(m2, 3) In1(m3, 2), In2(m3, 3), Out(a1, 10), Out(a2, 12)

slide-17
SLIDE 17

From Reiter Conflicts to Reiter Diagnoses

Theorem

∆ ⊆ COMP is a Reiter diagnosis for (SD, COMP, OBS) iff COMP \ ∆ is not a Reiter conflict

slide-18
SLIDE 18

Hitting Set

Definition:

Let C = (S1, . . . , Sn) be a collection of sets H is a Hitting Set of C iff:

H ⊆ S

i∈{1,...,n} Si

∀i ∈ {1, . . . , n}, H ∩ Si = ∅

slide-19
SLIDE 19

Example

C = {{2, 4, 5}, {1, 2, 3}, {1, 3, 5}, {2, 4, 6}, {2, 4}}

slide-20
SLIDE 20

Example

C = {{2, 4, 5}, {1, 2, 3}, {1, 3, 5}, {2, 4, 6}, {2, 4}} Hitting sets:

H1 = {2, 1} H2 = {2, 1, 6} H3 = {4, 3, 2} H4 = {2, 5}

slide-21
SLIDE 21

Theorem

∆ ⊆ COMP is a Reiter diagnosis for (SD, COMP, OBS) iff ∆ is a minimal Hitting Set for the set of the Reiter conflicts

slide-22
SLIDE 22

Theorem

∆ ⊆ COMP is a Reiter diagnosis for (SD, COMP, OBS) iff ∆ is a minimal Hitting Set for the set of the Reiter conflicts It is possible to consider the minimal Reiter conflicts

slide-23
SLIDE 23

Naive algorithm using conflicts and hitting sets

Compute the set F of all the minimal conflicts Compute the hitting set of F Problem: how to compute all the minimal conflicts?

slide-24
SLIDE 24

Second solution

Given a set ∆ ⊆ COMP, it is possible and easy to find one conflict C ⊆ COMP \ ∆ using:

a demonstrator the formula SD ∪ OBS ∪ {Ab(c) | c ∈ ∆}

Algorithm:

1

Starting from ∆ = ∅

2

if ∆ is a Reiter Diagnosis (i.e. if the demonstrator did not find any conflict C), then stop

3

  • therwise, ∀c ∈ C, restart from 2 using ∆ ∪ {c}
slide-25
SLIDE 25

Example

∅ [a1, m1, m2] a1 [] m1 [] m2 [a1, a2, m1, m3] a1, m2 a2, m2 [] m1, m2 m2, m3 []