Chapter 5: Linear Temporal Logic

Size: px
Start display at page:

Download "Chapter 5: Linear Temporal Logic"

Transcription

1 Chapter 5: Linear Temporal Logic Prof. Ali Movaghar Verification of Reactive Systems Spring 91

2 Outline We introduce linear temporal logic (LTL), a logical formalism that is suited for specifying LT properties. Then we go through a model-checking algorithm for LTL based on Bϋchi automata. 2

3 Linear Temporal Logic Correctness of reactive systems depends on the execution of the system and on fairness issues. Temporal logic is a suitable formalism for treating these aspects. Temporal logic extends propositional or predicate logic by modalities to specify infinite behavior of a reactive system. 3

4 Linear Temporal Logic (Con.) The elementary modalities of temporal logics include the operators: eventually (eventually in the future) always (now and forever in the future). The nature of time in temporal logics can be either linear or branching: 4

5 Linear Temporal Logic (Con.) In the linear view, at each moment in time there is a single successor moment. LTL (Linear Temporal Logic) is based on lineartime perspective. In the branching view, it has a branching, tree-like structure, where time may split into alternative course. CTL (Computational Tree Logic) is based on a branching-time view. 5

6 Linear Temporal Logic (Con.) A temporal logic allows for the specification of the relative order of events. But it does not support any means to refer to the precise timing of events. The car stops once the driver pushes the brake. The message is received after it has been sent. 6

7 Linear Temporal Logic (Con.) LTL may be used to express the timing for the class of synchronous systems in which all components proceed in a lockstop fashions. In this setting, a transition corresponds to the advance of a single time-unit. The time domain is discrete: the present moment refers to current state and the next moment corresponds to the next state. 7

8 Linear Temporal Logic: syntax LTL formulae over the set AP of atomic proposition are formed according to the following grammar: ϕ ::= true a ϕ 1 ϕ 2 ϕ ϕ ϕ 1 Uϕ 2 where a AP., next : ϕ holds at the current moment if ϕ holds in the next state. U, until : ϕ1uϕ2 holds at the current moment, if there is some future for which ϕ holds and ϕ holds at all moments until future moment. 8

9 Linear Temporal Logic: syntax (Con.) The precedence order on operators is as follows. The unary operators bind stronger than the binary ones. and bind equally strong. The temporal operator U takes precedence over,, and. 9

10 Linear Temporal Logic: syntax (Con.) Using the Boolean connectives and, the full power of propositional logic is obtained. The until operator allows to derive the temporal modalities and as follows: ϕ= true U ϕ and ϕ= ϕ ϕ ensures that ϕ will be true eventually the in future. ϕ is satisfied iff it id not the case that eventually ϕ holds. 10

11 Linear Temporal Logic: syntax (Con.) The intuitive meaning of temporal modalities are illustrated below: 11

12 Linear Temporal Logic: syntax (Con.) By combining and, new temporal modalities are obtained: a describes the property stating that at any moment j there is a moment i j at which a-state is visited. Thus a-state is visited infinitely often. a expresses that from moment j, only a- state are visited. Thus a-state is visited eventually forever. 12

13 Linear Temporal Logic: syntax (Con.) Example 5.2: properties for mutual exclusion problem: Safety property stating that P 1 and P 2 never simultaneously have access to their critical section: ( crit 1 crit 2 ). Liveness property stating each process P i is infinitely often in its critical section: ( crit 1 ) ( crit 2 ). Read examples 5.3 and

14 Linear Temporal Logic: syntax (Con.) Let ϕ denote the length of LTL formula ϕ in terms of the number of operators in ϕ. This can be easily defined by induction on the structure of: a AP has length 0; a b has length 2 and ( a)u(a b) has length 4. 14

15 Linear Temporal Logic: semantics LTL formula stands for properties of paths. The semantics of LTL formula is defined by a LT property. Then it is extended to an interpretation over paths and states of a LTS. 15

16 Linear Temporal Logic: semantics (Con.) Definition: Let ϕ be an LTL formula over AP. The LT property induced by ϕ is Words(ϕ)={σ (2 AP ) ω σ =ϕ} where = (2 AP ) ω LTL is the smallest relation with the properties: 16

17 Linear Temporal Logic: semantics (Con.) For the derived operators and the expected result is : Derive semantics of and! 17

18 Linear Temporal Logic: semantics (Con.) Definition 5.7: Let TS=(S,Act,,I,AP,L ) be a transition system without terminal state, and let ϕ be a LTL formula over AP. For infinite path fragments π of TS, the satisfaction relation is defined by π = ϕ iff trace(π) =ϕ 18

19 Linear Temporal Logic: semantics (Con.) For state s S, the satisfaction relation = is defined by: s =ϕ iff ( π Paths(s).π =ϕ) TS satisfies ϕ, denoted TS =ϕ, if Traces(TS) Words(ϕ). 19

20 Linear Temporal Logic: semantics (Con.) From this definition, it immediately follows that: Thus, TS =ϕ iff s 0 = ϕ for all initial states s 0 of TS. 20

21 Linear Temporal Logic: semantics (Con.) Example 5.8: Consider the LTS below with the set of propositions AP={a,b} TS = a TS (a b) TS = ( b (a b)) TS b U (a b) 21

22 Linear Temporal Logic: semantics (Con.) Semantics of Negation: For paths, it holds π =ϕ iff π ϕ. Since Words( ϕ)=(2 AP ) ω \Words(ϕ). ϕ However statements TS ϕ and TS = ϕ are not equivalent. Instead TS = ϕ implies TS ϕ. Note that : 22

23 Linear Temporal Logic: semantics (Con.) Thus it is possible that a LTS satisfies neither nor: Consider the TS below with AP={a}: TS a, since the initial path s 0 (s 2 ) ω a. TS a, since the initial path s 0 (s 1 ) ω =a, and thus s 0 (s 1 ) ω a. 23

24 Linear Temporal Logic: specifying properties Example 5.11: A modulo 4 counter can be represented by a sequential circuit C, which outputs 1 every fourth cycle, otherwise 0. Let the evaluation of r 1 r 2 denote i=2.r 1 +r2 C is constructed such that the output bit y is set exactly for i=0 (hence r 1 =0,r 2 =0). So δ r1 =r 1 r 2, δ r2 = r 1, λ y = r 1 r 2. 24

25 Linear Temporal Logic: specifying properties (Con.) The circuit C and its transition system TS C is shown below: 25

26 Linear Temporal Logic: specifying properties (Con.) Let AP={r 1,r 2,y}. The following statement holds: TSC = (y r 1 r 2 ) TSC = (r 1 ( y y)) TSC = (y ( y y)). The property that at least during every four cycles the output 1 id obtained holds for TS C : TSC = (y y y y). 26

27 Linear Temporal Logic: specifying properties (Con.) The fact that these outputs are produced in a periodic manner where every fourth cycle yields the output 1 is expressed as: TSC = (y ( y y y)). Read example

28 Linear Temporal Logic: specifying properties (Con.) Example 5.13: Leader election protocol: Goal: a process with a higher identifier is elected. Processes are initially inactive, and may become active and then participate in the election (fairness: each process becomes active at some time). If an inactive process with higher id becomes active, a new leader election takes place. 28

