1 tms and atms philippe dague and yuhong yan nrc-iit [email protected]...

21
1 TMS and ATMS Philippe Dague and Yuhong YAN NRC-IIT [email protected] [email protected] paris13.fr

Upload: sophie-nash

Post on 12-Jan-2016

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1 TMS and ATMS Philippe Dague and Yuhong YAN NRC-IIT Yuhong.yan@nrc.ca Philippe.dague@lipn.univ-paris13.fr

1

TMS and ATMSPhilippe Dague and Yuhong YAN

[email protected]

[email protected]

Page 2: 1 TMS and ATMS Philippe Dague and Yuhong YAN NRC-IIT Yuhong.yan@nrc.ca Philippe.dague@lipn.univ-paris13.fr

2

TMS and ATMS TMS: Truth Maintain System ATMS: Assumption Truth Maintain System Why needs TMS:

Improve efficiency of reasoning system Conventional TMS:

Justification-based Logic-based

Page 3: 1 TMS and ATMS Philippe Dague and Yuhong YAN NRC-IIT Yuhong.yan@nrc.ca Philippe.dague@lipn.univ-paris13.fr

3

ATMS and diagnosis engine

From Johan de Kleer, “An Assumption-based TMS”, Artificial Intelligence 28(1986) p141

ProblemSolver TMS

Justifications

Beliefs

P(a)

x P(x)->Q(x)

Q(a)

P(s), x ,P(x)->Q(x) =>Q(a)

Page 4: 1 TMS and ATMS Philippe Dague and Yuhong YAN NRC-IIT Yuhong.yan@nrc.ca Philippe.dague@lipn.univ-paris13.fr

4

Why TMS Holding trace of the information

beginning from which Dependencies to get the conclusions

Management of the reasoning contexts. hypothetical reasoning (assumptions) search between (alternative) contexts

Caching inferences to avoid to repeat more times some steps than reasoning remember which roads they have carried to successes

or failures in the reasoning process. manager search space like gragh and not like tree

Page 5: 1 TMS and ATMS Philippe Dague and Yuhong YAN NRC-IIT Yuhong.yan@nrc.ca Philippe.dague@lipn.univ-paris13.fr

5

Chronological Backtracking

X=0

Y=0 Y=1

Z=0 Z=1 Z=0 Z=1

X=1

Y=0 Y=1

Z=0 Z=1 Z=0 Z=1

(1)X{0,1}, (2) a = e1(X)

(3)Y{0,1}, (4) b = e2(Y)

(5)Z{0,1}, (6) c = e3(Z)

(7) b c, (8) a b

* *

Rediscovering contradictions (!)

Rediscovering inferences (?)

Incorrect ordering

!!

??

Page 6: 1 TMS and ATMS Philippe Dague and Yuhong YAN NRC-IIT Yuhong.yan@nrc.ca Philippe.dague@lipn.univ-paris13.fr

6

Limitation of TMS Single state

TMS keeps consistent under single context

Page 7: 1 TMS and ATMS Philippe Dague and Yuhong YAN NRC-IIT Yuhong.yan@nrc.ca Philippe.dague@lipn.univ-paris13.fr

7

Ideas of ATMS

ProblemSolver TMS

Justifications

BeliefsP(a)

x P(x)->Q(x)

Q(a)

P(s), x ,P(x)->Q(x) =>Q(a)

It executes the reasoning steps and it passes to the TMS its assumptions and the justification of its conclusions (incrementally)

It can interrogate the TMS

Holds trace of the dependencies between assumptions and conclusions and of the inconsistence

Page 8: 1 TMS and ATMS Philippe Dague and Yuhong YAN NRC-IIT Yuhong.yan@nrc.ca Philippe.dague@lipn.univ-paris13.fr

8

Terminology for TMS/ATMS Nodes:objects on which the problem solver

works, e.g. data, rules, assumption Justification: describes how a node is

derivable from other nodes Consequent: the node being justified Antecedents: a list of nodes which imply the

consequent E.g. x1,x2,…=>n, logically it is implication:

X1,x2,…->n

Page 9: 1 TMS and ATMS Philippe Dague and Yuhong YAN NRC-IIT Yuhong.yan@nrc.ca Philippe.dague@lipn.univ-paris13.fr

9

Terminology for ATMS Environment: a set of assumptions A node n is said to hold in environment E if n can

be derived from E and a set of justification J:E,J |- n

An environment is inconsistent if false () is derivable:

E,J |- No-good: inconsistent environment (the

assumption set which causes the contradiction) (stored separately)

Context: the environment and all nodes derivable from the environment

Page 10: 1 TMS and ATMS Philippe Dague and Yuhong YAN NRC-IIT Yuhong.yan@nrc.ca Philippe.dague@lipn.univ-paris13.fr

10

Label Label: a set L of environments E

associated with a node n Four properties

Consistency: each environment E is consistent Soundness:

E, J |- n, or J|- E->n Completeness: E’ (J|- E’->n)->(E, EE’) Minimality: E1, E2, ¬(E1E2)

Page 11: 1 TMS and ATMS Philippe Dague and Yuhong YAN NRC-IIT Yuhong.yan@nrc.ca Philippe.dague@lipn.univ-paris13.fr

11

Data Structure in ATMS Structure of a node:

datum: <datum, label, justifications> A premise holds universally:

<p,{{}},{()}> An assumption is a node whose label

contains only itself:<A,{{A}},{(A)}>

Page 12: 1 TMS and ATMS Philippe Dague and Yuhong YAN NRC-IIT Yuhong.yan@nrc.ca Philippe.dague@lipn.univ-paris13.fr

12

Data Structure in ATMS Assumptions can be justified

