1 Fault Diagnosis for Timed Automata Stavros Tripakis VERIMAG.

Slides:



Advertisements
Similar presentations
Recognising Languages We will tackle the problem of defining languages by considering how we could recognise them. Problem: Is there a method of recognising.
Advertisements

Recognising Languages We will tackle the problem of defining languages by considering how we could recognise them. Problem: Is there a method of recognising.
Comparative Succinctness of KR Formalisms Paolo Liberatore.
Impossibility of Distributed Consensus with One Faulty Process
Language and Automata Theory
4b Lexical analysis Finite Automata
CS 267: Automated Verification Lecture 8: Automata Theoretic Model Checking Instructor: Tevfik Bultan.
Lecture 24 MAS 714 Hartmut Klauck
Automatic Verification Book: Chapter 6. What is verification? Traditionally, verification means proof of correctness automatic: model checking deductive:
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 3 School of Innovation, Design and Engineering Mälardalen University 2012.
Timed Automata.
Determinization of Büchi Automata
Diagnosis of Discrete Event Systems Meir Kalech Partly based on slides of Gautam Biswass.
CS21 Decidability and Tractability
Introduction to Computability Theory
1 Introduction to Computability Theory Lecture2: Non Deterministic Finite Automata Prof. Amos Israeli.
Introduction to Computability Theory
Introduction to Computability Theory
P, NP, PS, and NPS By Muhannad Harrim. Class P P is the complexity class containing decision problems which can be solved by a Deterministic Turing machine.
1 Introduction to Computability Theory Lecture2: Non Deterministic Finite Automata (cont.) Prof. Amos Israeli.
Validating Streaming XML Documents Luc Segoufin & Victor Vianu Presented by Harel Paz.
Specification Formalisms Book: Chapter 5. Properties of formalisms Formal. Unique interpretation. Intuitive. Simple to understand (visual). Succinct.
Lecture 3 Goals: Formal definition of NFA, acceptance of a string by an NFA, computation tree associated with a string. Algorithm to convert an NFA to.
CS5371 Theory of Computation Lecture 4: Automata Theory II (DFA = NFA, Regular Language)
CS5371 Theory of Computation Lecture 8: Automata Theory VI (PDA, PDA = CFG)
1 Introduction to Computability Theory Lecture11: The Halting Problem Prof. Amos Israeli.
Abstract Verification is traditionally done by determining the truth of a temporal formula (the specification) with respect to a timed transition system.
Regular Model Checking Ahmed Bouajjani,Benget Jonsson, Marcus Nillson and Tayssir Touili Moran Ben Tulila
Formal Language Finite set of alphabets Σ: e.g., {0, 1}, {a, b, c}, { ‘{‘, ‘}’ } Language L is a subset of strings on Σ, e.g., {00, 110, 01} a finite language,
Rosen 5th ed., ch. 11 Ref: Wikipedia
Complexity and Computability Theory I Lecture #13 Instructor: Rina Zviel-Girshin Lea Epstein Yael Moses.
ECE 720T5 Winter 2014 Cyber-Physical Systems Rodolfo Pellizzoni.
Lecture 23: Finite State Machines with no Outputs Acceptors & Recognizers.
Transformation of Timed Automata into Mixed Integer Linear Programs Sebastian Panek.
DECIDABILITY OF PRESBURGER ARITHMETIC USING FINITE AUTOMATA Presented by : Shubha Jain Reference : Paper by Alexandre Boudet and Hubert Comon.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
REGULAR LANGUAGES.
1 Unit 1: Automata Theory and Formal Languages Readings 1, 2.2, 2.3.
Lecture 07: Formal Methods in SE Finite Automata Lecture # 07 Qaisar Javaid Assistant Professor.
Lecture 05: Theory of Automata:08 Kleene’s Theorem and NFA.
CS 367: Model-Based Reasoning Lecture 5 (01/29/2002) Gautam Biswas.
1 Undecidable Problems of Decentralized Observation and Control Stavros Tripakis VERIMAG (based on [Puri,Tripakis,Varaiya-SCODES’01], [Tripakis-CDC’01],
January 9, 2015CS21 Lecture 31 CS21 Decidability and Tractability Lecture 3 January 9, 2015.
1 Black-box conformance testing for real-time systems Stavros Tripakis VERIMAG Joint work with Moez Krichen.
1 Linear Bounded Automata LBAs. 2 Linear Bounded Automata (LBAs) are the same as Turing Machines with one difference: The input string tape space is the.
1 Turing’s Thesis. 2 Turing’s thesis: Any computation carried out by mechanical means can be performed by a Turing Machine (1930)
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Recognising Languages We will tackle the problem of defining languages by considering how we could recognise them. Problem: Is there a method of recognising.
DISTRIBUTED ALGORITHMS Spring 2014 Prof. Jennifer Welch Set 9: Fault Tolerant Consensus 1.
Variants of LTL Query Checking Hana ChocklerArie Gurfinkel Ofer Strichman IBM Research SEI Technion Technion - Israel Institute of Technology.
From Natural Language to LTL: Difficulties Capturing Natural Language Specification in Formal Languages for Automatic Analysis Elsa L Gunter NJIT.
Chapter 5 Finite Automata Finite State Automata n Capable of recognizing numerous symbol patterns, the class of regular languages n Suitable for.
Today’s Agenda  Quiz 4  Temporal Logic Formal Methods in Software Engineering1.
Fundamentals of Fault-Tolerant Distributed Computing In Asynchronous Environments Paper by Felix C. Gartner Graeme Coakley COEN 317 November 23, 2003.
1 Chapter 2 Finite Automata (part a) Hokkaido, Japan.
Finite-State Machines (FSM) Chuck Cusack Based partly on Chapter 11 of “Discrete Mathematics and its Applications,” 5 th edition, by Kenneth Rosen.
SS 2017 Software Verification Timed Automata
Orna Kupferman Yoad Lustig
Lexical analysis Finite Automata
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
Chapter 2 FINITE AUTOMATA.
Hierarchy of languages
Alternating tree Automata and Parity games
Decidable Languages Costas Busch - LSU.
4b Lexical analysis Finite Automata
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
4b Lexical analysis Finite Automata
Fault Diagnosis for Timed Automata
CHAPTER 1 Regular Languages
What is it? The term "Automata" is derived from the Greek word "αὐτόματα" which means "self-acting". An automaton (Automata in plural) is an abstract self-propelled.
Presentation transcript:

1 Fault Diagnosis for Timed Automata Stavros Tripakis VERIMAG

2 Fault diagnosis Plant (event + fault generator) Diagnoser (event reader) Observable events Fault announcements

3 Assumptions The plant behaves according to a known model. The diagnoser receives the (observable) events immediately when they occur. The diagnoser reacts immediately.

4 Requirements The diagnoser does not produce any false positives (announces a fault when no fault occurred). The diagnoser always announces a fault within a bounded delay after the fault occurred. Other sanity requirements (diagnoser is causal, does not change its mind, etc).

5 Example f a u b Red events are observable. Blue events are unobservable. f is the fault event. The plant model a b Fault! The diagnoser

6 Not all plants are diagnosable! f a u a

7 Timed fault diagnosis Plant (event + fault generator) Diagnoser (event reader) Observable events + delays Fault announcements

8 Assumptions The plant behaves according to a known timed automaton model. The diagnoser receives the (observable) events immediately when they occur and reacts immediately. The diagnoser measures delays between two events (i.e., has a timer). It can also set timeouts (in case an event is not observed for a long time).

9 Example of timed diagnosis The plant model is a Timed Automaton (with invariants for urgency) f a u a x:=0 x  2 x > 3 This plant is diagnosable! a Fault! y  2 y:=0 y > 2 The diagnoser: In this case, the diagnoser can be modeled as a timed automaton. This is not always the case!

10 “Infinite-clock” diagnoser (example due to Peter Niebert) fa a x:=0 x > 1  y < 1 a a a b u b x:=0 x  1x  0 x = 1 y:=0 y < 1 Faulty behaviors: there is some a exactly 1 time unit before the b. Correct behaviors: either no b, or no a exactly 1 time unit before the b. This plant is diagnosable. However, the diagnoser needs to check whether some a was exactly 1 time unit before the b. To do this, the diagnoser needs an unbounded number of clocks.

11 Example (2) f a u a x:=0 x  2 x > 3 After an f or a u, the plant need not perform an a (it can stay forever in state 1). This plant is NOT diagnosable! 1

12 Formal definitions Timed behaviors over some alphabet  :  =  o   u a 1.1 u 0.4 b 3 f 2.2 c

13 Formal definitions Observable behaviors: a 1.1 u 0.4 b 3 f 2.2 c a 1.5 b 5.2 c Projection to observable events

14 Formal definitions Faulty behavior: contains a fault event. a 1.1 u 0.4 b 3 f 2.2 c a 1.1 u 0.4 b 3 u 2.2 c faulty non-faulty

15 Formal definitions T-faulty behavior (T is a delay): –faulty behavior, –at least T time elapses after the first occurrence of the fault. Examples: –2-faulty (but not 3-faulty) behaviors: a 1.1 u 0.4 b 3 f 2.5 u a 1.1 u 0.4 b 3 f 2.2 u 0 c 0.3 u a 1.1 u 0.4 b 3 f

16 Formal definitions Timed automata: –As usual. –Delays are rationals (to be machine-representable) –No acceptance conditions. –Urgency modeled using state invariants. Non-zeno run: (infinite) run where time diverges.

17 Diagnosers A T-diagnoser for a timed automaton A is a function such that, for every behavior  of A, D : (  o  Q)  {0,1}  If  is not faulty, then D( Proj(  ) ) = 0 If  is T-faulty, then D( Proj(  ) ) = 1

18 Diagnosability A timed automaton A is called T-diagnosable if there exists a T-diagnoser for it. A is diagnosable if there exists T such that A is T-diagnosable. Note: if A is T-diagnosable then it is also (T+1)-diagnosable.

19 Necessary and sufficient condition for diagnosability A is T-diagnosable iff or, equivalently ,  ’.  is T-faulty,  ’ is not faulty, and Proj(  ) = Proj(  ’) ,  ’. if  is T-faulty and  ’ is not faulty, then Proj(  )  Proj(  ’)

20 Questions How to test whether a given timed automaton A is diagnosable? How to find the minimum T such that A is T-diagnosable (but not (T-1)-diagnosable)? How to build a diagnoser?

21 Testing diagnosability Assumption: A is non-zeno. Make two copies of A, A1 and A2: –Copy/rename states, transitions, clocks, etc. –Copy/rename unobservable events. –Copy but do not rename observable events. Remove all faulty transitions from A2. Take the product B of A1 and A2: synchronize on common labels (i.e., observable events). A is diagnosable iff all faulty runs of B are zeno.

22 Testing diagnosability The proof is based on the following facts: Every run of B corresponds to a pair of runs ,  ’ of A which have the same projection.  ’ cannot be faulty. If a TA has a T-faulty run for all T, then it has a non-zeno faulty run.

23 Testing diagnosability Example: f1f1 a u1u1 a x 1 :=0 x 1  2 x 1 > 3 f2f2 a u2u2 a x 2 :=0 x 2  2 x 2 > 3 f a u a x:=0 x  2 x > 3

24 Testing diagnosability Example: f1f1 a u1u1 a x 1 :=0 x 1  2 x 1 > 3 u2u2 a x 2 :=0 x 2  2 f a u a x:=0 x  2 x > 3

25 Testing diagnosability Example: f1f1 a u1u1 a x 1 :=0 x 1  2 x 1 > 3 u2u2 x 2 :=0 x 2  2 u2u2 u1u1 u2u2 f1f1 x 1  2

26 Testing diagnosability Example: f1f1 a x 1 :=0 x 1 > 3 u2u2 x 2 :=0 x 2  2 u2u2 f1f1

27 Finding the minimum T for T-diagnosability Assumption: A is diagnosable. Take the product B as before. Take the product of B and the observer automaton below (where T is a parameter). f1f1 z:=0z > T f1f1 A is T -diagnosable iff the final state of the observer cannot be reached. Perform a binary search on T : 0, 1, 2, 4, …etc. Complexity: log(T) reachability checks.

28 Representing diagnosers A diagnoser will be represented as a deterministic machine M=(W, w0, F, G, H), where –W is its set of states, –w0 is its initial state, –F : W   o  W(event transition function) –G : W  Q  W(time transition function) –H : W  {0,1}(decision function)

29 Representing diagnosers Given an observed behavior, Feed it to the machine: –w1 = F(w0, a ), w2 = G(w1, 1.5 ), –w3 = F(w2, b ), w4 = G(w3, 5.2 ), –w5 = F(w4, c ), Then apply the decision function to the state where the machine stopped: –D(  ) = H(w5).  = a 1.5 b 5.2 c

30 Building a diagnoser Assumption: the structure of A is such that no discrete state can be reached by both a faulty and a non-faulty path. Every automaton can be transformed so that it meets the assumption (by doubling, at most, its discrete states). f a u b f a u b Not OKOK faulty states

31 Building a diagnoser Preliminary definition: Let S be a set of states of the timed automaton A. ReachUnobs(S,  ) = { s‘ |  s  S, s reaches s’ via a run of exactly  time units that takes only unobservable actions }. ReachUnobs() is easily implementable using standard TA model-checking techniques (DBMs, reachability, etc).

32 Building a diagnoser W : the set of all possible subsets of states of the timed automaton, w0 = ReachUnobs({s0}, 0), F(S, a ) = { s’ |  s  S, s s’}, G(S,  ) = ReachUnobs(S,  ), H(S) =0, if  s=(q,v)  S such that q is non-faulty, 1, otherwise. a That is, the diagnoser works as an on-line state estimator

33 Summary Introduced notions of diagnosers and diagnosability for timed automata. Necessary and sufficient conditions. Conditions reduce to finding non-zeno runs on a product automaton: –this can be done efficiently on-the-fly [BTY-RTSS’97]. Diagnosers can be effectively built.

34 Future work Easily extendable to timed automata with acceptance conditions (meaning?). Represent diagnosers as timed automata (when can this be done?). Controller synthesis for timed automata based on partial observability of events.

35 Acceptance conditions The automaton below is in principle diagnosable: b will eventually happen after f (due to the acceptance condition). However, there is no bound of b happening after f. f ua b