29 Linear Temporal Logic: specifying properties (Con.) We use LTS to specify some properties. Let AP={leader i,active i 1 i,j N}. There is always one leader: (\/ 1 i N leader i /\ 1 j N,j i leader j ) Since initially no leader exists we modify it to: (\/ 1 i N leader i /\ 1 j N,j i leader j ) But this allows there to be more than one leader at a time temporarily, so: ( /\ 1 i N (leader i /\ 1 j N,j i leader j )) ( (\/ 1 i N leader i ) 29

30 Linear Temporal Logic: specifying properties (Con.) In the presence of an active process with a higher identity, the leader will resign at some time: /\ 1 i,j N,i<j ((leader i leader j active j ) leader i ) A new leader will be an improvement over the previous one: (/\ 1 i,j N,i j (leader i leader i leader j )) Read Example

31 Linear Temporal Logic: specifying properties (Con.) For synchronous systems LTL can be used as a formalism to specify real-time properties: ϕ states that at the next time instant ϕ holds. K ϕ =.. : ϕ holds after k time instants. k ϕ= \/ 0 i k i ϕ : ϕ will hold at most k time instants. 31

32 Linear Temporal Logic: specifying properties (Con.) k ϕ= \/ 0 i k i ϕ : ϕ holds now and will hold during the next k time instants. But for asynchronous systems the nextstep operator should be used with care. 32

33 Linear Temporal Logic: equivalence of LTL formulae Two formulae are intuitively equivalent whenever they have the same truth- value under all interpretations. Definition: LTL formulae ϕ 1,ϕ 2 are equivalent, denoted ϕ 1 ϕ 2, if Words(ϕ 1 )=Words(ϕ 2 ). 33

34 Linear Temporal Logic: equivalence of LTL formulae (Con.) As LTL subsumes propositional logic, equivalences of propositional logic also hold for LTL. For temporal modalities we have: 34

35 Linear Temporal Logic: equivalence of LTL formulae (Con.) 35

36 Linear Temporal Logic: equivalence of LTL formulae (Con.) The duality rule ϕ ϕ shows that next-step operator is dual to itself: In the absorption law ϕ ϕ : infinitely often ϕ is equal to from a certain point of time on, ϕ is true infinitely often. 36

37 Linear Temporal Logic: equivalence of LTL formulae (Con.) The distributive laws for and disjunction, or and conjunction are dual to each other: (ϕ ψ) ϕ ψ and (ϕ ψ) ϕ ψ Recall that (ϕ ψ) ϕ ψ and (ϕ ψ) ϕ ψ But (a b) a b and (a b) a b (the same holds for and ): 37

38 Linear Temporal Logic: equivalence of LTL formulae (Con.) The expansion laws describe the temporal modalities U, and by means of a recursive equivalence: These equivalences assert something about the current, and about the director successor state. ϕ U ψ ψ (ϕ (ϕuψ)): so ϕ U ψ is a solution of the equivalence k ψ (ϕ k). ψ ψ ψ is a special case of the expansion law for until: 38

39 Linear Temporal Logic: equivalence of LTL formulae (Con.) Lemma 5.18 (Until is least solution of the expansion law): For LTL formulae ϕ and ψ, Words(ϕUψ) is the least LT property P (2 AP ) ω such that: Words(ψ) {A 0,A 1,A 2 Words(ϕ) A 1 A 2 P} P (I) Moreover, Words(ϕUψ) agrees with the set: Words(ψ) {A 0,A 1,A 2 Words(ϕ) A 1 A 2 Words(ϕUψ)}. 39

40 Linear Temporal Logic: equivalence of LTL formulae (Con.) The formulation least LT property satisfying condition (I) means that the following conditions hold: (1) P= Words(ϕUψ) satisfies (I). Words(ϕUψ) P for all LT properties P satisfying condition (I). 40

41 Linear Temporal Logic: weak, release and positive normal form Any LTL formula can be transformed into a canonical form, called positive normal form (PNF), in which: Negations only occur adjacent to atomic propositions. Recall that PNF formulae in propositional logic are constructed from true, false, the literals a and a, and the operators and. 41

42 Linear Temporal Logic: weak, release and positive normal form (Con.) To transform any LTL formula into PNF, for each operator a dual operator is needed in the syntax: True and false, and. The next-step operator is a dual of itself. Consider the until operator: (ϕuψ) ((ϕ ψ) U ( ϕ ψ)) (ϕ ψ) 42

43 Linear Temporal Logic: weak, release and positive normal form (Con.) The operator W, called weak until or unless, as the dual of U: ϕwψ (ϕuψ) ϕ. Until and W are dual in the following sense: Note that W has the same expresivness to U. W and U satisfy the same expansion law. 43

44 Linear Temporal Logic: weak, release and positive normal form (Con.) Lemma 5.19 (weak-until is the greatest solution of the expansion law) For LTL formulae ϕ and ψ, Words(ϕWψ) is the greatest LT property P (2 AP ) ω such that: Words(ψ) {A 0,A 1,A 2 Words(ϕ) A 1 A 2 P} P (I) Moreover, Words(ϕUψ) agrees with the set: Words(ψ) {A 0,A 1,A 2 Words(ϕ) A 1 A 2 Words(ϕWψ)}. 44

45 Linear Temporal Logic: weak, release and positive normal form (Con.) The formulation greatest LT property satisfying condition (I) means that the following conditions hold: (1) P Words(ϕWψ) satisfies (I). Words(ϕWψ) P for all LT properties P satisfying condition (I). 45

46 Linear Temporal Logic: weak, release and positive normal form (Con.) Definition: For a AP, the set of LTL formulae in weak-until positive normal form (weak-until PNF) is given by: ϕ::= true false a a ϕ 1 ψ 2 ϕ 1 ψ 2 ϕ ϕ 1 Uψ 2 ϕ 1 Wψ 2 Since ϕ ϕ W false and ϕ true U ϕ, and can be also considered as permitted operator of W-PNF. 46

47 Linear Temporal Logic: weak, release and positive normal form (Con.) We can convert each LTL formula to its W-PNF by using the following rewrite rules: 47

48 Linear Temporal Logic: weak, release and positive normal form (Con.) Example 5.21: convert LTL formula ((aub) c) to weak-until PNF: ((aub) c) ((aub) c) ( (aub) c) ( (a b) W ( a b) c) 48

49 Linear Temporal Logic: weak, release and positive normal form (Con.) Theorem 5.22: For each LTL formula there exists an equivalent LTL formula in weak-until PNF. The main draw-back of rewrite rules is that the length of the resulting formula may be exponential in the length of the original nonpnf LTL formula: The rewrite rule for U and W, duplicates the operands. 49

50 Linear Temporal Logic: weak, release and positive normal form (Con.) We can avoid this exponential blow-up by using another temporal modality as the dual of until, called release and defined by : ϕrψ = ( ϕ U ψ) ϕrψ holds for a word if ψ always holds, a requirement that is released as soon as ϕ becomes valid. 50

51 Linear Temporal Logic: weak, release and positive normal form (Con.) The always operator is obtained from the release operator : ϕ false R ϕ. The weak-until and the until operator are obtained by: ϕwψ ( ϕ ψ) R (ϕ ψ) and vice versa ϕrψ ( ϕ ψ) W (ϕ ψ) ϕuψ ( ϕ R ψ) 51

52 Linear Temporal Logic: weak, release and positive normal form (Con.) Definition: For a AP, the set of LTL formulae in release positive normal form (release PNF) is given by: ϕ::= true false a a ϕ 1 ψ 2 ϕ 1 ψ 2 ϕ ϕ 1 Uψ 2 ϕ 1 Rψ 2 Thus the rewrite rules are: 52

53 Linear Temporal Logic: weak, release and positive normal form (Con.) Theorem 5.24: For any LTL formula ϕ there exists an equivalent LTL formula ϕ in release PNF with ϕ =O( ϕ ). 53

54 Linear Temporal Logic: Fairness in LTL Definition: Let Φ and Ψ be propositional logic formula over AP. 1. An unconditional LTL fairness constraint is an LTL formula of the form ufair= Ψ. 2. A strong LTL fairness condition is an LTL formula of the form ufair= Φ Ψ. 3. A weak LTL fairness constraint is an LTL formula of the form wfair= Φ Ψ. an LTL fairness assumption is a conjunction of LTL fairness constraints. 54

55 Linear Temporal Logic: Fairness in LTL (Con.) For instance, a strong LTL fairness assumption denote a conjunction of strong LTL fairness constraints: sfair = /\ 0<i k ( Φ i Ψ i ) for propositional logic formulae Φ i and Ψ i over AP. Generally LTL fairness assumptions are: fair = ufair sfair wfair 55

56 Linear Temporal Logic: Fairness in LTL (Con.) Let FairPaths(s) denote the set of all fair paths starting in s and FairTraces(s) the set of all traces induced by fair paths starting in s: FairPaths(s) ={π Paths(s) π =fair} FairTraces(s) = {Trace(π) π FairPaths(s)} Above definitions can be lifted to TSs yielding FairPaths(TS) and FairTraces(TS). 56

57 Linear Temporal Logic: Fairness in LTL (Con.) Definition: For state s in TS (over AP) without terminal state, LTL formula ϕ and LTL fairness assumptions fair let s = fair ϕ iff π FairPaths(s). π = ϕ and TS = fair ϕ iff s 0 I.s 0 = fair ϕ. TS satisfies ϕ under the LTL fairness assumption fair if ϕ holds for all fair paths that originate from some initial state. 57

58 Linear Temporal Logic: Fairness in LTL (Con.) Example 5.27: Consider the mutual exclusion with randomized arbiter: 58

59 Linear Temporal Logic: Fairness in LTL (Con.) Arbiter tosses a coin, modeled by nondeterministic choice between heads and tails, to choose a process to enters its critical section. process P i is in its critical section infinitely often : TS 1 Arbiter TS 2 crit 1 (why?) TS 1 Arbiter TS 2 = fair crit 1 crit 2 where fair= heads tails. 59

60 Linear Temporal Logic: Fairness in LTL (Con.) In chapter 3, fairness was introduced using set of actions: An execution is unconditionally A-fair for a set of actions A, whenever each action α A occurs infinitely often. However LTL-fairness is defined on atomic propositions, i.e., from a statebased perspective. 60

61 Linear Temporal Logic: Fairness in LTL (Con.) Action-based fairness assumptions can always be translated into analogous LTL fairness assumption. The intuition is Make a copy of each non-initial state s such that it is recorded which action was executed to enter s. The copied state <s,α> indicates that state s has been reached by performing α as last action. 61

62 Linear Temporal Logic: Fairness in LTL (Con.) Formally for TS=(S,Act,,I,AP,L) let TS =(S,Act,,I,AP,L ) where Act=Act {begin}, I =I {begin}, S =I (S Act), TS is defined by : 62

63 Linear Temporal Logic: Fairness in LTL (Con.) L is defined: L (<s,α>)=l(s) {taken(α)} {enabled(β) β Act(s)} L (<s 0,begin>)=L(s 0 ) {enabled(β) β Act(s 0 )}. It can be established that Traces AP (TS)=Traces AP (TS ). Thus strong fairness for A Act can be described by LTL fairness assumption: sfair A = enabled(a) taken(a) enabled(a)=\/ α A enabled(α), taken(a)=\/ α A taken(α) 63

64 Linear Temporal Logic: Fairness in LTL (Con.) The set of fair traces of action-based fairness assumption F for TS and its corresponding LTL fairness fair for TS coincides: {Trace AP (π) π Paths(TS), π is F-fair}= {TraceAP(π ) π Paths(TS ), π = fair} Thus FairTraces F (TS)=FairTraces fair (TS ): TS = F P iff TS = fair P. 64

65 Linear Temporal Logic: Fairness in LTL (Con.) Conversely, a (state-based) LTL fairness assumptions cannot always be represented as action-based fairness assumption. Because strong or weak LTL fairness assumptions need not be realizable while action-based can be realized by a scheduler. State-based LTL fairness assumptions are more general then action-based. 65

66 Linear Temporal Logic: Fairness in LTL (Con.) Theorem 5:30: For transition system TS without terminal state, LTL formula ϕ, and LTL fairness assumption fair: TS = fair ϕ iff TS =(fair ϕ) Read Examples

67 Automata-Based LTL Model Checking Given a finite transition system TS and an LTL formula ϕ (a requirement on TS), an LTL model-checking algorithm checks TS = ϕ: If ϕ is refuted, an error trace needs to be returned. 67

68 Automata-Based LTL Model Checking (Con.) In following, we assume that TS is finite and has no terminal state. The model-checking algorithm that we are going to introduce is based on automata-based approach: Each LTL formula ϕ is represented by a nondeterministic büchi automaton (NBA). The basic idea is to disprove TS = ϕ by looking for a path π in TS with π = ϕ. 68

69 Automata-Based LTL Model Checking (Con.) If such a path is found, a prefix of π is returned as error trace. If no such path is encountered, it is concluded that TS =ϕ. This Algorithm relies on following observation: 69

70 Automata-Based LTL Model Checking (Con.) Hence, for NBA A with L ω (A)=Words( ϕ) we have : TS = ϕ if and only if Traces(TS) L ω (A)=. Thus, to check ϕ holds for TS, we first construct an NBA for the negation of the input formula ϕ and then look for their intersection TS A ϕ. 70

71 Automata-Based LTL Model Checking (Con.) Definition: A nondeterministic Büchi automaton (NBA) A is a tuple A=(Q,Σ,δ,Q 0,F) where: Q is a finite set of states, Σ is an alphabet, δ:q Σ 2 Q is a transition function, Q 0 Q is a set of initial states, and F Q is a set of accept (or:final) states, called the acceptance set. 71

72 Automata-Based LTL Model Checking (Con.) A run for σ=a 0 A 1 A 2... Σ ω denotes an infinite sequence q 0 q 1 q 2... of states in A such that q 0 Q 0 and q i Ai q i+1 for i 0. Run q 0 q 1 q 2... is accepting if q i F for infinitely many indices i IN. The accepted language of A is: L ω (A)={σ Σ ω there exists an accepting run for σ in A}. The size of A, denoted A, is defined as the number of states and transitions in A. 72

73 Automata-Based LTL Model Checking (Con.) Since the states Q of an NBA A is finite, each run for an infinite word σ Σ ω is infinite, and hence visits some state q Q infinitely often. Acceptance of a run depends on whether or not the set of all states that appear infinitely often in the given run contains an accept state. If F=, no run is accepting and L ω (A)=. 73

74 Automata-Based LTL Model Checking (Con.) Example: consider the NBA below with the alphabet Σ={A,B,C}: The language accepted by this NBA is given by the ω-regular expression: C AB(B + +BC AB) ω. Read Examples

75 Criterion for the Nonemptiness of an NBA Lemma 4.41: Let A = (Q,Σ,δ,Q 0,F) be an NBA. Then the following two statements are equivalent: L ω (A) Ø, There exists a reachable accept q that belongs to a cycle in A. Formally q 0 Q 0 q F w Σ* v Σ +. q δ*(q 0,w) δ*(q,v) 75

76 Checking Emptiness for NBA Theorem 4.42: The emptiness problem for NBA A can be solved in time O( A ). 76

77 Automata-Based LTL Model Checking (Con.) Definition: Let A=(Q,Σ,δ,Q 0,F) be an NBA. A is called nonblocking if δ(q,a) for all states q and all symbols A Σ. Note that for a given nonblocking NBA A and input word σ Σ ω, there is at least one (infinite) possibly non-accepting run for σ in A. Thus it is not a restriction to assume a NBA is nonblocking. 77

78 Automata-Based LTL Model Checking (Con.) Definition: A persistence property over AP is an LT property P pers (2 AP ) ω eventually forever Φ for some propositional logic formula Φ over AP: P pers ={A 0 A 1 A 2... (2 AP ) ω j.a j =Φ} where j is short for i 0. j i. Formula Φ is called a persistence (or state) condition of P pers. 78

79 Automata-Based LTL Model Checking (Con.) Intuitively, a persistence property eventually forever Φ ensures the tenacity of the state property given by the persistence condition Φ. In other words Φ is an invariant after a while; i.e., from a certain point on all states satisfy Φ. 79

80 Automata-Based LTL Model Checking (Con.) The formula eventually forever Φ is true for a path if and only if almost all,i.e., all except for finitely many, states satisfy the proposition Φ. Our goal is to show that the question whether Traces(TS) L ω (A)= holds can be reduced to the question whether a certain persistence property holds in the product of TS and A. 80

81 Automata-Based LTL Model Checking (Con.) Defintion: Let TS=(S,Act,,I,AP,L) be a transition system without terminal states and A=(Q,2 AP,δ,Q 0,F) a non-blocking NBA. Then, product TS and A is: TS A=(S Q,Act,,I,AP,L ) where is the smallest relation defined by the rule: α L(t) s t q p α s,q t, p 81

82 Automata-Based LTL Model Checking (Con.) where I={ s 0,q s 0 I q 0 Q 0.q 0 L(s0) q}, AP =Q and L :S Q 2 Q is given by L ( s,q ) ={q}. Furthermore, let P pers (A) be the persistence property over AP =Q given by eventually forever F where F denotes the propositional formula /\ q F q over AP =Q. 82

83 Verification of ω-regular Properties Theorem 4.63: Let TS be a finite transition system without terminal states over AP and let P be an ω-regular property over AP. Furthermore, let A be a nonblocking NBA with the alphabet 2 AP and L ω (A)= (2 AP ) ω \P. Then, the following statements are equivalent: TS =P Traces(TS) L ω (A)= TS A = P pers (A). 83

84 Persistence Checking and Cycle Detection Theorem 4.65: Let TS be a finite transition system without terminal states over AP, Φ be a propositional formula over AP, and P pers the persistence property eventually forever Φ. Then, the following statements are equivalent: TS P pers There exists a reachable Φ state s which belongs to a cycle. Formally: s Reach(TS). s Φ s is on a cycle in G(TS). 84

85 Naïve Persistence Checking 85

86 Cycle Detection 86

87 Persistence Checking by nested depth-first search 87

88 Time Complexity of Persistence Checking Theorem 4.70: The worst-case time complexity of Algorithm 8 is O((N+M)+N. Φ ) where N is the number of reachable states, and M the number of transitions between the reachable states. 88

89 Automata-Based LTL Model Checking (Con.) Thus the LTL model-checking algorithm is: 89

90 Automata-Based LTL Model Checking (Con.) Now it remains to show that how a given LTL property can be presented by a NBA and such an NBA can be constructed algorithmically. Recall that the LTL semantics yields a language Words(ϕ) (2 AP ) ω. Thus the alphabet of NBA for LTL formulae is Σ=2 AP. We show that Words(ϕ) is ω-regular, and hence, can be represented by a NBA. 90

91 Automata-Based LTL Model Checking (Con.) Example 5.32: The edges of a NBA can be represented symbolically by propositional logics over symbols a AP, true and Boolean connectors. Thus they can be interpreted over sets of propositions A Σ=2 AP. If AP={a,b} then q a b q is a short notation for the three transitions: q {a} q, q {b} q, and q {a,b} q. 91

92 Automata-Based LTL Model Checking (Con.) The language of all words σ=a 0 A 1 2 AP satisfying the LTL formula green is accepted by the NBA below: A is in the accept state q 1 if and only if the last consumed symbol (the last set A i of the input word A 0 A 1 A 2... (2 AP ) ω ) contains the propositional symbol green. 92

93 Automata-Based LTL Model Checking (Con.) The liveness property: whenever event a occurs, event b will eventually occur. An associated NBA over the alphabet 2 {a,b} is shown below: 93

94 Automata-Based LTL Model Checking (Con.) To construct an NBA A satisfying L ω (A)=Words(ϕ) for the LTL formula ϕ, first a generalized NBA is constructed for ϕ, which subsequently is transformed into an equivalent NBA. 94

95 Automata-Based LTL Model Checking (Con.) The whole picture of LTL model checking: 95

96 Automata-Based LTL Model Checking (Con.) Definition: A generalized NBA is a tuple G=(Q,Σ,δ,Q 0,F ) where Q, Σ, δ, Q 0 are defined as for NBA and F is a subset of 2 Q. The elements of F are called acceptance sets. 96

97 Automata-Based LTL Model Checking (Con.) The accepted language L ω (G) consists of all infinite words in (2 AP ) ω that have at least one infinite run q 0 q 1 q 2... in G such that for each acceptance set F F there are infinitely many indices i with q i F. A GNBA for which F is a singleton set can be regarded as an NBA. 97

98 Automata-Based LTL Model Checking (Con.) Assume ϕ only contains the operators,, and U, i.e., the derived operators,,,, W and so on are assumed to be expressed in terms of the basic operators. Since ϕ=true is trivial, it may be assumed that ϕ true. 98

99 Automata-Based LTL Model Checking (Con.) The basic idea to construct a GNBA over the alphabet 2 AP for a given LTL formula ϕ (over AP), i.e., L ω (g ϕ )=Words(ϕ) is: Let σ=a 0 A 1 A 2 Words(ϕ). The sets A i AP are expanded by subformulae ψ (and their negation) of ϕ such that an infinite word σ=b 0 B 1 B 2 with the following property arises: ψ B i if and only if A i A i+1 A i+2 =ψ σ i 99

100 Automata-Based LTL Model Checking (Con.) The GNBA g ϕ is constructed such that B i constitute its states. Moreover, the construction ensures that σ=b 0 B 1 B 2 is a run for σ= A 0 A 1 A 2 in G ϕ. The accepting conditions for g ϕ are chosen such that the run σ is accepting if and only if σ =ϕ. We encode the meaning of the logical operators into the states, transitions and acceptance sets of G ϕ. 100

101 Automata-Based LTL Model Checking (Con.) Let ϕ= au( a b) and σ={a}{a,b}{b} : B i is a subset of the set of formulae {a,b, a, a b,ϕ} { b, ( a b), ϕ). ϕ ϕ The set A 0 ={a} is extended with formulae b, ( a b) and ϕ, since all these formula hold in σ 0 =σ and all other subformulae in the above set are refuted by σ. The set A 1 ={a,b} is extended with the formulae ( a b) and ϕ, as they hold in σ 1 ={a,b}{b}. 101

102 Automata-Based LTL Model Checking (Con.) The A 2 ={b} is extended with a, a b and ϕ as they hold in σ 2 ={b}. These yield σ= {a, b, ( a b),ϕ} {a,b, ( a b),ϕ} { a,b, a b,ϕ} 102

103 Automata-Based LTL Model Checking (Con.) Definition: The closure of LTL formula ϕ is the set closure(ϕ) consisting of all subformulae ψ of ϕ and their negation ψ (where ψ and ψ are identical). For instance, for ϕ= au( a b), the closure(ϕ)={a,b, a, b, a b, ( a b),ϕ, ϕ}. closure(ϕ) O( ϕ ) 103

104 Automata-Based LTL Model Checking (Con.) B is consistent with respect to propositional logic, i.e., for all ϕ 1 ϕ 2, ψ closure(ϕ): ϕ 1 ϕ 2 B ϕ 1 B and ϕ 2 B ψ B ψ B True closure(ϕ) true B. 104

105 Automata-Based LTL Model Checking (Con.) B is locally consistent with respect to the until operator, i.e., for all ϕ 1 Uϕ 2 closure(ϕ): Φ 2 B ϕ 1 Uϕ 2 B ϕ 1 Uϕ 2 B and ϕ 2 B ϕ 1 B. B is maximal, i.e., for all ψ closure(ϕ): ψ B ψ B. 105

106 Automata-Based LTL Model Checking (Con.) Definition: B closure(ϕ) is elementary if it is consistent with respect to propositional logic, maximal, and locally consistent with respect to the until operator. 106

107 Automata-Based LTL Model Checking (Con.) Example 5.35: let ϕ=au( a b): B 0 ={a,b,ϕ} is consistent with respect to propositional logic and locally consistent with respect to the until operator. But it is not maximal. Why? B 1 ={a,b, a b,ϕ} is not consistent with respect to propositional logic. Why? B 2 ={a,b, ( a b), ϕ} is an elementary set. 107

108 Automata-Based LTL Model Checking (Con.) Let ϕ be an LTL formula over AP. Let G ϕ =(Q,2 AP,δ,Q 0,F ) be its corresponding GNBA, where Q is the set of all elementary sets of formulae B closure(ϕ), Q 0 ={B Q ϕ B}, F ={F ϕ1uϕ2 ϕ 1 Uϕ 2 closure(ϕ)} where F ϕ1uϕ2 ={B Q ϕ 1 Uϕ 2 B or ϕ 2 B}. 108

109 Automata-Based LTL Model Checking (Con.) The transition relation δ:q 2 AP 2 Q is given by: If A B AP, then δ(b,a)=. If A=B AP, then δ(b,a) is the set of all elementary sets of formulae B satisfying i. for every ψ closure(ϕ): ψ B ψ B, and ii. For every ϕ 1 Uϕ 2 closure(ϕ): ϕ 1 Uϕ 2 B (ϕ 2 B (ϕ 1 B ϕ 1 Uϕ 2 B )). 109

110 Automata-Based LTL Model Checking (Con.) The conditions (i) and (ii) reflect the semantics of the next step and the until operator, respectively. Rule (ii) is justified by the expansion rule: ϕ 1 Uϕ 2 ϕ 2 (ϕ 1 (ϕ 1 Uϕ 2 )). 110

111 Automata-Based LTL Model Checking (Con.) To model the semantics of U, an acceptance set F ψ is introduced for every subformula ψ=ϕ 1 Uϕ 2 of ϕ. Thus every run B 0 B 1 B 2... for which ψ B 0, we have ϕ 2 B j (for some j 0) and ϕ 1 B i for all i<j. The requirement that a word σ satisfies ϕ 1 Uϕ 2 only if ϕ 2 will actually eventually become true is ensured by the accepting set F ϕ1uϕ2. 111

112 Automata-Based LTL Model Checking (Con.) Example 5.38: let ϕ= a. It corresponding GNBA G ϕ is: Q = {B 1,B 2,B 3,B 4 } where B 1 ={a, a}, B 2 ={a, a}, B 3 ={ a, a}, B 4 ={ a, a}, Q 0 ={B 1,B 3 } since a B 1,B 3, 2 {a} ={,{a}} and δ is defined: B 1 {a}={a}, so δ(b 1,{a})={B 1,B 2 } since a B 1 and B 1 and B 2 are the only states that contain a. B 1 =, so δ(b 1, )=. 112

113 Automata-Based LTL Model Checking (Con.) The resulting GNBA is shown below: Read Example

114 Automata-Based LTL Model Checking (Con.) Any state of the GNBA for an LTL formula ϕ contains either ψ or its negation ψ for every subformula ψ of ϕ. This is somewhat redundant. It suffices to represent state B closure(ϕ) by the propositional symbols a B AP, and the formulae ψ or ϕ 1 Uϕ 2 B. 114

115 Automata-Based LTL Model Checking (Con.) Having constructed a GNBAG ϕ for a given LTL formula ϕ, an NBA for ϕ can be obtained by the transformation GNBA NBA described in following. 115

116 Automata-Based LTL Model Checking (Con.) Let G=(Q,Σ,δ,Q 0,F ) be a GNBA. Let F ={F 1,...,F k } where k 1. The basic idea of the construction of A is to create k copies of G such that the acceptance set F i of the ith copy is connected to the corresponding states of the (i+1)th copy. 116

117 Automata-Based LTL Model Checking (Con.) The accepting condition for A consists of the requirement that an accepting state of the first copy is visited infinitely often: This ensures that all other accepting sets F i of the k copies are visited infinitely often too: 117

118 Automata-Based LTL Model Checking (Con.) Formally, let A=(Q,Σ,δ,Q 0,F ) be the corresponding NBA,where: Q =Q {1,...,k}, Q 0 =Q 0 {1}={ q 0,1 q 0 Q 0 }, F =F 1 {1}={ q F,1 q F F 1 }, The transition function δ is given by δ'( q,i,a)= { q,i q δ(q,a)} if q Fi { q,i+1 q δ(q,a)} otherwise We identify q,1 and q,k

119 Automata-Based LTL Model Checking (Con.) Theorem: For each GNBA G there exists an NBA A with L ω (G)=L ω (A) and A =O( G F ) where F denotes the set of acceptance sets in G. F denotes the number of copies. In transforming the GNBA of a LTL formula ϕ to its NBA, the number of copies that we need is the number of until subformulae of ϕ. 119

120 Automata-Based LTL Model Checking (Con.) Theorem: For any LTL formula ϕ (over AP) there exists an NBA A ϕ with Words(ϕ)=L ω (A ϕ ) which can be constructed in time and space 2 O( ϕ ). It should be noted that the size of the resulting GNBA grows up exponentially with respect to the size of formula. 120

121 Complexity of the LTL Modelchecking problem As explained before, the essential idea behind the automata-based model- checking algorithm for LTL is based upon the following relations: 121

122 Complexity of the LTL Modelchecking problem (Con.) The GNBA G ϕ has at most 2 ϕ states with ϕ accepting states (the number of untilsubformulas in ϕ). The NBA A ϕ can thus be constructed in exponential time: O(2 ϕ ϕ )=O(2 ϕ +log ϕ ). Thus an upper bound for the time-and space-complexity of LTL model checking is O( TS 2 ϕ ). 122

123 LTL Model Checking with Fairness As a consequence of Theorem 5.30, the model-checking problem for LTL with fairness assumptions can be reduced to the model-checking problem for plain LTL. In order to check the formula ϕ under fairness assumption fair, it suffices to verify the formula fair ϕ with an LTL model-checking algorithm. 123

124 LTL Model Checking with Fairness (Con.) The drawback of this approach is that the length fair can have an exponential influence on the run-time of the algorithm. The construction of an NBA for the negated formula (fair ϕ) is exponential in (fair ϕ) = fair + ϕ. To avoid this, a modified persistence check can be exploited to analyze TS A ϕ (instead of TS A (fair ϕ) ). 124

Chapter 5: Linear Temporal Logic

Chapter 5: Linear Temporal Logic Chapter 5: Linear Temporal Logic Prof. Ali Movaghar Verification of Reactive Systems Spring 94 Outline We introduce linear temporal logic (LTL), a logical formalism that is suited for specifying LT properties.

More information

Chapter 5: Linear Temporal Logic

Chapter 5: Linear Temporal Logic Chapter 5: Linear Temporal Logic Prof. Ali Movaghar Verification of Reactive Systems Outline n n We introduce linear temporal logic (LTL), a logical formalism that is suited for specifying LT properties.

More information

Chapter 6: Computation Tree Logic

Chapter 6: Computation Tree Logic Chapter 6: Computation Tree Logic Prof. Ali Movaghar Verification of Reactive Systems Outline We introduce Computation Tree Logic (CTL), a branching temporal logic for specifying system properties. A comparison

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

Linear-Time Logic. Hao Zheng

Linear-Time Logic. Hao Zheng Linear-Time Logic Hao Zheng Department of Computer Science and Engineering University of South Florida Tampa, FL 33620 Email: zheng@cse.usf.edu Phone: (813)974-4757 Fax: (813)974-5456 Hao Zheng (CSE, USF)

More information

Chapter 4: Computation tree logic

Chapter 4: Computation tree logic INFOF412 Formal verification of computer systems Chapter 4: Computation tree logic Mickael Randour Formal Methods and Verification group Computer Science Department, ULB March 2017 1 CTL: a specification

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

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

Overview. overview / 357

Overview. overview / 357 Overview overview6.1 Introduction Modelling parallel systems Linear Time Properties Regular Properties Linear Temporal Logic (LTL) Computation Tree Logic syntax and semantics of CTL expressiveness of CTL

More information

Computation Tree Logic

Computation Tree Logic Computation Tree Logic Hao Zheng Department of Computer Science and Engineering University of South Florida Tampa, FL 33620 Email: zheng@cse.usf.edu Phone: (813)974-4757 Fax: (813)974-5456 Hao Zheng (CSE,

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

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

PSL Model Checking and Run-time Verification via Testers

PSL Model Checking and Run-time Verification via Testers PSL Model Checking and Run-time Verification via Testers Formal Methods 2006 Aleksandr Zaks and Amir Pnueli New York University Introduction Motivation (Why PSL?) A new property specification language,

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

Lecture 2 Automata Theory

Lecture 2 Automata Theory Lecture 2 Automata Theory Ufuk Topcu Nok Wongpiromsarn Richard M. Murray Outline: Transition systems Linear-time properties Regular propereties EECI, 14 May 2012 This short-course is on this picture applied

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

Topics in Verification AZADEH FARZAN FALL 2017

Topics in Verification AZADEH FARZAN FALL 2017 Topics in Verification AZADEH FARZAN FALL 2017 Last time LTL Syntax ϕ ::= true a ϕ 1 ϕ 2 ϕ ϕ ϕ 1 U ϕ 2 a AP. ϕ def = trueu ϕ ϕ def = ϕ g intuitive meaning of and is obt Limitations of LTL pay pay τ τ soda

More information

Introduction to Temporal Logic. The purpose of temporal logics is to specify properties of dynamic systems. These can be either

Introduction to Temporal Logic. The purpose of temporal logics is to specify properties of dynamic systems. These can be either Introduction to Temporal Logic The purpose of temporal logics is to specify properties of dynamic systems. These can be either Desired properites. Often liveness properties like In every infinite run action

More information

Linear Temporal Logic (LTL)

Linear Temporal Logic (LTL) Chapter 9 Linear Temporal Logic (LTL) This chapter introduces the Linear Temporal Logic (LTL) to reason about state properties of Labelled Transition Systems defined in the previous chapter. We will first

More information

Safety and Liveness Properties

Safety and Liveness Properties Safety and Liveness Properties Lecture #6 of Model Checking Joost-Pieter Katoen Lehrstuhl 2: Software Modeling and Verification E-mail: katoen@cs.rwth-aachen.de November 5, 2008 c JPK Overview Lecture

More information

Probabilistic Model Checking Michaelmas Term Dr. Dave Parker. Department of Computer Science University of Oxford

Probabilistic Model Checking Michaelmas Term Dr. Dave Parker. Department of Computer Science University of Oxford Probabilistic Model Checking Michaelmas Term 2011 Dr. Dave Parker Department of Computer Science University of Oxford Overview Temporal logic Non-probabilistic temporal logic CTL Probabilistic temporal

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

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

Theoretical Foundations of the UML

Theoretical Foundations of the UML Theoretical Foundations of the UML Lecture 17+18: A Logic for MSCs Joost-Pieter Katoen Lehrstuhl für Informatik 2 Software Modeling and Verification Group moves.rwth-aachen.de/teaching/ws-1718/fuml/ 5.

More information

Introduction to Model Checking. Debdeep Mukhopadhyay IIT Madras

Introduction to Model Checking. Debdeep Mukhopadhyay IIT Madras Introduction to Model Checking Debdeep Mukhopadhyay IIT Madras How good can you fight bugs? Comprising of three parts Formal Verification techniques consist of three parts: 1. A framework for modeling

More information

Lecture 2 Automata Theory

Lecture 2 Automata Theory Lecture 2 Automata Theory Ufuk Topcu Nok Wongpiromsarn Richard M. Murray EECI, 18 March 2013 Outline Modeling (discrete) concurrent systems: transition systems, concurrency and interleaving Linear-time

More information

Syntax and Semantics of Propositional Linear Temporal Logic

Syntax and Semantics of Propositional Linear Temporal Logic Syntax and Semantics of Propositional Linear Temporal Logic 1 Defining Logics L, M, = L - the language of the logic M - a class of models = - satisfaction relation M M, ϕ L: M = ϕ is read as M satisfies

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

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

Automata-Theoretic Model Checking of Reactive Systems

Automata-Theoretic Model Checking of Reactive Systems Automata-Theoretic Model Checking of Reactive Systems Radu Iosif Verimag/CNRS (Grenoble, France) Thanks to Tom Henzinger (IST, Austria), Barbara Jobstmann (CNRS, Grenoble) and Doron Peled (Bar-Ilan University,

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

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

Tecniche di Verifica. Introduction to Propositional Logic

Tecniche di Verifica. Introduction to Propositional Logic Tecniche di Verifica Introduction to Propositional Logic 1 Logic A formal logic is defined by its syntax and semantics. Syntax An alphabet is a set of symbols. A finite sequence of these symbols is called

More information

Chapter 3: Linear-Time Properties

Chapter 3: Linear-Time Properties Chapter 3: Linear-Time Properties Prof. Ali Movaghar Verification of Reactive Systems Outline n n To verify the transition system model of the system under consideration, we need to specify the property

More information

Verification. Arijit Mondal. Dept. of Computer Science & Engineering Indian Institute of Technology Patna

Verification. Arijit Mondal. Dept. of Computer Science & Engineering Indian Institute of Technology Patna IIT Patna 1 Verification Arijit Mondal Dept. of Computer Science & Engineering Indian Institute of Technology Patna arijit@iitp.ac.in Introduction The goal of verification To ensure 100% correct in functionality

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

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

Course Runtime Verification

Course Runtime Verification Course Martin Leucker (ISP) Volker Stolz (Høgskolen i Bergen, NO) INF5140 / V17 Chapters of the Course Chapter 1 Recall in More Depth Chapter 2 Specification Languages on Words Chapter 3 LTL on Finite

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

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

Computation Tree Logic

Computation Tree Logic Chapter 6 Computation Tree Logic Pnueli [88] has introduced linear temporal logic to the computer science community for the specification and verification of reactive systems. In Chapter 3 we have treated

More information

A Hierarchy for Accellera s Property Specification Language

A Hierarchy for Accellera s Property Specification Language A Hierarchy for Accellera s Property Specification Language Thomas Türk May 1st, 2005 Diploma Thesis University of Kaiserslautern Supervisor: Prof. Dr. Klaus Schneider Vorliegende Diplomarbeit wurde von

More information

From Liveness to Promptness

From Liveness to Promptness From Liveness to Promptness Orna Kupferman 1, Nir Piterman 2, and Moshe Y. Vardi 3 1 Hebrew University 2 Ecole Polytechnique Fédéral de Lausanne (EPFL) 3 Rice University Abstract. Liveness temporal properties

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

Temporal Logic. Stavros Tripakis University of California, Berkeley. We have designed a system. We want to check that it is correct.

Temporal Logic. Stavros Tripakis University of California, Berkeley. We have designed a system. We want to check that it is correct. EE 244: Fundamental Algorithms for System Modeling, Analysis, and Optimization Fall 2016 Temporal logic Stavros Tripakis University of California, Berkeley Stavros Tripakis (UC Berkeley) EE 244, Fall 2016

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

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

LTL and CTL. Lecture Notes by Dhananjay Raju

LTL and CTL. Lecture Notes by Dhananjay Raju LTL and CTL Lecture Notes by Dhananjay Raju draju@cs.utexas.edu 1 Linear Temporal Logic: LTL Temporal logics are a convenient way to formalise and verify properties of reactive systems. LTL is an infinite

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 Theory and Formal Grammars: Lecture 1

Automata Theory and Formal Grammars: Lecture 1 Automata Theory and Formal Grammars: Lecture 1 Sets, Languages, Logic Automata Theory and Formal Grammars: Lecture 1 p.1/72 Sets, Languages, Logic Today Course Overview Administrivia Sets Theory (Review?)

More information

Computation Tree Logic

Computation Tree Logic Computation Tree Logic Computation tree logic (CTL) is a branching-time logic that includes the propositional connectives as well as temporal connectives AX, EX, AU, EU, AG, EG, AF, and EF. The syntax

More information

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

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

Systems Verification. Alessandro Abate. Day 1 January 25, 2016

Systems Verification. Alessandro Abate. Day 1 January 25, 2016 Systems Verification Alessandro Abate Day 1 January 25, 2016 Outline Course setup Intro to formal verification Models - labelled transition systems Properties as specifications - modal logics Model checking

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

LTL with Arithmetic and its Applications in Reasoning about Hierarchical Systems

LTL with Arithmetic and its Applications in Reasoning about Hierarchical Systems This space is reserved for the EPiC Series header, do not use it LTL with Arithmetic and its Applications in Reasoning about Hierarchical Systems Rachel Faran and Orna Kupferman The Hebrew University,

More information

Model Checking with CTL. Presented by Jason Simas

Model Checking with CTL. Presented by Jason Simas Model Checking with CTL Presented by Jason Simas Model Checking with CTL Based Upon: Logic in Computer Science. Huth and Ryan. 2000. (148-215) Model Checking. Clarke, Grumberg and Peled. 1999. (1-26) Content

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

Transition Systems and Linear-Time Properties

Transition Systems and Linear-Time Properties Transition Systems and Linear-Time Properties Lecture #1 of Principles of Model Checking Joost-Pieter Katoen Software Modeling and Verification Group affiliated to University of Twente, Formal Methods

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

Propositional Logic: Models and Proofs

Propositional Logic: Models and Proofs Propositional Logic: Models and Proofs C. R. Ramakrishnan CSE 505 1 Syntax 2 Model Theory 3 Proof Theory and Resolution Compiled at 11:51 on 2016/11/02 Computing with Logic Propositional Logic CSE 505

More information

Property Checking of Safety- Critical Systems Mathematical Foundations and Concrete Algorithms

Property Checking of Safety- Critical Systems Mathematical Foundations and Concrete Algorithms Property Checking of Safety- Critical Systems Mathematical Foundations and Concrete Algorithms Wen-ling Huang and Jan Peleska University of Bremen {huang,jp}@cs.uni-bremen.de MBT-Paradigm Model Is a partial

More information

Chapter 3 Deterministic planning

Chapter 3 Deterministic planning Chapter 3 Deterministic planning In this chapter we describe a number of algorithms for solving the historically most important and most basic type of planning problem. Two rather strong simplifying assumptions

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

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

Model for reactive systems/software

Model for reactive systems/software Temporal Logics CS 5219 Abhik Roychoudhury National University of Singapore The big picture Software/ Sys. to be built (Dream) Properties to Satisfy (caution) Today s lecture System Model (Rough Idea)

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

Tableau-Based Automata Construction for Dynamic Linear Time Temporal Logic

Tableau-Based Automata Construction for Dynamic Linear Time Temporal Logic Tableau-Based Automata Construction for Dynamic Linear Time Temporal Logic Laura Giordano Università del Piemonte Orientale Alessandria, Italy laura@mfn.unipmn.it Alberto Martelli Università di Torino

More information

Lecture 7 Synthesis of Reactive Control Protocols

Lecture 7 Synthesis of Reactive Control Protocols Lecture 7 Synthesis of Reactive Control Protocols Richard M. Murray Nok Wongpiromsarn Ufuk Topcu California Institute of Technology AFRL, 25 April 2012 Outline Review: networked control systems and cooperative

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

FORMAL METHODS LECTURE III: LINEAR TEMPORAL LOGIC

FORMAL METHODS LECTURE III: LINEAR TEMPORAL LOGIC Alessandro Artale (FM First Semester 2007/2008) p. 1/39 FORMAL METHODS LECTURE III: LINEAR TEMPORAL LOGIC Alessandro Artale Faculty of Computer Science Free University of Bolzano artale@inf.unibz.it http://www.inf.unibz.it/

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

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

Comp487/587 - Boolean Formulas

Comp487/587 - Boolean Formulas Comp487/587 - Boolean Formulas 1 Logic and SAT 1.1 What is a Boolean Formula Logic is a way through which we can analyze and reason about simple or complicated events. In particular, we are interested

More information

Existential Second-Order Logic and Modal Logic with Quantified Accessibility Relations

Existential Second-Order Logic and Modal Logic with Quantified Accessibility Relations Existential Second-Order Logic and Modal Logic with Quantified Accessibility Relations preprint Lauri Hella University of Tampere Antti Kuusisto University of Bremen Abstract This article investigates

More information

Model Checking: An Introduction

Model Checking: An Introduction Model Checking: An Introduction Meeting 3, CSCI 5535, Spring 2013 Announcements Homework 0 ( Preliminaries ) out, due Friday Saturday This Week Dive into research motivating CSCI 5535 Next Week Begin foundations

More information

Spiking Neural P Systems with Anti-Spikes as Transducers

Spiking Neural P Systems with Anti-Spikes as Transducers ROMANIAN JOURNAL OF INFORMATION SCIENCE AND TECHNOLOGY Volume 14, Number 1, 2011, 20 30 Spiking Neural P Systems with Anti-Spikes as Transducers Venkata Padmavati METTA 1, Kamala KRITHIVASAN 2, Deepak

More information

Linear-time Temporal Logic

Linear-time Temporal Logic Linear-time Temporal Logic Pedro Cabalar Department of Computer Science University of Corunna, SPAIN cabalar@udc.es 2015/2016 P. Cabalar ( Department Linear oftemporal Computer Logic Science University

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

Propositional and Predicate Logic - VII

Propositional and Predicate Logic - VII Propositional and Predicate Logic - VII Petr Gregor KTIML MFF UK WS 2015/2016 Petr Gregor (KTIML MFF UK) Propositional and Predicate Logic - VII WS 2015/2016 1 / 11 Theory Validity in a theory A theory

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

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

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

CTL-RP: A Computational Tree Logic Resolution Prover

CTL-RP: A Computational Tree Logic Resolution Prover 1 -RP: A Computational Tree Logic Resolution Prover Lan Zhang a,, Ullrich Hustadt a and Clare Dixon a a Department of Computer Science, University of Liverpool Liverpool, L69 3BX, UK E-mail: {Lan.Zhang,

More information

Symbolic Model Checking Property Specification Language*

Symbolic Model Checking Property Specification Language* Symbolic Model Checking Property Specification Language* Ji Wang National Laboratory for Parallel and Distributed Processing National University of Defense Technology *Joint Work with Wanwei Liu, Huowang

More information

Basics of Linear Temporal Proper2es

Basics of Linear Temporal Proper2es Basics of Linear Temporal Proper2es Robert B. France State vs ac2on view Ac2on view abstracts out states; focus only on ac2on labels State view: focus only on states and the proposi2ons that are true in

More information

Informal Statement Calculus

Informal Statement Calculus FOUNDATIONS OF MATHEMATICS Branches of Logic 1. Theory of Computations (i.e. Recursion Theory). 2. Proof Theory. 3. Model Theory. 4. Set Theory. Informal Statement Calculus STATEMENTS AND CONNECTIVES Example

More information

Computation Tree Logic (CTL)

Computation Tree Logic (CTL) Computation Tree Logic (CTL) Fazle Rabbi University of Oslo, Oslo, Norway Bergen University College, Bergen, Norway fazlr@student.matnat.uio.no, Fazle.Rabbi@hib.no May 30, 2015 Fazle Rabbi et al. (UiO,

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

Temporal Logic and Fair Discrete Systems

Temporal Logic and Fair Discrete Systems Temporal Logic and Fair Discrete Systems Nir Piterman and Amir Pnueli Abstract Temporal logic was used by philosophers to reason about the way the world changes over time. Its modern use in specification

More information

Design and Analysis of Distributed Interacting Systems

Design and Analysis of Distributed Interacting Systems Design and Analysis of Distributed Interacting Systems Organization Prof. Dr. Joel Greenyer April 11, 2013 Organization Lecture: Thursdays, 10:15 11:45, F 128 Tutorial: Thursdays, 13:00 13:45, G 323 first

More information

SFM-11:CONNECT Summer School, Bertinoro, June 2011

SFM-11:CONNECT Summer School, Bertinoro, June 2011 SFM-:CONNECT Summer School, Bertinoro, June 20 EU-FP7: CONNECT LSCITS/PSS VERIWARE Part 3 Markov decision processes Overview Lectures and 2: Introduction 2 Discrete-time Markov chains 3 Markov decision

More information

A brief introduction to Logic. (slides from

A brief introduction to Logic. (slides from A brief introduction to Logic (slides from http://www.decision-procedures.org/) 1 A Brief Introduction to Logic - Outline Propositional Logic :Syntax Propositional Logic :Semantics Satisfiability and validity

More information

Abstractions and Decision Procedures for Effective Software Model Checking

Abstractions and Decision Procedures for Effective Software Model Checking Abstractions and Decision Procedures for Effective Software Model Checking Prof. Natasha Sharygina The University of Lugano, Carnegie Mellon University Microsoft Summer School, Moscow, July 2011 Lecture

More information

Reasoning about Time and Reliability

Reasoning about Time and Reliability Reasoning about Time and Reliability Probabilistic CTL model checking Daniel Bruns Institut für theoretische Informatik Universität Karlsruhe 13. Juli 2007 Seminar Theorie und Anwendung von Model Checking

More information

Alternating Time Temporal Logics*

Alternating Time Temporal Logics* Alternating Time Temporal Logics* Sophie Pinchinat Visiting Research Fellow at RSISE Marie Curie Outgoing International Fellowship * @article{alur2002, title={alternating-time Temporal Logic}, author={alur,

More information

FAIRNESS FOR INFINITE STATE SYSTEMS

FAIRNESS FOR INFINITE STATE SYSTEMS FAIRNESS FOR INFINITE STATE SYSTEMS Heidy Khlaaf University College London 1 FORMAL VERIFICATION Formal verification is the process of establishing whether a system satisfies some requirements (properties),

More information

Modal and Temporal Logics

Modal and Temporal Logics Modal and Temporal Logics Colin Stirling School of Informatics University of Edinburgh July 23, 2003 Why modal and temporal logics? 1 Computational System Modal and temporal logics Operational semantics

More information

Lecture 9 Synthesis of Reactive Control Protocols

Lecture 9 Synthesis of Reactive Control Protocols Lecture 9 Synthesis of Reactive Control Protocols Nok Wongpiromsarn Singapore-MIT Alliance for Research and Technology Richard M. Murray and Ufuk Topcu California Institute of Technology EECI, 16 May 2012

More information

Automata, Logic and Games: Theory and Application

Automata, Logic and Games: Theory and Application Automata, Logic and Games: Theory and Application 2 Parity Games, Tree Automata, and S2S Luke Ong University of Oxford TACL Summer School University of Salerno, 14-19 June 2015 Luke Ong S2S 14-19 June

More information