<A, {{A},{B,C}},{(A),(d)}> An assumed node: holds under an

assumption and a justification of this assumption

<b,{{A}},{(A)}> A derived node

<n,{{A1,A2,…},{B1,B2,…}…},{(z1,z2,…),(y1,y2,…)…}>

Page 13: 1 TMS and ATMS Philippe Dague and Yuhong YAN NRC-IIT Yuhong.yan@nrc.ca Philippe.dague@lipn.univ-paris13.fr

13

Logic meaningA node:<n,{{A1,A2,…},{B1,B2,…}…},{(z1,z2,…),(y1,y2,…)

…}>Means:

(A1A2…)(B1B2…)… ->nAnd:

(z1z2 …) (y1 y2 …) …->n

A node::<,{},{…}>

Page 14: 1 TMS and ATMS Philippe Dague and Yuhong YAN NRC-IIT Yuhong.yan@nrc.ca Philippe.dague@lipn.univ-paris13.fr

14

Basic Operation in ATMSTo keep the label of each node is consistent,

sound, complete and minimal Union of all possible combinations of

picking one environment from each antecedent node label

Remove subsumed environments Remove inconsistent environments

Page 15: 1 TMS and ATMS Philippe Dague and Yuhong YAN NRC-IIT Yuhong.yan@nrc.ca Philippe.dague@lipn.univ-paris13.fr

15

Examplex+y=1:<x+y=1,{{A,B},{B,C,D}},{…}>

x=1:<x=1,{{A,C},{D,E}},{…}>

y=0:<y=0,{},{}>

Nogood {A,B,E}Add justification:

x+y=1, x=1:=> y=0

Union: {{A,B,C},{A,B,D,E},{A,B,C,D},{B,C,D,E}} Result:y=0 :<y=0, {{A,B,C},{B,C,D,E}},{(x+y=1, x=1)}>

Page 16: 1 TMS and ATMS Philippe Dague and Yuhong YAN NRC-IIT Yuhong.yan@nrc.ca Philippe.dague@lipn.univ-paris13.fr

16

Process:When one new justification arrives Union, remove inconsistent and subsumed

environment If the new label is as the old one, stop If the node is :, each environment of the label

is added to a nogood database, and all inconsistent environments (itself and the supersets) are removed from every node label

If the node is not , update any other influenced node (nodes whose justifications contain label changed node)

Page 17: 1 TMS and ATMS Philippe Dague and Yuhong YAN NRC-IIT Yuhong.yan@nrc.ca Philippe.dague@lipn.univ-paris13.fr

17

Example of using ATMS on Diagnosis

M1

M2

M3

A2

A1 F

G

Before output observation

<A=3,{{}},{()}>

<B=2,{{}},{()}>

<C=2,{{}},{()}>

<D=3,{{}},{()}>

<E=3,{{}},{()}>

<x=6,{{M1}},{(A=3, B=2)}>

X

Y

Z

<Y=6,{{M2}},{..}>

<Z=6,{{M3}},{..}>

<F=12,{{M1,M2,A1}},..>

<G=12,{{M2,M3,A2}},..>

Page 18: 1 TMS and ATMS Philippe Dague and Yuhong YAN NRC-IIT Yuhong.yan@nrc.ca Philippe.dague@lipn.univ-paris13.fr

18

Example of using ATMS on Diagnosis

M1

M2

M3

A2

A1 F

G

After F=10 observation

<A=3,{{}}>

<B=2,{{}}>

<C=2,{{}}>

<D=3,{{}}>

<E=3,{{}}>

<X=6,{{M1}}><X=4,{{A1, M2}}>

X

Y

Z

<Y=6,{{M2}}><Y=4,{{A1,M1}}>

<Z=6,{{M3}}>

<F=12,{{M1,M2,A1}}>

<G=12,{{M2,M3,A2}}><G=10,{{A1,A2,M1,M3}}>

<F=10,{{}}>

Page 19: 1 TMS and ATMS Philippe Dague and Yuhong YAN NRC-IIT Yuhong.yan@nrc.ca Philippe.dague@lipn.univ-paris13.fr

19

Example of using ATMS on Diagnosis

M1

M2

M3

A2

A1 F

G

After G=12 observation

<A=3,{{}}>

<B=2,{{}}>

<C=2,{{}}>

<D=3,{{}}>

<E=3,{{}}>

<X=6,{{M1}}><X=4,{{A1, M2}, {A1,A2,M3}}>

X

Y

Z

<Y=6,{{M2},{A2,M3}}><Y=4,{{A1,M1}}>

<Z=6,{{M3}},{A2,M2}}>

<Z=8,{{A1,M1,A2}}

<G=12,{{M2,M3,A2}}><G=10,{{A1,A2,M1,M3}}>

<F=10,{{}}>

<G=12,{{}}>

Page 20: 1 TMS and ATMS Philippe Dague and Yuhong YAN NRC-IIT Yuhong.yan@nrc.ca Philippe.dague@lipn.univ-paris13.fr

20

Summary ATMS remove the single-state limitation ATMS is an important technique for MBD Completeness and efficiency are issues for

implementation

Page 21: 1 TMS and ATMS Philippe Dague and Yuhong YAN NRC-IIT Yuhong.yan@nrc.ca Philippe.dague@lipn.univ-paris13.fr

21

Assignment 2Full adder in Reiter’s paper (figure 1), use the ATMS

principle to get the conflict sets (writing down all the justifications and labels for each step) and the minimal hitting set principle to get the minimal diagnoses under the observations:

Step1:Obs1: {in1(X1)=1; in2(X1)=0;in(A2)=1}Step2:Obs2: Obs1{out(x2)=1}Step3:Obs3: Obs2 {out(O1)=0}