Tecniche di Specifica e di Verifica. Automata-based LTL Model-Checking

Size: px
Start display at page:

Download "Tecniche di Specifica e di Verifica. Automata-based LTL Model-Checking"

Transcription

1 Tecniche di Specifica e di Verifica Automata-based LTL Model-Checking

2 Finite state automata A finite state automaton is a tuple A = (S,S,S 0,R,F) S: set of input symbols S: set of states -- S 0 : set of initial states ( S 0 S ) R:S S fi 2 S : the transition relation. F: set of accepting states ( F S ) A run r on w=a 1,,a n is a sequence s 0,,s n such that s 0 S 0 and s i+1 R(s i,a i ) for 0 i n. A run r is accepting if s n F, while a word w is accepted by A if there is an accepting run of A on w. The language L(A) accepted by A is the set of finite words accepted by A. 2

3 Finite state automata: union Given automata A 1 and A 2, there is an automaton A accepting L(A) = L(A 1 ) L(A 2 ) A = (S,S,S 0,R,F) is an automaton which just runs nondeterministically either A 1 or A 2 on the input word. S = S 1 S 2 F = F 1 F 2 S 0 = S 01 S 02 { R2 R(s,a) = R 1(s,a) if s S 1 (s,a) if s S 2 3

4 Finite state automata: union b A 1 a 0 b 1 A 2 a 2 b 3 a L(A 1 )=b * (ab) * a L(A 2 )=a(a*ba) * b a 0 1 b A 1 A 2 L(A)=L(A 1 ) L(A 2 ) a 2 3 a b 4

5 Finite state automata: intersection Given automata A 1 and A 2, there is an automaton A accepting L(A) = L(A 1 ) L(A 2 ) A = (S,S,S 0,R,F) runs simultaneously both automata A 1 and A 2 on the input word. S = S 1 S 2 F = F 1 F 2 S 0 = S 01 S 02 R((s,t),a) = R 1 (s,a) R 2 (t,a) 5

6 Finite state automata: intersection b A 1 a 0 b 1 A 2 a 2 b 3 a L(A 1 )=b * (ab) * a L(A 2 )=a(a*ba) * b 0,2 a 0,3 a b 1,2 1,3 A 1 A 2 L(A)=L(A 1 ) L(A 2 ) 6

7 Finite state automata: complementation If the automaton is deterministic, then it just suffices to set F c = S-F. This doesn t work, though, for non-deterministic automata. Solution: 1. Determinize the automaton using the subset construction. 2. Complement the resulting deterministic automaton The complexity of this process is exponential in the size of the original automaton. The number of states of the final automaton is 2 S, in the worst case. 7

8 Finite state automata: complementation a A a s b L(A)=(a + b) * a t 1 2 b {s} Ø a,b A D a b b a L(A D )= (a + b) * a {s,t} {t} a a a A c b {s} Ø a,b b b a {s,t} {t} L(A c )=L(A) 8

9 Büchi automata (BA) A Büchi automaton is a tuple A = (S,S,S 0,R,F) S: set of input symbols S: set of states -- S 0 : set of initial states ( S 0 S ) R:S S fi 2 S : the transition relation. F: set of accepting states ( F S ) A run r on w=a 1,a 2, is an infinite sequence s 0,s 1, such that s 0 S 0 and s i+1 R(s i,a i ) for i 0. A run r is accepting if some accepting state in F occurs in r infinitely often. A word w is accepted by A if there is an accepting run of A on w, and the language L w (A) accepted by A is the set of (infinite) w-words accepted by A. 9

10 Büchi automata (BA) A Büchi automaton is a tuple A = (S,S,S 0,R,F) A run r on w=a 1,a 2, is an infinite sequence s 0,s 1, such that s 0 S 0 and s i+1 R(s i,a i ) for i 0. Let Lim(r) = { s s = s i for infinitely many i } A run r is accepting if Lim(r) F A word w is accepted by A if there is an accepting run of A on w. The language L w (A) accepted by A is the set of (infinite) w-words accepted by A. 10

11 Büchi automata: union Given Büchi automata A 1 and A 2, there is an Büchi automaton A accepting L w (A) = L w (A 1 ) L w (A 2 ). The construction is the same as for ordinary automata. A = (S,S,S 0,R,F) is an automaton which just runs nondeterministically either A 1 or A 2 on the input word. S = S 1 S 2 F = F 1 F 2 S 0 = S 01 S 02 { R2 R(s,a) = R 1(s,a) if s S 1 (s,a) if s S 2 11

12 Büchi automata: intersection The intersection construction for automata does not work for Büchi automata. Instead, the intersection for Büchi automata can be defined as follows: A=(S,S,S 0,R,F) intuitively runs simultaneously both automata A 1 =(S,S 1,S 01,R 1,F 1 ) and A 2 =(S,S 2,S 02,R 2,F 2 ) on the input word. S = S 1 S 2 {1,2} F = F 1 S 2 {1} R((s,t,i),a) = S 0 = S 01 S 02 {1} (s,t,2) if s R 1 (s,a), t R 2 (t,a), s F 1 and i=1 { (s,t,1) if s R 1 (s,a), t R 2 (s,a), t F 2 and i=2 (s,t,i) if s R 1 (s,a), t R 2 (t,a) 12

13 Büchi automata: intersection A = (S,S,S 0,R,F) runs simultaneously both automata A 1 and A 2 on the input word. S = S 1 S 2 {1,2} F = F 1 S 2 {1} S 0 = S 01 S 02 {1} (s,t,2) if s R 1 (s,a), t R 2 (t,a), s F 1 and i=1 R((s,t,i),a) = (s,t,1) if s R 1 (s,a), t R 2 (t,a), t F 2 and i=2 {(s,t,i) if s R 1 (s,a), t R 1 (t,a) The automaton remembers 2 tracks, one for each automaton, and points to one of the tracks. As soon as it goes through an accepting state on the current track, it changes track. The accepting condition and the transition relation ensure that this change of track must happens infinitely often. 13

14 Büchi automata: intersection A = (S,S,S 0,R,F) runs simultaneously both automata A 1 and A 2 on the input word. S = S 1 S 2 {1,2} F = F 1 S 2 {1} S 0 = S 01 S 02 {1} (s,t,2) if s R 1 (s,a), t R 2 (t,a), s F 1 and i=1 R((s,t,i),a) = (s,t,1) if s R 1 (s,a), t R 2 (t,a), t F 2 and i=2 {(s,t,i) if s R 1 (s,a), t R 1 (t,a) As soon as it visits an accepting state in track 1, it switches to track 2 and then to track 1 again but only after visiting an accepting state in the track 2. Therefore, to visit infinitely often a state in F (F 1 ), the automaton must also visit infinitely often some state of F 2. 14

15 Büchi automata: complementation It s a complicated construction -- the standard subset construction for determinizing automata doesn t work as non-deterministic automata are more powerful than deterministic ones (e.g. L w =(0+1) * 1 w ) 1,0 Solution (resorts to another kind of automaton): Transform the (non-deterministic) Büchi automaton into a (non-deterministic) Rabin automaton (a more general kind of w-automaton). Determinize and then complement the Rabin automaton. Transform the Rabin automaton into a Büchi automaton. Therefore, also Büchi automata are closed under complementation

16 Rabin automata A Rabin automaton is like a Büchi automaton, except that the accepting condition is defined differently. A = (S,S,S 0,R,F), where F=((G 1,B 1 ),,(G m,b m )). and the acceptance condition for a run r = s 0,s 1, is as follows: for some i Lim(r) G i and Lim(r) B i = in other words, there is a pair (G i,b i ) such that the good set (G i ) is visited infinitely often, while the bad set (B i ) is visited only finitely often. 16

17 Rabin versus Büchi automata 1,0 s 1 t 1 The Büchi automaton fot L w = (0+1) * 1 w 0 s 1 The Rabin automaton 1 t fot L w = (0+1) * 1 w 0 The Rabin automaton has F=(({t},{s})) Note that the Rabin automaton is deterministic. 17

18 Language emptiness for Büchi automata The emptiness problem for Büchi automata is the problem of deciding whether the language accepted by a Büchi automaton A is empty, i.e. if L(A) =. Theorem: The emptiness problem for Büchi automata is decidable in linear time, i.e. in time O( A ). Fact: L(A) = iff in the Büchi automaton there is no reachable cycle A containing a state in F. 18

19 Language emptiness for Büchi automata In other words, L(A) iff there is a cycle containing an accepting state, which is also reachable from some initial state of the automaton. We need to find whether there is such a reachable cycle We could simply compute the SCCs of A using the standard DFS algorithm, and check if there exists a reachable (nontrivial) SCC containing a state in F. But this is usually too inefficient in practice. We will therefore use a more efficient nested DFS (more efficient in the average-case). 19

20 Efficient language emptiness for BA Input: A Initialize: Stack 1 :=, Stack 2 := Table 1 :=, Table 2 := Algorithm Main() foreach s Init if s ˇ Table 1 then DFS1(s); output( empty ); return; Algorithm DFS1(s) push(s,stack 1 ); hash(s,table 1 ); foreach t Succ(s) if t ˇ Table 1 then DFS1(t); if s F then DFS2(s); pop(stack 1 ); Algorithm DFS2(s) push(s,stack 2 ); hash(s,table 2 ) ; foreach t Succ (s) do if t ˇ Table 2 then DFS2(t) else if t is on Stack 1 output( not empty ); output(stack 1,Stack 2,t); return; pop(stack 2 ); Note: upon finding a bad cycle, Stack 1 +Stack 2 +t, determines a counterexample: a bad cycle reached from an init state. 20

21 Generalized Büchi automata (GBA) Generalized Büchi automaton: A = (S,S,S 0,R,(F 1,...,F m )) A run r on w=a 1,a 2, is an infinite sequence s 0,s 1, such that s 0 S 0 and s i+1 R(s i,a i ) for i 0. Let Lim(r) = { s s = s i for infinitely many i } A run r is accepting if for each 1 i m Lim(r) F i Any Generalized Büchi automaton can be easily transformed into a Büchi automaton as follows: L(S,S,S 0,R,(F 1,...,F m )) = L(S,S,S 0,R,F i ) i {1,,m} This transformation is not very efficient, though. 21

22 From GBA to BA efficiently Generalized Büchi automaton: A = (S,S,S 0,R,(F 1,...,F m )) A Generalized Büchi automaton can be efficiently transformed into a Büchi automaton as follows: S = S {1,,m} F = F j {i} for some 1 i m S 0 = S 0 {i} for some 1 i m (s, (i mod m)+1) if s R(s,a) and s F i R((s,i),a) ={ (s,i) if s R (s,a) and sˇf i Notice that the transformation above expands the automaton size by a factor of m (compare with Büchi Intersection). 22

23 LTL-semantics and Büchi automata We can interpret a formula y as expressing a property of w-words, i.e., an w-language L(y) S AP w. For w-word s = s 0, s 1, s 2,.. S w AP, let s i = s i, s i+1, s i+2. be the suffix of s starting at position i. We defined the satisfies relation,, inductively: s p j iff p j s 0 (for any p j P). s y iff not s y. s y 1 y 2 iff s y 1 or s y 2. s Xy iff s 1 y. s y 1 U y 2 iff $ i 0 such that s i y 2, and "j, 0 j< i, s j y 1. We can then define the language L(y) = { s s y }. 23

24 Relation with Kripke structures We extend our definition of satisfies to transition systems, or Kripke structures, as follows: K AP y iff for all computations (runs) p of K AP, L(p) y, or in other words, iff L(K AP ) L(y). 24

25 Relation with Kripke structures We could transform any Kripke structure into a Büchi automaton as follows: A K K AP {p,q} init {p} {p,q} s 0 {p} s 1 {q} s 2 {p} s 0 {p,q} s 1 {p,q} s 2 {q} where every state is accepting! 25

26 LTL Model Checking System Model K LTL property y Model Checker Check that K y by checking that L(K) L(A y ) = Convert y to a Büchi automaton A y, so that L( y) = L(A y ) Yes! No! + counterexample 26

27 LTL Model Checking: explanation M y L(K AP ) L(y) L(K AP ) (S AP w \ L(y)) = L(K AP ) L( y) = L(K AP ) L(A y ) = L(K AP A y ) = 27

28 The algorithmic tasks to perform We have reduced LTL model checking to two tasks: 1 Convert an LTL formula j (i.e. y) into a Büchi automaton A j, such that L(j) = L(A j ). Can we do this in general?. Yes!!! 2 Check whether K AP y, by checking whether the intersection of languages L(K AP ) L(A y ) is empty. It is actually unwise to first construct all of K AP, because K AP can be far too big (state explosion). Instead, it is possible perform the check by constructing states of K AP only as needed. 28

29 LTL to BA translation First, let s put LTL formulas ϕ in normal form where: s have been pushed in, applying only to propositions. the only propositional operators are,,. the only temporal operators are X, U and its dual R. In order to do that we use the following rules: p fi q p q ; p «q ( p q) ( q p) (p q) p q ; (p q) p q ; p p (p U q) ( p) R ( q) ; (p R q) ( p) U ( q) F p T U p ; G p R p ; X p X p 29

30 LTL to BA translation First, let s put LTL formulas ϕ in normal form s have been pushed in, applying only to propositions. We use the following rules: p fi q p q ; p «q ( p q) ( q p) (p q) p q ; (p q) p q ; p p (p U q) ( p) R ( q) ; (p R q) ( p) U ( q) F p T U p ; G p R p ; X p X p Examples: ((p U q) fi F r) (p U q) F r (p U q) (T U r) ( p R q) (T U r) GF p fi F r ( R (Fp)) fi (T U p) ( R (T U p)) fi (T U r) ( R (T U p)) (T U r) (T U (T U p)) (T U r) (T U ( R p)) (T U r) 30

31 LTL to BA translation States of A j will be sets of subformulas of j, thus if we have j= p 1 U p 2, a state is given by G {p 1, p 2,p 1 U p 2 }. Consider a word s = s 0, s 1, s 2, S AP w such that s ϕ, where, e.g., j = y 1 Uy 2. Mark each position i with the set of subformulas Γ i of ϕ that hold true there: G 0 G 1 G 2 s 0 s 1 s 2 Clearly, j G 0. But then, by consistency, either: y 1 G 0 and j G 1, or y 2 G 0. The consistency rules dictate our states and transitions. 31

32 LTL to BA translation Let sub(j) denote the set of subformulas of j. We define A j = (Q, S, R, L, Init, F) as follows. First, the set of states of A j is defined as follows: Q = {G sub(j) s.t. G is locally consistent }. For G to be locally consistent we should, e.g., have: ^ˇ G if y g G, then y G or g G. if y g G, then y G and g G. if p i G then p iˇ G, and if p i G then p iˇ G. if y U g G, then (y G or g G). if y R g G, then g G. 32

33 LTL to BA translation Now, labeling of the states of A j is defined as: The labeling L:QaS is L(G)={ l l G S }. We want a word s = s 0 s 1 (S AP ) w to be in L(A j ) iff there is a run p = G 0 fi G 1 fi G 2 fi of A j s.t. "i Õ, we have that s i satisfies L(G i ), i.e., s i is a satisfying assignment for L(G i ). This constitutes a slight redefinition of Büchi automata, where labeling is on the states instead of on the edges. This facilitates a much more compact A j. 33

34 LTL to BA translation Then the transition relation of A j. It is based on the following LTL rules: (y U g) g ( y X (y U g) ) (y R g) g ( y X (y R g) ) ( g y) (g X(y R g)) and on the semantics of the operator X. R Q Q, where (G,G ) R iff: if (y U g) G then g G, or (y G and (y U g) G ). if (y R g) G then g G, and (y G or (y R g) G ). if X y G, then y G. 34

35 LTL to BA translation The initial states of A j are Init = {G Q j G}. The accepting states of A j are defined as follows: for each (yug) sub(j), there is a set F i F, such that: F i = {G Q (y U g) ˇ G or g G} or equivalently F i = {G Q if (y U g) G, then g G} Notice that if there is no (y U g) sub(j), then the acceptance condition is the trivial acceptance condition: i.e., all states are accepting Lemma: L(j) = L(A j ). But A j is now a generalized Büchi automaton 35

36 LTL to BA translation: example T U p T U p p p Consider the following formula: F p T U p sub(t U p) ={T U p, p} Init = {G sub(t U p) T U p G} 36

37 LTL to BA translation: example T U p T U p p p Consider the following formula: T U p (T U p) p X (T U p) 37

38 LTL to BA translation: example T U p T U p p p Consider the following formula: T U p (T U p) p X (T U p) 38

39 LTL to BA translation: example T U p T U p p p Consider the following formula: T U p (T U p) p X (T U p) 39

40 LTL to BA translation: example T U p T U p p p Consider the following formula: T U p (T U p) p X (T U p) 40

41 LTL to BA translation: example T U p T U p p p Consider the following formula: T U p sub(t U p) ={T U p, p} F = {F T Up } = {G sub(t U p) (T U p) ˇ G or p G} 41

42 LTL to BA translation: example ^ R p ^ R p p p Consider the following formula: G p ^ R p sub(^ R p) ={^ R p, p} Init = {G sub(^ R p) ^ R p G} 42

43 LTL to BA translation: example ^ R p ^ R p p p Consider the following formula: G p ^ R p sub(^ R p) ={^ R p, p} (^ R p) p X (^ R p) 43

44 LTL to BA translation: example ^ R p ^ R p p The trivial acceptance condition p Consider the following formula: G p ^ R p sub(^ R p) ={^ R p, p} There are no eventualities, hence F = { Q } 44

45 LTL to BA translation: example p U q q p U q p,q p U q p p U q p,q q p Consider the following formula: p U q sub(p U q) ={p U q, p, q} Init = {G sub(p U p) p U q G} 45

46 LTL to BA translation: example p U q q p U q p,q p U q p p U q p,q q p Consider the following formula: p U q sub(p U q) ={p U q, p, q} Init = {G sub(p U p) p U q G} 46

47 LTL to BA translation: example p U q q p U q p,q p U q p p U q p,q q p Consider the following formula: p U q sub(p U q) ={p U q, p, q} (p U q) q (p X (p U q)) 47

48 LTL to BA translation: example p U q q p U q p,q p U q p p U q p,q q p Consider the following formula: p U q sub(p U q) = {p U q, p, q} F = { F puq } = {G sub(p U q) (p U q) ˇ G or q G} 48

49 On-the-fly translation algorithm There is another more efficient way to build the Büchi automaton corresponding to a LTL formula. The algorithm proposed by Vardi and his colleagues, is based on the idea of refining states only as needed. It only record the necessary information (what must hold) at a state, instead of recording the complete information about each state (both what must hold and what might or might-not hold). In a way what might or might-not hold is treated as don t care information (which can be filled in, but whose value has no relevant effect). 49

50 Algorithm data structure: node Name: A string identifying the current node. Father: The name of the father node of current node. Incoming: List of fully expanded nodes with edges to the current node. Old: A set of temporal formulae which must hold and in the current node have been processed already. New: A set of temporal formulae which must hold but in the current node have not been processed yet. Next: A set of temporal formulae which should hold in the next node (immediate successor) of the current node. 50

51 NODE Name: Node1 Father: Node1 Incoming: Init New: {p U q} Next: {} Old: {} Name: Node2 Father: Node1 Incoming: Init New: {p} Next: {p U q} Old: {p U q} Name: Node3 Father: Node1 Incoming: Init New: {q} Next: {} Old: {p U q} 51

52 function create_graph(f) return(expand([name Father new_name(), Incoming {Init}, New {f}, Old, Next ], ) function expand (Node, Nodes_Set) if New(Node) = then if $ ND Nodes_Set with (Old(ND)=Old(Node) and Next(ND) = Next(Node)) then Incoming(ND) Incoming(ND) Incoming(Node); return(nodes_set); else return(expand([name Father new_name(), Incoming {Name(Node)}, New Next(Node), Old, Next ], Nodes_Set {Node}); else. 52

53 Nodes_Set Init 4 ^ R p ; p Name: Node8 Father: Node6 Incoming: 4 New: {} Next: {^ R p} Old: {^ R p ; p} 53

54 Init Nodes_Set 4 p U q ; p Name: Node4 Father: Node3 Incoming: Init New: {} Next: {p U q} Old: {p U q ; p} Name: Node5 Father: Node5 Incoming: 4 New: {p U q} Next: {} Old: {} 54

55 Init Nodes_Set 4 p U q ; p 9 p U q ; q Name: Node9 Father: Node7 Incoming: 4 New: {} Next: {} Old: {p U q ; q} Name: Node10 Father: Node10 Incoming: 9 New: {} Next: {} Old: {} 55

56 function expand (Node, Nodes_Set) if New(Node)= then /* see previous block */ else let h New; Contradiction found New(Node) := New(Node) \ {h}; case h of h = p i or p i or T or ^ : if h = ^ or Neg(h) Old(Node) then return(nodes_set) ; /* Discard current node */ else Old(Node) Old(Node) {h}; return(expand(node, Nodes Set)); h = m U y or m R y or m y :. 56

57 Additional functions The function Neg() is applied only to literals: Neg(p i ) = p i Neg(T) = ^ Neg( p i ) = p i Neg(^) = T The functions New1(), New2() and Next1(), used for splitting nodes, are applied to temporal formulae and defined as follows: h New1(h) Next1(h) New2(h) m U y {m} {m U y} {y} m R y {y} {m R y} {m,y} m y {m} {y} 57

58 function expand (Node, Nodes_Set) if New(Node)= then /* see previous block */ else let h New; New(Node) := New(Node) \ {h}; case h of h = p i or p i or T or ^: /* see previous block */ h = m U y or m R y or m y : Node1:=[Name new_name(), Father Name(Node), Incoming Incoming(Node), New New(Node) ({New1(h)} \ Old(Node)), splitting Old Old(Node) {h}, Next Next(Node) {Next1(h)}]; Node2:=[Name new_name(), Father Name(Node), Incoming Incoming(Node), New New(Node) ({New2(h)} \ Old(Node)), Old Old(Node) {h}, Next Next(Node)]; return(expand(node2, expand(node1, Nodes_Set))); h = m y :. /* see next block */ 58

59 Name: Node1 Father: Node1 Incoming: Init New: {p U q} Next: {} Old: {} Name: Node2 split Name: Node3 Father: Node1 Father: Node1 Incoming: Init Incoming: Init New: {p} New: {q} Next: {p U q} Next: {} Old: {p U q} Old: {p U q} 59

60 function expand (Node, Nodes_Set) if New(Node)= then /* see previous block */ else let h New; New(Node):=New(Node) \ {h}; case h of h = p i or p i or T or ^: /* see previous block */ h = m U y or m R y or m y : /* see previous block */ h = m y : return(expand([name Name(Node), Father Father(Node), Incoming Incoming(Node), New (New(Node) {m,y } \ Old(Node)), Old Old(Node) {h}, Next = Next(Node)], Nodes_Set); h = X y :. /* see next block */ 60

61 Name: Node1 Father: Node1 Incoming: Init New: {p q, } Next: {...} Old: {...} expand Name: Node2 Father: Node1 Incoming: Init New: {p,q, } Next: {...} Old: {,p q} 61

62 function expand (Node, Nodes_Set) if New(Node)= then /* see previous block */ else let h New; New(Node):=New(Node) \ {h}; case h of h = p i or p i or T or ^: /* see previous block */ h = m U y or m R y or m y : /* see previous block */ h = m y : /* see previous block */ h = X y : return(expand( [Name Name(Node),Father Father(Node), Incoming Incoming(Node), New New(Node), Old Old(Node) {h}, Next = Next(Node) {y}], Nodes_Set); esac; end expand; 62

63 Name: Node1 Father: Node1 Incoming: Init New: {X p, } Next: {...} Old: {...} expand Name: Node1 Father: Node1 Incoming: Init New: { } Next: {,p} Old: {, X p} 63

64 The need for accepting conditions IMPORTANT: Remember that not every maximal path p = s 0 s 1 s 2 in the graph determines a model of the formula: the construction above allows some node which contain muy, while none of its successor nodes contain y. This is solved again by imposing the generalized Büchi acceptance conditions : for each subformula of f of the form m U y, there is a set F f F containing all the nodes s Q such that either m U y ˇ Old(s), or y Old(s). 64

65 Complexity of the construction THEOREM: For any LTL formula f a Büchi automaton A f can be constructed which accepts all an only the w-sequences (LTL models) satisfying f. THEOREM: Given a LTL formula f, the Büchi automaton for f whose states are O(2 f ) (in the worst-case). [ f is the number of subformulae of f]. THEOREM: Given a LTL formula f and a Kripke structure K sys the, the LTL model checking problem can be solved in time O( K sys 2 f ). [actually it is PSPACE-complete]. 65

66 LTL to BA: example Consider the following formula: G p where p is an atomic formula. Its negation-normal form is ^ R p 66

67 LTL to BA: example Init Current node is Node 1 Incoming = [Init] Old = [] New = [^ R p] Next = [] (^ R p) (p ^) (p X(^ R p)) New(node) not empty, removing h = ^ R p, node split into 2, 3, about to expand them 67

68 LTL to BA: example Init Current node is Node 2 Incoming = [Init] Old = [^ R p] New = [p] Next = [^ R p] New(node) not empty, removing h = p, node replaced by 4 about to expand them 68

69 LTL to BA: example Init Current node is Node 4 Incoming = [Init] Old = [^ R p ; p] New = [] Next = [^ R p] New(node) empty, no equivalent nodes. About to add, timeshift and expand. 69

70 LTL to BA: example Init 4 ^ R p ; p Current node is Node 5 Incoming = [4] Old = [] New = [^ R p] Next = [] (^ R p) (p ^) (p X(^ R p)) New(node) not empty, removing h = ^ R p, node split into 6, 7 about to expand them 70

71 LTL to BA: example Init Current node is Node 6 Incoming = [4] Old = [^ R p] New = [p] Next = [^ R p] 4 ^ R p ; p New(node) not empty, removing h = p, node replaced by 8, about to expand it 71

72 LTL to BA: example Init Current node is Node 8 Incoming = [4] Old = [^ R p ; p] New = [] Next = [^ R p] 4 ^ R p ; p New(node) empty, found equivalent old node in Node_Set (4). Returning it instead. 72

73 LTL to BA: example From the split of Node 5 Init Current node is Node 7 Incoming = [4] Old = [^ R p] New = [^ ; p] Next = [] 4 ^ R p ; p New(node) not empty, removing h = ^, inconsistent node deleted - dead end!. 73

74 LTL to BA: example From the split of Node 1 Init Current node is Node 3 Incoming = [Init] Old = [^ R p] New = [^ ; p] Next = [] 4 ^ R p ; p New(node) not empty, removing h = ^, inconsistent node deleted - dead end!. 74

75 LTL to BA: example Init 4 ^ R p ; p Final graph for G p ^ R p ^ R p p 75

76 LTL to BA: example 2 Consider the following formula: p U q where p and q are atomic formulae. 76

77 LTL to BA: example 2 Init Current node is Node 1 Incoming = [Init] Old = [] New = [p U q] Next = [] (p U q) q (p X(p U q)) New(node) not empty, removing h = p U q node split into 3, 2, about to expand them 77

78 LTL to BA: example 2 Init Current node is Node 2 Incoming = [Init] Old = [p U q] New = [p] Next = [p U q] New(node) not empty, removing h = p node replaced by 4, about to expand them 78

79 LTL to BA: example 2 Init Current node is Node 4 Incoming = [Init] Old = [p U q ; p] New = [] Next = [p U q] New(node) empty, no equivalent nodes. Add, timeshift and expand. 79

80 LTL to BA: example 2 Init 4 p U q ; p Current node is Node 5 Incoming = [4] Old = [] New = [p U q] Next = [] (p U q) q (p X(p U q)) New(node) not empty, removing h = p U q, node split into 6, 7, about to expand. 80

81 LTL to BA: example 2 Init 4 p U q ; p Current node is Node 6 Incoming = [4] Old = [p U q] New = [p] Next = [p U q] New(node) not empty, removing h = p, node replaced by 8, about to expand it 81

82 LTL to BA: example 2 Init 4 p U q ; p Current node is Node 8 Incoming = [4] Old = [p U q ; p] New = [] Next = [p U q] New(node) empty. Found equivalent old note (4) in Node_Set. Returning it instead. 82

83 LTL to BA: example 2 From the split of Node 5 Init 4 p U q ; p Current node is Node 7 Incoming = [4] Old = [p U q] New = [q] Next = [] New(node) not empty, removing h = q, node replaced by 9, about to expand it 83

84 LTL to BA: example 2 Init 4 p U q ; p Current node is Node 9 Incoming = [4] Old = [p U q ; q] New = [] Next = [] New(node) empty, no equivalent node found. Add timeshift and expand 84

85 LTL to BA: example 2 Init Current node is Node 10 Incoming = [9] Old = [] New = [] Next = [] 4 p U q ; p 9 p U q ; q New(node) empty, no equivalent node found. Add timeshift and expand 85

86 LTL to BA: example 2 Init Current node is Node 11 Incoming = [10] Old = [] New = [] Next = [] 4 p U q ; p 9 p U q ; q 10 New(node) empty. Found equivalent old node in Node_Set (10). Returning it instead. 86

87 LTL to BA: example 2 From the split of Node 1 Init Current node is Node 3 Incoming = [Init] Old = [p U q] New = [q] Next = [] 4 p U q ; p 9 p U q ; q New(node) not empty, node replaced by 12, about to expand

88 LTL to BA: example 2 Init Current node is Node 12 Incoming = [Init] Old = [p U q ; q] New = [] Next = [] 4 p U q ; p 9 p U q ; q 10 New(node) empty. Found equivalent old node (4) in Node_Set. Returning it instead. 88

89 LTL to BA: example 2 Init 4 p U q ; p 9 p U q ; q 10 Final graph for p U q 89

90 Comparison of the two algorithms p U q q p U q p,q p U q p p U q p p U q q p,q q p The graphs for p U q obtained from the two algorithms 90

91 Notes on the algorithm Notice that nodes do not necessarily assign truth value to all atomic propositions (in AP)! Indeed the labeling to be associated to a node can be any element of 2 AP which agrees with the literals (AP or negations of AP) in Old(Node). Let Pos(q) = Old(q) AP Let Neg(q) = {h AP h Old(q)} L(q) = { X AP X Pos(q) (X Neg(q)) = } 91

92 Notes on the algorithm p U q p L(q) = {{p},{p,q}} p U q q L(q) = {{q},{p,q}} p U q q p U q p,q p U q p L(q) = {{},{p},{q},{p,q}} p,q q p 92

93 Composing A sys and A f In general what we need to do is to compute the intersection of the languages recognized by the two automata A sys and A f and check it for emptiness. We have already seen (slide 12) how this can be done. When the System needs not satisfy FAIRNESS conditions (or in general A sys have the trivial acceptance condition, i.e. all the states are accepting) there is a more efficient construction... 93

94 Efficient composition of A sys and A f When A sys have the trivial acceptance condition, i.e. all the states are accepting there is a more efficient construction. In this case we can just compute: A sys A f = < S, S sys S f, R, S 0sys S 0f, S sys F f > where (<s,t>,a,<s,t >) R iff (s,a,s ) R sys and (t,a,t ) R f 94

95 Efficient composition of A sys and A f Notice that in our case both automata have labels in the states (instead of on the transitions). This can be dealt with by simply restricting the set of states of the intersection automaton to those which agree on the labeling on both automata. Therefore we define A sys A f = < S, S,R, (S 0sys S 0f ) S, (S sys F f ) S > where S = {(s,t) S sys S f L sys (s) APf = L f (t)} and (<s,t>,<s,t >) R iff (s,s ) R sys and (t,t ) R f 95

Tecniche di Specifica e di Verifica. Automata-based LTL Model-Checking

Tecniche di Specifica e di Verifica. Automata-based LTL Model-Checking Tecniche di Specifica e di Verifica Automata-based LTL Model-Checking Finite state automata A finite state automaton is a tuple A = (Σ,S,S 0,R,F) Σ: set of input symbols S: set of states -- S 0 : set of

More information

Lecture Notes on Emptiness Checking, LTL Büchi Automata

Lecture Notes on Emptiness Checking, LTL Büchi Automata 15-414: Bug Catching: Automated Program Verification Lecture Notes on Emptiness Checking, LTL Büchi Automata Matt Fredrikson André Platzer Carnegie Mellon University Lecture 18 1 Introduction We ve seen

More information

Temporal logics and explicit-state model checking. Pierre Wolper Université de Liège

Temporal logics and explicit-state model checking. Pierre Wolper Université de Liège Temporal logics and explicit-state model checking Pierre Wolper Université de Liège 1 Topics to be covered Introducing explicit-state model checking Finite automata on infinite words Temporal Logics and

More information

Automata-based Verification - III

Automata-based Verification - III COMP30172: Advanced Algorithms Automata-based Verification - III Howard Barringer Room KB2.20: email: howard.barringer@manchester.ac.uk March 2009 Third Topic Infinite Word Automata Motivation Büchi Automata

More information

Sanjit A. Seshia EECS, UC Berkeley

Sanjit A. Seshia EECS, UC Berkeley EECS 219C: Computer-Aided Verification Explicit-State Model Checking: Additional Material Sanjit A. Seshia EECS, UC Berkeley Acknowledgments: G. Holzmann Checking if M satisfies : Steps 1. Compute Buchi

More information

Automata-Theoretic LTL Model-Checking

Automata-Theoretic LTL Model-Checking Automata-Theoretic LTL Model-Checking Arie Gurfinkel arie@cmu.edu SEI/CMU Automata-Theoretic LTL Model-Checking p.1 LTL - Linear Time Logic (Pn 77) Determines Patterns on Infinite Traces Atomic Propositions

More information

Automata-based Verification - III

Automata-based Verification - III CS3172: Advanced Algorithms Automata-based Verification - III Howard Barringer Room KB2.20/22: email: howard.barringer@manchester.ac.uk March 2005 Third Topic Infinite Word Automata Motivation Büchi Automata

More information

CS256/Spring 2008 Lecture #11 Zohar Manna. Beyond Temporal Logics

CS256/Spring 2008 Lecture #11 Zohar Manna. Beyond Temporal Logics CS256/Spring 2008 Lecture #11 Zohar Manna Beyond Temporal Logics Temporal logic expresses properties of infinite sequences of states, but there are interesting properties that cannot be expressed, e.g.,

More information

LTL Model Checking. Wishnu Prasetya.

LTL Model Checking. Wishnu Prasetya. LTL Model Checking Wishnu Prasetya wishnu@cs.uu.nl www.cs.uu.nl/docs/vakken/pv Overview This pack : Abstract model of programs Temporal properties Verification (via model checking) algorithm Concurrency

More information

From Liveness to Promptness

From Liveness to Promptness From Liveness to Promptness Orna Kupferman Hebrew University Nir Piterman EPFL Moshe Y. Vardi Rice University Abstract Liveness temporal properties state that something good eventually happens, e.g., every

More information

Introduction. Büchi Automata and Model Checking. Outline. Büchi Automata. The simplest computation model for infinite behaviors is the

Introduction. Büchi Automata and Model Checking. Outline. Büchi Automata. The simplest computation model for infinite behaviors is the Introduction Büchi Automata and Model Checking Yih-Kuen Tsay Department of Information Management National Taiwan University FLOLAC 2009 The simplest computation model for finite behaviors is the finite

More information

Linear Temporal Logic and Büchi Automata

Linear Temporal Logic and Büchi Automata Linear Temporal Logic and Büchi Automata Yih-Kuen Tsay Department of Information Management National Taiwan University FLOLAC 2009 Yih-Kuen Tsay (SVVRL @ IM.NTU) Linear Temporal Logic and Büchi Automata

More information

automata-theoretic model checking

automata-theoretic model checking automata-theoretic model checking Kousha Etessami Bell Labs (starting next week, my affiliation will be U. of Edinburgh) overview The purpose of my lectures: to cover the fundamental algorithms used in

More information

Lecture 23 : Nondeterministic Finite Automata DRAFT Connection between Regular Expressions and Finite Automata

Lecture 23 : Nondeterministic Finite Automata DRAFT Connection between Regular Expressions and Finite Automata CS/Math 24: Introduction to Discrete Mathematics 4/2/2 Lecture 23 : Nondeterministic Finite Automata Instructor: Dieter van Melkebeek Scribe: Dalibor Zelený DRAFT Last time we designed finite state automata

More information

Automata, Logic and Games: Theory and Application

Automata, Logic and Games: Theory and Application Automata, Logic and Games: Theory and Application 1. Büchi Automata and S1S Luke Ong University of Oxford TACL Summer School University of Salerno, 14-19 June 2015 Luke Ong Büchi Automata & S1S 14-19 June

More information

Logic Model Checking

Logic Model Checking Logic Model Checking Lecture Notes 10:18 Caltech 101b.2 January-March 2004 Course Text: The Spin Model Checker: Primer and Reference Manual Addison-Wesley 2003, ISBN 0-321-22862-6, 608 pgs. the assignment

More information

Computer-Aided Program Design

Computer-Aided Program Design Computer-Aided Program Design Spring 2015, Rice University Unit 3 Swarat Chaudhuri February 5, 2015 Temporal logic Propositional logic is a good language for describing properties of program states. However,

More information

Computational Models - Lecture 4

Computational Models - Lecture 4 Computational Models - Lecture 4 Regular languages: The Myhill-Nerode Theorem Context-free Grammars Chomsky Normal Form Pumping Lemma for context free languages Non context-free languages: Examples Push

More information

Automata on Infinite words and LTL Model Checking

Automata on Infinite words and LTL Model Checking Automata on Infinite words and LTL Model Checking Rodica Condurache Lecture 4 Lecture 4 Automata on Infinite words and LTL Model Checking 1 / 35 Labeled Transition Systems Let AP be the (finite) set of

More information

Helsinki University of Technology Laboratory for Theoretical Computer Science Research Reports 66

Helsinki University of Technology Laboratory for Theoretical Computer Science Research Reports 66 Helsinki University of Technology Laboratory for Theoretical Computer Science Research Reports 66 Teknillisen korkeakoulun tietojenkäsittelyteorian laboratorion tutkimusraportti 66 Espoo 2000 HUT-TCS-A66

More information

Timo Latvala. February 4, 2004

Timo Latvala. February 4, 2004 Reactive Systems: Temporal Logic LT L Timo Latvala February 4, 2004 Reactive Systems: Temporal Logic LT L 8-1 Temporal Logics Temporal logics are currently the most widely used specification formalism

More information

Theory of Computation

Theory of Computation Thomas Zeugmann Hokkaido University Laboratory for Algorithmics http://www-alg.ist.hokudai.ac.jp/ thomas/toc/ Lecture 3: Finite State Automata Motivation In the previous lecture we learned how to formalize

More information

T Reactive Systems: Temporal Logic LTL

T Reactive Systems: Temporal Logic LTL Tik-79.186 Reactive Systems 1 T-79.186 Reactive Systems: Temporal Logic LTL Spring 2005, Lecture 4 January 31, 2005 Tik-79.186 Reactive Systems 2 Temporal Logics Temporal logics are currently the most

More information

Model Checking & Program Analysis

Model Checking & Program Analysis Model Checking & Program Analysis Markus Müller-Olm Dortmund University Overview Introduction Model Checking Flow Analysis Some Links between MC and FA Conclusion Apology for not giving proper credit to

More information

Chapter 3: Linear temporal logic

Chapter 3: Linear temporal logic INFOF412 Formal verification of computer systems Chapter 3: Linear temporal logic Mickael Randour Formal Methods and Verification group Computer Science Department, ULB March 2017 1 LTL: a specification

More information

3-Valued Abstraction-Refinement

3-Valued Abstraction-Refinement 3-Valued Abstraction-Refinement Sharon Shoham Academic College of Tel-Aviv Yaffo 1 Model Checking An efficient procedure that receives: A finite-state model describing a system A temporal logic formula

More information

Before we show how languages can be proven not regular, first, how would we show a language is regular?

Before we show how languages can be proven not regular, first, how would we show a language is regular? CS35 Proving Languages not to be Regular Before we show how languages can be proven not regular, first, how would we show a language is regular? Although regular languages and automata are quite powerful

More information

Timo Latvala. March 7, 2004

Timo Latvala. March 7, 2004 Reactive Systems: Safety, Liveness, and Fairness Timo Latvala March 7, 2004 Reactive Systems: Safety, Liveness, and Fairness 14-1 Safety Safety properties are a very useful subclass of specifications.

More information

The Pumping Lemma. for all n 0, u 1 v n u 2 L (i.e. u 1 u 2 L, u 1 vu 2 L [but we knew that anyway], u 1 vvu 2 L, u 1 vvvu 2 L, etc.

The Pumping Lemma. for all n 0, u 1 v n u 2 L (i.e. u 1 u 2 L, u 1 vu 2 L [but we knew that anyway], u 1 vvu 2 L, u 1 vvvu 2 L, etc. The Pumping Lemma For every regular language L, there is a number l 1 satisfying the pumping lemma property: All w L with w l can be expressed as a concatenation of three strings, w = u 1 vu 2, where u

More information

CPSC 421: Tutorial #1

CPSC 421: Tutorial #1 CPSC 421: Tutorial #1 October 14, 2016 Set Theory. 1. Let A be an arbitrary set, and let B = {x A : x / x}. That is, B contains all sets in A that do not contain themselves: For all y, ( ) y B if and only

More information

CTL Model checking. 1. finite number of processes, each having a finite number of finite-valued variables. Model-Checking

CTL Model checking. 1. finite number of processes, each having a finite number of finite-valued variables. Model-Checking CTL Model checking Assumptions:. finite number of processes, each having a finite number of finite-valued variables.. finite length of CTL formula Problem:Determine whether formula f 0 is true in a finite

More information

Advanced Automata Theory 7 Automatic Functions

Advanced Automata Theory 7 Automatic Functions Advanced Automata Theory 7 Automatic Functions Frank Stephan Department of Computer Science Department of Mathematics National University of Singapore fstephan@comp.nus.edu.sg Advanced Automata Theory

More information

Computation Tree Logic (CTL) & Basic Model Checking Algorithms

Computation Tree Logic (CTL) & Basic Model Checking Algorithms Computation Tree Logic (CTL) & Basic Model Checking Algorithms Martin Fränzle Carl von Ossietzky Universität Dpt. of Computing Science Res. Grp. Hybride Systeme Oldenburg, Germany 02917: CTL & Model Checking

More information

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY 15-453 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY REVIEW for MIDTERM 1 THURSDAY Feb 6 Midterm 1 will cover everything we have seen so far The PROBLEMS will be from Sipser, Chapters 1, 2, 3 It will be

More information

Büchi Automata and Their Determinization

Büchi Automata and Their Determinization Büchi Automata and Their Determinization Edinburgh, October 215 Plan of the Day 1. Büchi automata and their determinization 2. Infinite games 3. Rabin s Tree Theorem 4. Decidability of monadic theories

More information

Automata-Theoretic Verification

Automata-Theoretic Verification Automata-Theoretic Verification Javier Esparza TU München Orna Kupferman The Hebrew University Moshe Y. Vardi Rice University 1 Introduction This chapter describes the automata-theoretic approach to the

More information

Model Checking Algorithms

Model Checking Algorithms Model Checking Algorithms Bow-Yaw Wang Institute of Information Science Academia Sinica, Taiwan November 14, 2018 Bow-Yaw Wang (Academia Sinica) Model Checking Algorithms November 14, 2018 1 / 56 Outline

More information

Temporal Logic Model Checking

Temporal Logic Model Checking 18 Feb, 2009 Thomas Wahl, Oxford University Temporal Logic Model Checking 1 Temporal Logic Model Checking Thomas Wahl Computing Laboratory, Oxford University 18 Feb, 2009 Thomas Wahl, Oxford University

More information

What we have done so far

What we have done so far What we have done so far DFAs and regular languages NFAs and their equivalence to DFAs Regular expressions. Regular expressions capture exactly regular languages: Construct a NFA from a regular expression.

More information

CISC 4090: Theory of Computation Chapter 1 Regular Languages. Section 1.1: Finite Automata. What is a computer? Finite automata

CISC 4090: Theory of Computation Chapter 1 Regular Languages. Section 1.1: Finite Automata. What is a computer? Finite automata CISC 4090: Theory of Computation Chapter Regular Languages Xiaolan Zhang, adapted from slides by Prof. Werschulz Section.: Finite Automata Fordham University Department of Computer and Information Sciences

More information

Alan Bundy. Automated Reasoning LTL Model Checking

Alan Bundy. Automated Reasoning LTL Model Checking Automated Reasoning LTL Model Checking Alan Bundy Lecture 9, page 1 Introduction So far we have looked at theorem proving Powerful, especially where good sets of rewrite rules or decision procedures have

More information

ω-automata Automata that accept (or reject) words of infinite length. Languages of infinite words appear:

ω-automata Automata that accept (or reject) words of infinite length. Languages of infinite words appear: ω-automata ω-automata Automata that accept (or reject) words of infinite length. Languages of infinite words appear: in verification, as encodings of non-terminating executions of a program. in arithmetic,

More information

PSPACE-completeness of LTL/CTL model checking

PSPACE-completeness of LTL/CTL model checking PSPACE-completeness of LTL/CTL model checking Peter Lohmann April 10, 2007 Abstract This paper will give a proof for the PSPACE-completeness of LTLsatisfiability and for the PSPACE-completeness of the

More information

CS 455/555: Finite automata

CS 455/555: Finite automata CS 455/555: Finite automata Stefan D. Bruda Winter 2019 AUTOMATA (FINITE OR NOT) Generally any automaton Has a finite-state control Scans the input one symbol at a time Takes an action based on the currently

More information

Fooling Sets and. Lecture 5

Fooling Sets and. Lecture 5 Fooling Sets and Introduction to Nondeterministic Finite Automata Lecture 5 Proving that a language is not regular Given a language, we saw how to prove it is regular (union, intersection, concatenation,

More information

Computational Models - Lecture 5 1

Computational Models - Lecture 5 1 Computational Models - Lecture 5 1 Handout Mode Iftach Haitner and Yishay Mansour. Tel Aviv University. April 10/22, 2013 1 Based on frames by Benny Chor, Tel Aviv University, modifying frames by Maurice

More information

Failure Diagnosis of Discrete Event Systems With Linear-Time Temporal Logic Specifications

Failure Diagnosis of Discrete Event Systems With Linear-Time Temporal Logic Specifications Failure Diagnosis of Discrete Event Systems With Linear-Time Temporal Logic Specifications Shengbing Jiang and Ratnesh Kumar Abstract The paper studies failure diagnosis of discrete event systems with

More information

CMPSCI 250: Introduction to Computation. Lecture #22: From λ-nfa s to NFA s to DFA s David Mix Barrington 22 April 2013

CMPSCI 250: Introduction to Computation. Lecture #22: From λ-nfa s to NFA s to DFA s David Mix Barrington 22 April 2013 CMPSCI 250: Introduction to Computation Lecture #22: From λ-nfa s to NFA s to DFA s David Mix Barrington 22 April 2013 λ-nfa s to NFA s to DFA s Reviewing the Three Models and Kleene s Theorem The Subset

More information

T (s, xa) = T (T (s, x), a). The language recognized by M, denoted L(M), is the set of strings accepted by M. That is,

T (s, xa) = T (T (s, x), a). The language recognized by M, denoted L(M), is the set of strings accepted by M. That is, Recall A deterministic finite automaton is a five-tuple where S is a finite set of states, M = (S, Σ, T, s 0, F ) Σ is an alphabet the input alphabet, T : S Σ S is the transition function, s 0 S is the

More information

The State Explosion Problem

The State Explosion Problem The State Explosion Problem Martin Kot August 16, 2003 1 Introduction One from main approaches to checking correctness of a concurrent system are state space methods. They are suitable for automatic analysis

More information

Impartial Anticipation in Runtime-Verification

Impartial Anticipation in Runtime-Verification Impartial Anticipation in Runtime-Verification Wei Dong 1, Martin Leucker 2, and Christian Schallhart 2 1 School of Computer, National University of Defense Technology, P.R.China 2 Institut für Informatik,

More information

Great Theoretical Ideas in Computer Science. Lecture 4: Deterministic Finite Automaton (DFA), Part 2

Great Theoretical Ideas in Computer Science. Lecture 4: Deterministic Finite Automaton (DFA), Part 2 5-25 Great Theoretical Ideas in Computer Science Lecture 4: Deterministic Finite Automaton (DFA), Part 2 January 26th, 27 Formal definition: DFA A deterministic finite automaton (DFA) M =(Q,,,q,F) M is

More information

Finite-State Model Checking

Finite-State Model Checking EECS 219C: Computer-Aided Verification Intro. to Model Checking: Models and Properties Sanjit A. Seshia EECS, UC Berkeley Finite-State Model Checking G(p X q) Temporal logic q p FSM Model Checker Yes,

More information

Sri vidya college of engineering and technology

Sri vidya college of engineering and technology Unit I FINITE AUTOMATA 1. Define hypothesis. The formal proof can be using deductive proof and inductive proof. The deductive proof consists of sequence of statements given with logical reasoning in order

More information

Formal Verification Techniques. Riccardo Sisto, Politecnico di Torino

Formal Verification Techniques. Riccardo Sisto, Politecnico di Torino Formal Verification Techniques Riccardo Sisto, Politecnico di Torino State exploration State Exploration and Theorem Proving Exhaustive exploration => result is certain (correctness or noncorrectness proof)

More information

Computational Theory

Computational Theory Computational Theory Finite Automata and Regular Languages Curtis Larsen Dixie State University Computing and Design Fall 2018 Adapted from notes by Russ Ross Adapted from notes by Harry Lewis Curtis Larsen

More information

Closure Properties of Regular Languages. Union, Intersection, Difference, Concatenation, Kleene Closure, Reversal, Homomorphism, Inverse Homomorphism

Closure Properties of Regular Languages. Union, Intersection, Difference, Concatenation, Kleene Closure, Reversal, Homomorphism, Inverse Homomorphism Closure Properties of Regular Languages Union, Intersection, Difference, Concatenation, Kleene Closure, Reversal, Homomorphism, Inverse Homomorphism Closure Properties Recall a closure property is a statement

More information

Computational Models - Lecture 3

Computational Models - Lecture 3 Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. p. 1 Computational Models - Lecture 3 Equivalence of regular expressions and regular languages (lukewarm leftover

More information

Theory of computation: initial remarks (Chapter 11)

Theory of computation: initial remarks (Chapter 11) Theory of computation: initial remarks (Chapter 11) For many purposes, computation is elegantly modeled with simple mathematical objects: Turing machines, finite automata, pushdown automata, and such.

More information

DM17. Beregnelighed. Jacob Aae Mikkelsen

DM17. Beregnelighed. Jacob Aae Mikkelsen DM17 Beregnelighed Jacob Aae Mikkelsen January 12, 2007 CONTENTS Contents 1 Introduction 2 1.1 Operations with languages...................... 2 2 Finite Automata 3 2.1 Regular expressions/languages....................

More information

Logic and Automata I. Wolfgang Thomas. EATCS School, Telc, July 2014

Logic and Automata I. Wolfgang Thomas. EATCS School, Telc, July 2014 Logic and Automata I EATCS School, Telc, July 2014 The Plan We present automata theory as a tool to make logic effective. Four parts: 1. Some history 2. Automata on infinite words First step: MSO-logic

More information

Algorithms for Model Checking (2IW55)

Algorithms for Model Checking (2IW55) Algorithms for Model Checking (2IW55) Lecture 2 Fairness & Basic Model Checking Algorithm for CTL and fair CTL based on strongly connected components Chapter 4.1, 4.2 + SIAM Journal of Computing 1(2),

More information

Model Checking of Safety Properties

Model Checking of Safety Properties Model Checking of Safety Properties Orna Kupferman Hebrew University Moshe Y. Vardi Rice University October 15, 2010 Abstract Of special interest in formal verification are safety properties, which assert

More information

Temporal Logic. M φ. Outline. Why not standard logic? What is temporal logic? LTL CTL* CTL Fairness. Ralf Huuck. Kripke Structure

Temporal Logic. M φ. Outline. Why not standard logic? What is temporal logic? LTL CTL* CTL Fairness. Ralf Huuck. Kripke Structure Outline Temporal Logic Ralf Huuck Why not standard logic? What is temporal logic? LTL CTL* CTL Fairness Model Checking Problem model, program? M φ satisfies, Implements, refines property, specification

More information

Theory of Computation p.1/?? Theory of Computation p.2/?? Unknown: Implicitly a Boolean variable: true if a word is

Theory of Computation p.1/?? Theory of Computation p.2/?? Unknown: Implicitly a Boolean variable: true if a word is Abstraction of Problems Data: abstracted as a word in a given alphabet. Σ: alphabet, a finite, non-empty set of symbols. Σ : all the words of finite length built up using Σ: Conditions: abstracted as a

More information

Weak Alternating Automata Are Not That Weak

Weak Alternating Automata Are Not That Weak Weak Alternating Automata Are Not That Weak Orna Kupferman Hebrew University Moshe Y. Vardi Rice University Abstract Automata on infinite words are used for specification and verification of nonterminating

More information

of acceptance conditions (nite, looping and repeating) for the automata. It turns out,

of acceptance conditions (nite, looping and repeating) for the automata. It turns out, Reasoning about Innite Computations Moshe Y. Vardi y IBM Almaden Research Center Pierre Wolper z Universite de Liege Abstract We investigate extensions of temporal logic by connectives dened by nite automata

More information

Definition of Büchi Automata

Definition of Büchi Automata Büchi Automata Definition of Büchi Automata Let Σ = {a,b,...} be a finite alphabet. By Σ ω we denote the set of all infinite words over Σ. A non-deterministic Büchi automaton (NBA) over Σ is a tuple A

More information

More on Regular Languages and Non-Regular Languages

More on Regular Languages and Non-Regular Languages More on Regular Languages and Non-Regular Languages CSCE A35 Decision Properties of Regular Languages Given a (representation, e.g., RE, FA, of a) regular language L, what can we tell about L? Since there

More information

Monadic Second Order Logic and Automata on Infinite Words: Büchi s Theorem

Monadic Second Order Logic and Automata on Infinite Words: Büchi s Theorem Monadic Second Order Logic and Automata on Infinite Words: Büchi s Theorem R. Dustin Wehr December 18, 2007 Büchi s theorem establishes the equivalence of the satisfiability relation for monadic second-order

More information

Antichain Algorithms for Finite Automata

Antichain Algorithms for Finite Automata Antichain Algorithms for Finite Automata Laurent Doyen 1 and Jean-François Raskin 2 1 LSV, ENS Cachan & CNRS, France 2 U.L.B., Université Libre de Bruxelles, Belgium Abstract. We present a general theory

More information

Automata Theory and Model Checking

Automata Theory and Model Checking Automata Theory and Model Checking Orna Kupferman Abstract We study automata on infinite words and their applications in system specification and verification. We first introduce Büchi automata and survey

More information

Büchi Automata and their closure properties. - Ajith S and Ankit Kumar

Büchi Automata and their closure properties. - Ajith S and Ankit Kumar Büchi Automata and their closure properties - Ajith S and Ankit Kumar Motivation Conventional programs accept input, compute, output result, then terminate Reactive program : not expected to terminate

More information

Lecture Notes On THEORY OF COMPUTATION MODULE -1 UNIT - 2

Lecture Notes On THEORY OF COMPUTATION MODULE -1 UNIT - 2 BIJU PATNAIK UNIVERSITY OF TECHNOLOGY, ODISHA Lecture Notes On THEORY OF COMPUTATION MODULE -1 UNIT - 2 Prepared by, Dr. Subhendu Kumar Rath, BPUT, Odisha. UNIT 2 Structure NON-DETERMINISTIC FINITE AUTOMATA

More information

CDS 270 (Fall 09) - Lecture Notes for Assignment 8.

CDS 270 (Fall 09) - Lecture Notes for Assignment 8. CDS 270 (Fall 09) - Lecture Notes for Assignment 8. ecause this part of the course has no slides or textbook, we will provide lecture supplements that include, hopefully, enough discussion to complete

More information

Undecidable Problems and Reducibility

Undecidable Problems and Reducibility University of Georgia Fall 2014 Reducibility We show a problem decidable/undecidable by reducing it to another problem. One type of reduction: mapping reduction. Definition Let A, B be languages over Σ.

More information

Automata & languages. A primer on the Theory of Computation. Laurent Vanbever. ETH Zürich (D-ITET) September,

Automata & languages. A primer on the Theory of Computation. Laurent Vanbever.  ETH Zürich (D-ITET) September, Automata & languages A primer on the Theory of Computation Laurent Vanbever www.vanbever.eu ETH Zürich (D-ITET) September, 24 2015 Last week was all about Deterministic Finite Automaton We saw three main

More information

UNIT-II. NONDETERMINISTIC FINITE AUTOMATA WITH ε TRANSITIONS: SIGNIFICANCE. Use of ε-transitions. s t a r t. ε r. e g u l a r

UNIT-II. NONDETERMINISTIC FINITE AUTOMATA WITH ε TRANSITIONS: SIGNIFICANCE. Use of ε-transitions. s t a r t. ε r. e g u l a r Syllabus R9 Regulation UNIT-II NONDETERMINISTIC FINITE AUTOMATA WITH ε TRANSITIONS: In the automata theory, a nondeterministic finite automaton (NFA) or nondeterministic finite state machine is a finite

More information

CS357: CTL Model Checking (two lectures worth) David Dill

CS357: CTL Model Checking (two lectures worth) David Dill CS357: CTL Model Checking (two lectures worth) David Dill 1 CTL CTL = Computation Tree Logic It is a propositional temporal logic temporal logic extended to properties of events over time. CTL is a branching

More information

Nondeterministic finite automata

Nondeterministic finite automata Lecture 3 Nondeterministic finite automata This lecture is focused on the nondeterministic finite automata (NFA) model and its relationship to the DFA model. Nondeterminism is an important concept in the

More information

Efficient Model Checking of Safety Properties

Efficient Model Checking of Safety Properties Efficient Model Checking of Safety Properties Timo Latvala timo.latvala@hut.fi Laboratory for Theoretical Computer Science Helsinki University of Technology Finland Spin 2003 p.1/16 Introduction Safety

More information

Representing Temporal System Properties Specified with CCTL formulas using Finite Automaton

Representing Temporal System Properties Specified with CCTL formulas using Finite Automaton University of Granada Investigation Group Sistemas Concurrentes SISTEMAS CONCURRENTES Technical Report UGR SC 2008 01 February 2008 Representing Temporal System Properties Specified with CCTL formulas

More information

P is the class of problems for which there are algorithms that solve the problem in time O(n k ) for some constant k.

P is the class of problems for which there are algorithms that solve the problem in time O(n k ) for some constant k. Complexity Theory Problems are divided into complexity classes. Informally: So far in this course, almost all algorithms had polynomial running time, i.e., on inputs of size n, worst-case running time

More information

2. Elements of the Theory of Computation, Lewis and Papadimitrou,

2. Elements of the Theory of Computation, Lewis and Papadimitrou, Introduction Finite Automata DFA, regular languages Nondeterminism, NFA, subset construction Regular Epressions Synta, Semantics Relationship to regular languages Properties of regular languages Pumping

More information

On the Succinctness of Nondeterminizm

On the Succinctness of Nondeterminizm On the Succinctness of Nondeterminizm Benjamin Aminof and Orna Kupferman Hebrew University, School of Engineering and Computer Science, Jerusalem 91904, Israel Email: {benj,orna}@cs.huji.ac.il Abstract.

More information

Automata and Reactive Systems

Automata and Reactive Systems Automata and Reactive Systems Lecture WS 2002/2003 Prof. Dr. W. Thomas RWTH Aachen Preliminary version (Last change March 20, 2003) Translated and revised by S. N. Cho and S. Wöhrle German version by M.

More information

Automata theory. An algorithmic approach. Lecture Notes. Javier Esparza

Automata theory. An algorithmic approach. Lecture Notes. Javier Esparza Automata theory An algorithmic approach Lecture Notes Javier Esparza July 2 22 2 Chapter 9 Automata and Logic A regular expression can be seen as a set of instructions ( a recipe ) for generating the words

More information

Büchi Automata and Linear Temporal Logic

Büchi Automata and Linear Temporal Logic Büchi Automata and Linear Temporal Logic Joshua D. Guttman Worcester Polytechnic Institute 18 February 2010 Guttman ( WPI ) Büchi & LTL 18 Feb 10 1 / 10 Büchi Automata Definition A Büchi automaton is a

More information

LTL is Closed Under Topological Closure

LTL is Closed Under Topological Closure LTL is Closed Under Topological Closure Grgur Petric Maretić, Mohammad Torabi Dashti, David Basin Department of Computer Science, ETH Universitätstrasse 6 Zürich, Switzerland Abstract We constructively

More information

Partially Ordered Two-way Büchi Automata

Partially Ordered Two-way Büchi Automata Partially Ordered Two-way Büchi Automata Manfred Kufleitner Alexander Lauser FMI, Universität Stuttgart, Germany {kufleitner, lauser}@fmi.uni-stuttgart.de June 14, 2010 Abstract We introduce partially

More information

Extending temporal logic with!-automata Thesis for the M.Sc. Degree by Nir Piterman Under the Supervision of Prof. Amir Pnueli Department of Computer

Extending temporal logic with!-automata Thesis for the M.Sc. Degree by Nir Piterman Under the Supervision of Prof. Amir Pnueli Department of Computer Extending temporal logic with!-automata Thesis for the M.Sc. Degree by Nir Piterman Under the Supervision of Prof. Amir Pnueli Department of Computer Science The Weizmann Institute of Science Prof. Moshe

More information

Lecture 3: Nondeterministic Finite Automata

Lecture 3: Nondeterministic Finite Automata Lecture 3: Nondeterministic Finite Automata September 5, 206 CS 00 Theory of Computation As a recap of last lecture, recall that a deterministic finite automaton (DFA) consists of (Q, Σ, δ, q 0, F ) where

More information

An On-the-fly Tableau Construction for a Real-Time Temporal Logic

An On-the-fly Tableau Construction for a Real-Time Temporal Logic #! & F $ F ' F " F % An On-the-fly Tableau Construction for a Real-Time Temporal Logic Marc Geilen and Dennis Dams Faculty of Electrical Engineering, Eindhoven University of Technology P.O.Box 513, 5600

More information

Automata Theory. Lecture on Discussion Course of CS120. Runzhe SJTU ACM CLASS

Automata Theory. Lecture on Discussion Course of CS120. Runzhe SJTU ACM CLASS Automata Theory Lecture on Discussion Course of CS2 This Lecture is about Mathematical Models of Computation. Why Should I Care? - Ways of thinking. - Theory can drive practice. - Don t be an Instrumentalist.

More information

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY 5-453 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY NON-DETERMINISM and REGULAR OPERATIONS THURSDAY JAN 6 UNION THEOREM The union of two regular languages is also a regular language Regular Languages Are

More information

Nondeterministic Finite Automata

Nondeterministic Finite Automata Nondeterministic Finite Automata Not A DFA Does not have exactly one transition from every state on every symbol: Two transitions from q 0 on a No transition from q 1 (on either a or b) Though not a DFA,

More information

Computational Models: Class 3

Computational Models: Class 3 Computational Models: Class 3 Benny Chor School of Computer Science Tel Aviv University November 2, 2015 Based on slides by Maurice Herlihy, Brown University, and modifications by Iftach Haitner and Yishay

More information

Non-deterministic Finite Automata (NFAs)

Non-deterministic Finite Automata (NFAs) Algorithms & Models of Computation CS/ECE 374, Fall 27 Non-deterministic Finite Automata (NFAs) Part I NFA Introduction Lecture 4 Thursday, September 7, 27 Sariel Har-Peled (UIUC) CS374 Fall 27 / 39 Sariel

More information

First-order resolution for CTL

First-order resolution for CTL First-order resolution for Lan Zhang, Ullrich Hustadt and Clare Dixon Department of Computer Science, University of Liverpool Liverpool, L69 3BX, UK {Lan.Zhang, U.Hustadt, CLDixon}@liverpool.ac.uk Abstract

More information

Properties of Regular Languages. BBM Automata Theory and Formal Languages 1

Properties of Regular Languages. BBM Automata Theory and Formal Languages 1 Properties of Regular Languages BBM 401 - Automata Theory and Formal Languages 1 Properties of Regular Languages Pumping Lemma: Every regular language satisfies the pumping lemma. A non-regular language

More information