Method and case study of model checking concurrent systems that use unbounded timestamps

Size: px
Start display at page:

Download "Method and case study of model checking concurrent systems that use unbounded timestamps"

Transcription

1 2017 IEEE 22nd Pacific Rim International Symposium on Dependable Computing Method and case study of model checking concurrent systems that use unbounded timestamps Shinya Nakano Graduate School of Information Science and Technology Osaka University Osaka, Japan Tatsuhiro Tsuchiya Graduate School of Information Science and Technology Osaka University Osaka, Japan Abstract Parallel and distributed algorithms, including those for fault tolerance, often use timestamps to coordinate the behaviors of processes. These algorithms are hard to correctly design and often subject to subtle design faults. Model checking, which is a state exploration-based verification method, has been very successful in finding design faults in many practical systems. However model checking of timestamp-based algorithms is difficult when the values of timestamps are not bounded, because then the state space is infinite. This paper addresses the problem of infinite state space by proposing a data abstraction technique for timestamps. This technique transforms the infinitestate algorithm to a finite-state abstract model which simulates the original algorithm. The applicability of this approach is demonstrated through a case study Lamport s bakery algorithm is verified in the absence and presence of process failures. Index Terms model checking, data abstraction, timestamp, bakery algorithm, SPIN I. INTRODUCTION Parallel and distributed algorithms, including those for fault tolerance, often use timestamps to coordinate the behaviors of processes. These algorithms are proven to be hard to correctly design and often subject to subtle design faults. Model checking, which is a state exploration-based verification method, has been very successful in finding design faults in many practical systems. However applying model checking to timestamp-based algorithms is difficult when the values of timestamps are not be bounded, in which case the state space is infinite. This paper addresses the problem of infinite state space by proposing a data abstraction technique for timestamps. The key observation behind the proposed technique is that the behaviors of the algorithm mainly depend on the equality or inequality of different timestamps but do not depend on their values themselves. This observation leads to a simple abstraction that represents the vector of unbounded timestamps by that of small integers that maintains the same ordering. As a result the abstraction yields a finite state abstract model which simulates the original algorithm. As a motivating example, let us consider a simplified version of Lamport s bakery algorithm [1] (Algorithm 1). The purpose Algorithm 1 Simplified bakery algorithm (i =0, 1) 1: variables 2: t i (shared), tmp i (local) 3: initialization 4: t i := 0; tmp i := 0 5: task 6: while true do 7: tmp i := t 1 i +1 8: t i := tmp i 9: wait until (t 1 i =0 tmp i <t 1 i (tmp i = t 1 1 i =0)) 10: critical section 11: t i := 0 of the algorithm is to coordinate two concurrent processes i = 0, 1 to achieve mutual exclusion. The variables t 0 and t 1 are shared by the two processes, as tmp 0 and tmp 1 are local to each process. In the algorithm, all the four variables are used to store timestamps. When the two processes compete for the critical section, the process i that has a smaller timestamp t i is permitted to enter the critical section. The timestamps can be arbitrarily large when the two processes are continuously trying to enter the critical section. Therefore it is not possible to explore all possible states of this simple algorithm using a finite state model checker, which is the kind of model checker that is most widely used. We propose an abstraction technique that can be used to transform a timestamp-based algorithm into an algorithm that has no unbounded timestamps. We show that the behavior of the transformed algorithm over-approximates that of the original algorithm. In other words, the abstract algorithm contains all behaviors of the original algorithm. This makes it possible to verify the original algorithm by model checking the finite-state algorithm. II. MODEL We represent the algorithm under verification as a guarded command program. This is because guarded command programs allow more rigorous treatment than pseudocode without introducing a complex operational semantics. A guarded command program (or program for short) consists of a finite set of state variables and a finite set of guarded commands. A state variable is either a finite variable that has a finite domain or a timestamp variable which takes any non-negative integer /17 $ IEEE DOI /PRDC

2 finite variables pc i {1, 2, 3, 4} timestamp variables t i,tmp i initialization pc i := 1,t i := 0,tmp i := 0 commands pc i =1 tmp i := t 1 i +1,pc i := 2 pc i =2 t i := tmp i,pc i := 3 pc i =3 (t i 1 =0 tmp i <t i 1 (tmp i = t 1 1 i =0)) pc i := 4 pc i =4 t i := 0,pc i := 1 Fig. 1. Guarded-command program for simplified bakery algorithm (i =0, 1) value. We denote the timestamp variables by ts i,i=1,..., N N is the total number of timestamp variables. A guarded command is a pair of a guard and an action, denoted as guard action A guard is either an atomic state formula, which is defined below, or any Boolean combination of atomic state formulae. We define an atomic state formula as either of: 1) An arbitrary Boolean-valued expression over finite variables; 2) ts i ts j is either of <, >,, or =; and 3) ts i =0and ts i 0. An action is a set of substitutions to state variables. The substituted value to a finite state variable cannot depend on the values of the timestamp variables. We also assume that at most one timestamp can be updated in any action. We permit substitution to a timestamp variable ts i only if it is either of the following forms: Reset) ts i := 0 Set) ts i := ts j (i j) Set and increment) ts i := ts j +1 (Possibly i = j, in which case this corresponds to an increment of ts i.) Pseudocode can be translated into guarded command code by introducing a state variable that works as a program counter. Figure 1 shows the program that represents Algorithm 1 pc i is the program counter variable for process i. The behavior of the system is represented as a state transition system (S, T, s init ) : S: a set of states. S D 1... D F N N 0 D i is the domain of the ith finite variable, F is the number of finite variables, and N 0 is the set of non-negative integers. T S S: a set of transitions. A transition is an ordered state pair (s, s ) such that there is some command such that its guard is true with respect to state s and applying its action to s yields the next state s. s init S: the initial state. In a state transition system, a path from state s 1 S is an infinite sequence of states s 1 s 2... such that 1) (s i,s i+1 ) T for any i 1, or 2) there exists some e 1 such that (s i,s i+1 ) T for any 1 i e 1, no commands are enabled at s e, and s i = s e for any i e. The second case is necessary to treat finite and infinite behaviors in a uniform way. (Technically, the second case defines stutter extension.) III. TIMESTAMP ABSTRACTION A. Abstract Program The basic idea of the proposed abstraction technique is as follows. When the program has a total of N timestamp variables, we map the value of a timestamp to an integer in {0,..., N} to represent their order in size and zeroness. We denote this mapping by h : N N 0 {0,..., N} N N 0 is a set of non-negative integers. Let h i ( ) denote the ith element of h( ). We define h( ) as follows. 0 ts i =0 h i (ts 1,..., ts N )= j ts i 0and ts i is the jth smallest element in {ts i (1 i N) ts i 0} For example, we have: h(10, 0, 12) = (1, 0, 2) h(10, 10, 10) = (1, 1, 1) Now we show how to translate the program under verification into another program that has no timestamp variables. Figure 2 shows the abstract program that is derived from the one shown in Figure 1. In the translation, a guarded command guard action of the original program is replaced with one or two guarded commands a-guard a-action. We call the new program the abstract program of the given program. In the resulting abstract program, each timestamp variable ts i is replaced with a finite state variable which abstracts ts i based on h( ). As a result, the state space of the abstract program becomes finite. We call an abstract timestamp. Case 0) There is no update on timestamps in action. In this case a-action is identical to action. The guard a-guard is derived from the guard of the original algorithm simply by replacing ts j with ats j. Case 1) The action contains ts i := 0. In this case the substitution ts i := 0 is replaced with (ats 1,..., ats N ) := RST atsi (ats 1,..., ats N ). RST atsi is defined as follows. RST atsi (ats 1,.., ats n )=h(ats 1,.., ats n) ats k = { atsk k i 0 k = i The guard a-guard is derived as in Case 0. Case 2) The action contains ts i := ts j. In this case the substitution ts i := ts j is replaced with (ats 1,..., ats N ):= 262

3 SET atsj (ats 1,..., ats N ). SET atsj (ats 1,..., ats N ) is defined as follows. SET atsj (ats 1,.., ats n )=h(ats 1,.., ats n) { ats atsk k i k = ats j k = i The guard a-guard is derived as in Cases 0 and 1. Case 3) The action contains ts i := ts j +1. This case is the most difficult to deal with. For example, (ats 1,ats 2,ats 3 )= (1, 2, 3) could represent (ts 1,ts 2,ts 3 ) = (10, 20, 30) or (19, 20, 30). Then suppose that an action increments ts 1. This results in (ats 1,ats 2,ats 3 ) = (1, 2, 3) or (1, 1, 2). Hence, unlike the above cases, two new commands are necessary. The action of the first guarded command is obtained by replacing the substitution ts i := ts j +1 in action with (ats 1,..., ats N ):=INC1 atsj (ats 1,..., ats N ). INC1 atsj is defined as follows. INC1 atsj (ats 1,..., ats N )=h(ats 1,..., ats N ) ats k k i at k at j ats k = ats j +1 k = i ats k +1 k i at k >at j This function represents the situation the updated value of ts i is still smaller than the timestamps that were greater than ts j before the increment. Note that this situation occurs only if ts j is not the greatest among all the timestamp variables, that is, ats j < max 1 i N { }. As a result, the guard a-guard is different in the above cases: It is a conjunction of guard with ts i replaced with and < max 1 i N { }. The action of the second one is obtained by replacing ts i := ts j +1 with (ats 1,..., ats N ):=INC2 atsj (ats 1,..., ats N ). INC2 atsj is defined as follows. INC2 atsj (ats 1,.., ats N )=h(ats 1,.., ats N ) { ats atsk k i k = ats j +1 k = i The guard of the command is derived as in the above three cases. B. Simulation relation Let M denote the transition system of the original program. and M that of the abstract program. We define M just as M but limit atomic state formulae for M to those that can be obtained from those for M by replacing ts i with. For example, >ats j is an atomic state formula for M (this corresponds to atomic state formula ts i >ts j for M); but =1is not, because ts i =1is not an atomic state formula for M. Also we identify an atomic state formula for M with its corresponding one for M. Given M =(S, T, s init ) and M =(S,T,s init ), a relation H S S is a simulation relation between M and M iff for all (s, s ) H, the following conditions hold. finite variables pc i {1, 2, 3, 4}; at i,atmp i {0, 1, 2, 3, 4} initialization pc i := 1,at i := 0,atmp i := 0 commands pc i =1 at i 1 < max{at 0,at 1,atmp 0,atmp 1} (at 0,at 1,atmp 0,atmp 1):=INC1 at i 1 atmp i ( ),pc i := 2 pc i =1 (at 0,at 1,atmp 0,atmp 1):=INC2 at i 1 atmp i ( ),pc i := 2 pc i =2 (at 0,at 1,atmp 0,atmp 1):=SET atmp i at i ( ),pc i := 3 pc i =3 (at i 1 =0 atmp i <at i 1 (atmp i = at 1 1 i =0)) pc i := 4 pc i =4 (at 0,at 1,atmp 0,atmp 1):=RST ati ( ),pc i := 1 Fig. 2. Abstract program for simplified bakery algorithm (1) a AP, a is true with respect to s iff so is with respect to s, AP is the set of atomic state formulae. (2) For each state s 1 such that (s, s 1 ) T, there exists a state s 1 with the property that (s,s 1) T and (s 1,s 1) H. (3) If no state s 1 exists such that (s, s 1 ) T, then no state s 1 exists such that (s,s 1) T or there exists a state s 1 with the property that (s,s 1) T and (s, s 1) H. We say that M simulates M, denoted M M, if there exists a simulation relation H S S such that (s init,s init ) H. We also say that paths π = s 1 s 2... in M and π = s 1s 2... in M correspond iff (s i,s i ) H for every i 1. In [2], it is shown that if M M and (s, s ) H, then every path starting from s in M has a corresponding path starting from s in M. In other words, M is an overapproximation of M. As a result, if a formula in LTL, a wellknown temporal logic, is true with respect to M, then it is also true with respect to M. This means that it is possible to model check the given program by model checking the abstract program if M M. Let H be the relation over S and S that is induced by h( ). That is, (s, s ) H iff v i = v i for all 1 i F and = h i (ts 1,..., ts N ) for all 1 i N, v i is the ith finite variable of the original program and v i is the finite variable of the abstract program that corresponds to v i. Then we can show that M M with this H. The outline of the proof is as follows. Condition (1) holds by the definition of atomic state formulae. Condition (2) holds due to the argument in Section III-A every command of the original program is substituted by one or two commands that yield all possible next states. If no command is enabled at s, then no command of the abstract program is enabled at s such that (s, s ) H; thus Condition (3) is also met. IV. CASE STUDY We applied the proposed technique to model checking of Lamport s bakery algorithm, which is a classical mutual exclusion algorithm for concurrent systems. Algorithm 2 shows the pseudocode of the algorithm for n processes (processes 0,..., n 1). Unlike other algorithms then known, the bakery 263

4 Algorithm 2 Bakery algorithm (i =0, 1,..., n 1) 1: variables 2: choosing i, number i 3: initialization 4: choosing i := false; number i := 0; 5: task 6: while true do 7: choosing i := true 8: number i := 1 + max{number 0,..., number n 1} 9: choosing i := false 10: for j =0, 1,..., n 1 do 11: wait until choosing j = false 12: wait until (number j =0) (number i < number j) (number i = number j 13: critical section 14: number i := 0 i<j)) algorithm was new in that it can tolerate failures of processes with the assumptions that if the process i fails during executing the critical section, it exits the critical section immediately and that variables choosing i and number i will be eventually reset to zero and false. Variables choosing i and number i are read by all processes but are written only by process i. The variables number i are timestamp variables which have no upper bound on their values. We used the SPIN model checker, a well-known finite state model checker [3]. The input language of SPIN is called Promela and has a C-like syntax. Figures 3 and 4 show snippets of the Promela program that implements the algorithm using the proposed abstraction technique. We wrote the Promela program so that at most one read or write can occur for shared variables choosing i and number i in every atomic step. This fine-grained atomicity requires each process to own a local timestamp variable that temporarily stores the value of number i for some i. Thus there are a total of 2n timestamp variables in the Promela program. All the 2n timestamps are represented by array number: number[i] and number[i+n] represent variable number i and the local timestamp variable for process i. Constants N and NN are set to n and 2n, respectively. Figures 3 shows how RST atsi ( ), SET atsj ( ), INC1 atsj ( ) and INC2 atsj ( ) are implemented in Promela. Note that as Promela has a rigorous operational semantics, a Promela program can be transformed into a guarded command program or vice versa. In this code, canonicalize() works just as does h( ) in the definitions of the four functions in Section III-A. (The code for canonicalize() is omitted.) For code brevity, the inc(i) part, which implements INC1 atsj ( ) and INC2 atsj ( ), takes a single argument i, because the algorithm performs no substitution of the form ts i := ts j +1 except for number i := tmp i +1 tmp i is the local timestamp for process i. Lines are used to determine whether the condition ats j < max 1 i N { } holds or not (see Case 3 in Section III-A). If this condition holds, then either INC1 atsj ( ) (lines 36 43) and INC2 atsj ( ) (lines 44 49) can be applied to update the abstract timestamps. Otherwise, only INC2 atsj ( ) can be applied (lines 52 57). Figure 4 shows the code that implements the main while loop of the algorithm. The provided construct (provided (...)) was only used to model process failures and removed when verifying failure-free runs. We model checked the algorithm against two properties expressed in LTL as follows. Mutual exclusion: (num cs 1) Progress of process n 1: (choosing n 1 = true in cs n 1 = true) Here num cs is an auxiliary variable that counts the number of processes that are executing the critical section. in cs n 1 is also an auxiliary variable that represents whether process n 1 is in the critical section or not. We used a Linux workstation with Xeon E CPU and 128 GB memory. No property violation was detected by model checking the program. This result was expected because the correctness of the bakery algorithm was proven several times [4], [5], [6], [7]. Statics, including state space size and time usage, are summarized in Tables I(a) and I(b). Next we verified whether these properties hold or not in the presence of process failures. To do so we first modeled the process failures using the technique proposed in [8]. For each process we added a new state variable halt i to represent whether the process has halted or not. The occurrence of a failure is modeled by a non-deterministic step which sets halt i to true. In a guarded command program, this could be represented by the following command: halt i = false halt i := true When halt i = true, no steps can occur for process i, except for those resetting choosing i and number i. In Figure 4, the provided construct is used to disable all normal steps when halt i = true (line 23). Figure 5 shows how a failure of process id is modeled in our Promela program. After a process i failed (line 8), choosing i and number i are eventually reset (lines 14 15). We wrote the program so that every process except process n 1 can fail at any time. Tables I(c) and I(d) show the performance figures measured when process failures were considered. Although model failures increased time consumption, verification was completed for up to three processes. No property violations were detected, again. However, in the process of writing the Promela program, we encountered a subtle programming error that manifests only at the very moment when the shared variables number i and choosing i are reset in order to handle the failure of process i. This error was found because the violation of mutual exclusion was detected as a result of model checking the program. This design error could not have been detected using traditional approaches to finding errors, such as testing, suggesting the usefulness of model checking for hunting subtle design errors in failure handling procedures. V. RELATED WORK Abstraction has been extensively studied as a powerful means to overcome the large state space occurring in model 264

5 1: shared variables 2: bool choosing[n]; 3: byte number[nn]; 4: hidden byte rankarr[nn]; 5: task 6: inline set(i, j) { 7: for(k: 0.. 2*N-1) { 8: if 9: ::k!=i-> number[k] = number[k]; 10: ::k==i-> number[k] = number[j]; 11: fi; 12: } 13: canonicalize(); 14: } 15: inline rst(i) { 16: for(k: 0.. 2*N-1) { 17: if 18: ::k!=i-> number[k] = number[k]; 19: ::k==i-> number[k] = 0; 20: fi; 21: } 22: canonicalize(); 23: } 24: inline inc(i) { 25: set(i, i+n); 26: bool eq = false; 27: for(k: 0.. 2*N-1) { 28: if 29: :: k!= i && number[i] < number[k] -> eq = true; break; 30: :: else -> skip; 31: fi; 32: } 33: if 34: :: eq == true -> 35: if 36: :: for(k:0..2*n-1) { 37: if 38: :: k!= i && number[k] <= number[i] -> number[k] = number[k]; 39: ::k==i-> skip; 40: :: k!= i && number[k] > number[i] -> number[k] = number[k] + 1; 41: fi; 42: } 43: number[i] = number[i] + 1; 44: :: for(k:0..2*n-1) { 45: if 46: ::k!=i-> number[k] = number[k]; 47: :: k == i-> number[k] = number[k] + 1; 48: fi; 49: } 50: fi; 51: :: eq == false -> 52: :: for(k:0..2*n-1) { 53: if 54: ::k!=i-> number[k] = number[k]; 55: :: k == i-> number[k] = number[k] + 1; 56: fi; 57: } 58: fi; 59: canonicalize(); 60: } 1: variables 2: bool eq; 3: byte l, k; //loop variable 4: task 5: inline max(id) { 6: byte index; 7: atomic { rst(id+n); } 8: for(index : 0.. N-1) { 9: if 10: :: atomic { number[id + N] < number[index] -> set(id+n, index); } 11: :: atomic { j==n-> cs[id] = true; in cs++; } 12: fi; 13: } 14: } 15: inline decision() { 16: byte j=0; 17: do 18: :: j < N && choosing[j] == false -> atomic { set(id+n, id); } 19: atomic { (number[j] == 0) (number[j] > number[id + n]) ((number[j] == number[id+n]) && j >= id); j++; 20: ::j==n-> break; 21: od; 22: } 23: proctype P(byte id) provided (halt[id] == false) { 24: Non-Critical: 25: choosing[id] = true; 26: Wait: 27: max(id); 28: atomic { inc(id); } 29: decision(); 30: CriticalSection: 31: atomic { rst(id); } 32: goto Non-Critical; 33: } Fig. 4. Promela implementation of Bakery algorithm s main loop 1: shared variables 2: bool halt[n], cs[n]; 3: byte in cs; 4: variables 5: byte l, k; //loop variable 6: task 7: proctype F(byte id) { 8: atomic { halt[id] == false -> halt[id] = true; } 9: atomic { 10: if 11: :: cs[id] == true -> cs[id] = false; in cs--; 12: :: else -> skip; 13: fi; 14: choosing[id] = false; 15: rst(id); 16: } 17: } Fig. 5. Promela implementation of failure process Fig. 3. Promela implementation of RST, SET and INC 265

6 TABLE I PERFORMANCE FIGURES (a) Mutual exclusion verification in failure-free case # States E+08 # Transitions E+09 Elapsed time [sec] E+04 *1: number of global system states stored *2: number of transitions explored (b) Progress verification in failure-free case # States NA # Transitions NA Elapsed time [sec] NA (c) Mutual exclusion verification in presence of process failures # States NA # Transitions NA Elapsed time [sec] NA (d) Progress verification in presence of process failures # States NA # Transitions NA Elapsed time [sec] NA checking of practical systems. The equivalence between M and M such that M M with respect to ACTL*, a temporal logic which subsumes LTL, is proven by Clarke et al. in their seminal work [2]. To our knowledge, the works that study timestamp abstraction include [9], [10], [11], [12]. In [10] and [11] we used timestamp abstraction for model checking of consensus algorithms. Consensus algorithms are distributed algorithms that make the set of processes reach an unanimous decision in spite of process or communication faults. In these previous studies, timestamp abstraction was used without rigorous proof, since the correctness was rather clear because, for example, increment of timestamp was not dealt with. As shown in Section III increment is the most intricate to deal with among the three operations that we discussed in this paper. In [12] an access control mechanism for secure information sharing was model checked using a similar abstraction technique to [10], [11]. The work that is most related to our work of this paper is the one by Derepas et al [9]. They model checked a replicationbased fault tolerant distributed system with timestamp abstraction. In the system under verification, increment of a timestamp by one is not used, as an assignment to the value that is greater than any other timestamps can occur. They provided a proof that an abstract model for the system bisimulates the original infinite-state model, which means that the two models are equivalent with respect to a large class of temporal logic, such as CTL*. As in [10], [11], [12], increment of timestamp is not considered in [9]. transition systems. The feasibility of the proposed technique was demonstrated by applying the technique to verification of the classical bakery algorithm. Using SPIN, an explicit state model checker, together with the proposed abstraction technique allowed us to check that mutual exclusion and fault tolerance hold in all possible states. An obvious direction of future work is to apply the proposed technique to model checking of various algorithms. In particular, we are interested in verification of fault-tolerant distributed algorithms, such as consensus algorithms. Currently we are working on model checking of the leader election part of RAFT [13], which is a relatively new consensus algorithm. This part of the algorithm uses unbounded timestamps and thus the proposed technique can be made use of in its verification. REFERENCES [1] L. Lamport, A new solution of Dijkstra s concurrent programming problem, Commun. ACM, vol. 17, no. 8, pp , Aug [Online]. Available: [2] E. M. Clarke, O. Grumberg, and D. E. Long, Model checking and abstraction, ACM transactions on Programming Languages and Systems (TOPLAS), vol. 16, no. 5, pp , [3] G. J. Holzmann, The SPIN Model Checker. Boston, MA, USA: Addison-Wesley Longman Publishing Co., Inc., [4] L. Lamport, A new approach to proving the correctness of multiprocess programs, ACM Trans. on Progr. Languages and Syst., vol. 1, no. 1, pp , Jan [Online]. Available: [5] D. Rosenzweig, E. Börger, and Y. Gurevich, Specification and validation methods, E. Börger, Ed. New York, NY, USA: Oxford University Press, Inc., 1995, ch. The Bakery Algorithm: Yet Another Specification and Verification, pp [6] K. Ogata and K. Futatsugi, Formal analysis of the bakery protocol with consideration of nonatomic reads and writes, in Proc. 10th International Conference on Formal Engineering Methods (ICFEM 2008). Berlin, Heidelberg: Springer Berlin Heidelberg, 2008, pp [7] W. H. Hesselink, Mechanical verification of lamport s bakery algorithm, Science of Computer Programming, vol. 78, no. 9, pp , [Online]. Available: [8] A. Arora and M. Gouda, Closure and convergence: A foundation of fault-tolerant computing, IEEE Transactions on Software Engineering, vol. 19, no. 11, pp , [9] F. Derepas, P. Gastin, and D. Plainfossé, Avoiding state explosion for distributed systems with timestamps, in International Symposium of Formal Methods Europe. Springer, 2001, pp [10] T. Tsuchiya and A. Schiper, Model checking of consensus algorithms, in Proc. 26th Symp. on Reliable Distributed Systems (SRDS), Beijing, China, Oct. 2007, pp [11] T. Noguchi, T. Tsuchiya, and T. Kikuno, Safety verification of asynchronous consensus algorithms with model checking, in Proc. of 18th Pacific Rim International Symposium on Dependable Computing (PRDC 12). Niigata, Japan: IEEE CS Press, Nov. 2012, pp [12] W. Zhao, J. Niu, and W. H. Winsborough, Refinement-based design of a group-centric secure information sharing model, in Proceedings of the Second ACM Conference on Data and Application Security and Privacy, ser. CODASPY 12. New York, NY, USA: ACM, 2012, pp [Online]. Available: [13] D. Ongaro and J. Ousterhout, In search of an understandable consensus algorithm, in 2014 USENIX Annual Technical Conference (USENIX ATC 14), 2014, pp VI. CONCLUSION AND FUTURE WORK We proposed an approach to model checking of systems that use unbounded timestamps. The proposed abstraction technique can reduce the model checking problem of infinite state transition systems to the problem of model checking finite 266

Tool demonstration: Spin

Tool demonstration: Spin Tool demonstration: Spin 1 Spin Spin is a model checker which implements the LTL model-checking procedure described previously (and much more besides). Developed by Gerard Holzmann of Bell Labs Has won

More information

The Spin Model Checker : Part I/II

The Spin Model Checker : Part I/II The Spin Model Checker : Part I/II Moonzoo Kim CS Dept. KAIST Korea Advanced Institute of Science and Technology Motivation: Tragic Accidents Caused by SW Bugs 2 Cost of Software Errors June 2002 Software

More information

SPIN, PETERSON AND BAKERY LOCKS

SPIN, PETERSON AND BAKERY LOCKS Concurrent Programs reasoning about their execution proving correctness start by considering execution sequences CS4021/4521 2018 jones@scss.tcd.ie School of Computer Science and Statistics, Trinity College

More information

Copyright 2008 CS655 System Modeling and Analysis. Korea Advanced Institute of Science and Technology

Copyright 2008 CS655 System Modeling and Analysis. Korea Advanced Institute of Science and Technology The Spin Model Checker : Part I Copyright 2008 CS655 System Korea Advanced Institute of Science and Technology System Spec. In Promela Req. Spec. In LTL Overview of the Spin Architecture Spin Model pan.c

More information

Applications of Formal Verification

Applications of Formal Verification Applications of Formal Verification Model Checking: Introduction to PROMELA Prof. Dr. Bernhard Beckert Dr. Vladimir Klebanov SS 2010 KIT INSTITUT FÜR THEORETISCHE INFORMATIK KIT University of the State

More information

Applications of Formal Verification

Applications of Formal Verification Applications of Formal Verification Model Checking: Introduction to PROMELA Prof. Dr. Bernhard Beckert Dr. Vladimir Klebanov SS 2012 KIT INSTITUT FÜR THEORETISCHE INFORMATIK KIT University of the State

More information

Applications of Formal Verification

Applications of Formal Verification Applications of Formal Verification Model Checking: Introduction to PROMELA Bernhard Beckert Mattias Ulbrich SS 2017 KIT INSTITUT FÜR THEORETISCHE INFORMATIK KIT University of the State of Baden-Württemberg

More information

I613: Formal Methods. Mutual Exclusion Problem

I613: Formal Methods. Mutual Exclusion Problem I613: Formal Methods Analysis of the Bakery Protocol (1) Modeling and Specification CafeOBJ Team of Jaist Mutual Exclusion Problem Computer systems have resources such that they are shared by multiple

More information

Verification of Bakery algorithm variants for two processes

Verification of Bakery algorithm variants for two processes Verification of Bakery algorithm variants for two processes David Dedi 1, Robert Meolic 2 1 Nova Vizija d.o.o., Vreerjeva ulica 8, SI-3310 Žalec 2 Faculty of Electrical Engineering and Computer Science,

More information

Computer Lab 1: Model Checking and Logic Synthesis using Spin (lab)

Computer Lab 1: Model Checking and Logic Synthesis using Spin (lab) Computer Lab 1: Model Checking and Logic Synthesis using Spin (lab) Richard M. Murray Nok Wongpiromsarn Ufuk Topcu Calornia Institute of Technology AFRL, 25 April 2012 Outline Spin model checker: modeling

More information

Specifying and Proving Broadcast Properties with TLA

Specifying and Proving Broadcast Properties with TLA Specifying and Proving Broadcast Properties with TLA William Hipschman Department of Computer Science The University of North Carolina at Chapel Hill Abstract Although group communication is vitally important

More information

Introduction to Model Checking

Introduction to Model Checking Introduction to Model Checking René Thiemann Institute of Computer Science University of Innsbruck WS 2007/2008 RT (ICS @ UIBK) week 4 1/23 Outline Promela - Syntax and Intuitive Meaning Promela - Formal

More information

Design and Analysis of Distributed Interacting Systems

Design and Analysis of Distributed Interacting Systems Design and Analysis of Distributed Interacting Systems Lecture 5 Linear Temporal Logic (cont.) Prof. Dr. Joel Greenyer May 2, 2013 (Last Time:) LTL Semantics (Informally) LTL Formulae are interpreted on

More information

Model checking Timber program. Paweł Pietrzak

Model checking Timber program. Paweł Pietrzak Model checking Timber program Paweł Pietrzak 1 Outline Background on model checking (spam?) The SPIN model checker An exercise in SPIN - model checking Timber Deriving finite models from Timber programs

More information

4/6/2011. Model Checking. Encoding test specifications. Model Checking. Encoding test specifications. Model Checking CS 4271

4/6/2011. Model Checking. Encoding test specifications. Model Checking. Encoding test specifications. Model Checking CS 4271 Mel Checking LTL Property System Mel Mel Checking CS 4271 Mel Checking OR Abhik Roychoudhury http://www.comp.nus.edu.sg/~abhik Yes No, with Counter-example trace 2 Recap: Mel Checking for mel-based testing

More information

Computing with Infinitely Many Processes under assumptions on concurrency and participation -M.Merritt&G.Taubenfeld. Dean Christakos & Deva Seetharam

Computing with Infinitely Many Processes under assumptions on concurrency and participation -M.Merritt&G.Taubenfeld. Dean Christakos & Deva Seetharam Computing with Infinitely Many Processes under assumptions on concurrency and participation -M.Merritt&G.Taubenfeld Dean Christakos & Deva Seetharam November 25, 2003 Abstract This paper explores four

More information

The SPIN Model Checker

The SPIN Model Checker The SPIN Model Checker Metodi di Verifica del Software Andrea Corradini Lezione 1 2013 Slides liberamente adattate da Logic Model Checking, per gentile concessione di Gerard J. Holzmann http://spinroot.com/spin/doc/course/

More information

Software Engineering using Formal Methods

Software Engineering using Formal Methods Software Engineering using Formal Methods Introduction to Promela Wolfgang Ahrendt 03 September 2015 SEFM: Promela /GU 150903 1 / 36 Towards Model Checking System Model Promela Program byte n = 0; active

More information

The Maude LTL Model Checker and Its Implementation

The Maude LTL Model Checker and Its Implementation The Maude LTL Model Checker and Its Implementation Steven Eker 1,José Meseguer 2, and Ambarish Sridharanarayanan 2 1 Computer Science Laboratory, SRI International Menlo Park, CA 94025 eker@csl.sri.com

More information

Formal Specification and Verification

Formal Specification and Verification Formal Specification and Verification Introduction to Promela Bernhard Beckert Based on a lecture by Wolfgang Ahrendt and Reiner Hähnle at Chalmers University, Göteborg Formal Specification and Verification:

More information

AsmL Specification and Verification of Lamport s Bakery Algorithm

AsmL Specification and Verification of Lamport s Bakery Algorithm Journal of Computing and Information Technology - CIT 13, 2005, 4, 313-319 313 AsmL Specification and Verification of Lamport s Bakery Algorithm Matko Botinčan Department of Mathematics, University of

More information

Distributed Systems Programming (F21DS1) SPIN: Formal Analysis II

Distributed Systems Programming (F21DS1) SPIN: Formal Analysis II Distributed Systems Programming (F21DS1) SPIN: Formal Analysis II Andrew Ireland Department of Computer Science School of Mathematical and Computer Sciences Heriot-Watt University Edinburgh Overview Introduce

More information

LTL Reasoning: How It Works

LTL Reasoning: How It Works Distributed Systems rogramming F21DS1 LTL Reasoning: How It Works Andrew Ireland School of Mathematical and Computer Sciences Heriot-Watt University Edinburgh Distributed Systems rogramming F21DS1 2 Overview

More information

Model-Checking Concurrent Systems. The Model Checker Spin. The Model Checker Spin. Wolfgang Schreiner

Model-Checking Concurrent Systems. The Model Checker Spin. The Model Checker Spin. Wolfgang Schreiner Model-Checking Concurrent Systems Wolfgang Schreiner Wolfgang.Schreiner@risc.jku.at Research Institute for Symbolic Computation (RISC) Johannes Kepler University, Linz, Austria http://www.risc.jku.at 1.

More information

Propagated Timestamps: A Scheme for The Stabilization of Maximum Flow Routing Protocols

Propagated Timestamps: A Scheme for The Stabilization of Maximum Flow Routing Protocols Propagated Timestamps: A Scheme for The Stabilization of Maximum Flow Routing Protocols Jorge A. Cobb Mohamed Waris Department of Computer Science University of Houston Houston, TX 77204-3475 Abstract

More information

Formal Methods for Software Development

Formal Methods for Software Development Formal Methods for Software Development Model Checking with Temporal Logic Wolfgang Ahrendt 21st September 2018 FMSD: Model Checking with Temporal Logic /GU 180921 1 / 37 Model Checking Check whether a

More information

INF672 Protocol Safety and Verification. Karthik Bhargavan Xavier Rival Thomas Clausen

INF672 Protocol Safety and Verification. Karthik Bhargavan Xavier Rival Thomas Clausen INF672 Protocol Safety and Verication Karthik Bhargavan Xavier Rival Thomas Clausen 1 Course Outline Lecture 1 [Today, Sep 15] Introduction, Motivating Examples Lectures 2-4 [Sep 22,29, Oct 6] Network

More information

SPIN part 2. Verification with LTL. Jaime Ramos. Departamento de Matemática, Técnico, ULisboa

SPIN part 2. Verification with LTL. Jaime Ramos. Departamento de Matemática, Técnico, ULisboa SPIN part 2 Verification with LTL Jaime Ramos Departamento de Matemática, Técnico, ULisboa Borrowed from slides by David Henriques, Técnico, ULisboa LTL model checking How Spin works Checks non-empty intersection

More information

Software Engineering using Formal Methods

Software Engineering using Formal Methods Software Engineering using Formal Methods Introduction to Promela Wolfgang Ahrendt & Richard Bubel & Reiner Hähnle & Wojciech Mostowski 31 August 2011 SEFM: Promela /GU 110831 1 / 35 Towards Model Checking

More information

Concurrent Reading and Writing of Clocks

Concurrent Reading and Writing of Clocks Concurrent Reading and Writing of Clocks LESLIE LAMPORT Digital Equipment Corporation As an exercise in synchronization without mutual exclusion, algorithms are developed to implement both a monotonic

More information

CS477 Formal Software Development Methods / 39

CS477 Formal Software Development Methods / 39 CS477 Formal Software Development Methods 2112 SC, UIUC egunter@illinois.edu http://courses.engr.illinois.edu/cs477 SPIN Beginners Tutorial April 11, 2018 Hello World /* A "Hello World" Promela model for

More information

How to Make a Correct Multiprocess Program Execute Correctly on a Multiprocessor

How to Make a Correct Multiprocess Program Execute Correctly on a Multiprocessor How to Make a Correct Multiprocess Program Execute Correctly on a Multiprocessor Leslie Lamport 1 Digital Equipment Corporation February 14, 1993 Minor revisions January 18, 1996 and September 14, 1996

More information

Announcements. Office hours. Reading. W office hour will be not starting next week. Chapter 7 (this whole week) CMSC 412 S02 (lect 7)

Announcements. Office hours. Reading. W office hour will be not starting next week. Chapter 7 (this whole week) CMSC 412 S02 (lect 7) Office hours Announcements W office hour will be 10-11 not 11-12 starting next week Reading Chapter 7 (this whole week) 1 Problems with the Producer-Consumer Shared Memory Solution Consider the three address

More information

The SPIN Model Checker

The SPIN Model Checker The SPIN Model Checker Metodi di Verifica del Software Andrea Corradini GianLuigi Ferrari Lezione 3 2011 Slides per gentile concessione di Gerard J. Holzmann 2 the do-statement do :: guard 1 -> stmnt 1.1

More information

More on Verification and Model Checking

More on Verification and Model Checking More on Verification and Model Checking Wednesday Oct 07, 2015 Philipp Rümmer Uppsala University Philipp.Ruemmer@it.uu.se 1/60 Course fair! 2/60 Exam st October 21, 8:00 13:00 If you want to participate,

More information

System Correctness. EEC 421/521: Software Engineering. System Correctness. The Problem at Hand. A system is correct when it meets its requirements

System Correctness. EEC 421/521: Software Engineering. System Correctness. The Problem at Hand. A system is correct when it meets its requirements System Correctness EEC 421/521: Software Engineering A Whirlwind Intro to Software Model Checking A system is correct when it meets its requirements a design without requirements cannot be right or wrong,

More information

Distributed Systems Programming (F21DS1) Formal Verification

Distributed Systems Programming (F21DS1) Formal Verification Distributed Systems Programming (F21DS1) Formal Verification Andrew Ireland Department of Computer Science School of Mathematical and Computer Sciences Heriot-Watt University Edinburgh Overview Focus on

More information

The alternator. Mohamed G. Gouda F. Furman Haddix

The alternator. Mohamed G. Gouda F. Furman Haddix Distrib. Comput. (2007) 20:21 28 DOI 10.1007/s00446-007-0033-1 The alternator Mohamed G. Gouda F. Furman Haddix Received: 28 August 1999 / Accepted: 5 July 2000 / Published online: 12 June 2007 Springer-Verlag

More information

Formal Specification and Verification

Formal Specification and Verification Formal Specification and Verification Model Checking with Temporal Logic Bernhard Beckert Based on a lecture by Wolfgang Ahrendt and Reiner Hähnle at Chalmers University, Göteborg Formal Specification

More information

Patrick Trentin Formal Methods Lab Class, March 03, 2017

Patrick Trentin  Formal Methods Lab Class, March 03, 2017 Spin: Introduction Patrick Trentin patrick.trentin@unitn.it http://disi.unitn.it/trentin Formal Methods Lab Class, March 03, 2017 These slides are derived from those by Stefano Tonetta, Alberto Griggio,

More information

TOWARDS AUTOMATED VERIFICATION OF WEB SERVICES

TOWARDS AUTOMATED VERIFICATION OF WEB SERVICES TOWARDS AUTOMATED VERIFICATION OF WEB SERVICES Cátia Vaz INESC-ID Lisboa, ISEL-IPL Rua Alves Redol 9, 1000-029 Lisboa cvaz@cc.isel.ipl.pt Carla Ferreira INESC-ID, IST-UTL Rua Alves Redol 9, 1000-029 Lisboa

More information

Joint Entity Resolution

Joint Entity Resolution Joint Entity Resolution Steven Euijong Whang, Hector Garcia-Molina Computer Science Department, Stanford University 353 Serra Mall, Stanford, CA 94305, USA {swhang, hector}@cs.stanford.edu No Institute

More information

Concurrency: Mutual Exclusion and

Concurrency: Mutual Exclusion and Concurrency: Mutual Exclusion and Synchronization 1 Needs of Processes Allocation of processor time Allocation and sharing resources Communication among processes Synchronization of multiple processes

More information

Proving the Correctness of Distributed Algorithms using TLA

Proving the Correctness of Distributed Algorithms using TLA Proving the Correctness of Distributed Algorithms using TLA Khushboo Kanjani, khush@cs.tamu.edu, Texas A & M University 11 May 2007 Abstract This work is a summary of the Temporal Logic of Actions(TLA)

More information

Computer Aided Verification 2015 The SPIN model checker

Computer Aided Verification 2015 The SPIN model checker Computer Aided Verification 2015 The SPIN model checker Grigory Fedyukovich Universita della Svizzera Italiana March 11, 2015 Material borrowed from Roberto Bruttomesso Outline 1 Introduction 2 PROcess

More information

THE MODEL CHECKER SPIN

THE MODEL CHECKER SPIN THE MODEL CHECKER SPIN Shin Hong, KAIST 17 th April,2007 1/33 Contents Introduction PROMELA Linear Temporal Logic Automata-theoretic software verification Example : Simple Elevator 2 SPIN is a software

More information

A Verification Approach for GALS Integration of Synchronous Components

A Verification Approach for GALS Integration of Synchronous Components GALS 2005 Preliminary Version A Verification Approach for GALS Integration of Synchronous Components F. Doucet, M. Menarini, I. H. Krüger and R. Gupta 1 Computer Science and Engineering University of California,

More information

Introduction to Linear-Time Temporal Logic. CSE 814 Introduction to LTL

Introduction to Linear-Time Temporal Logic. CSE 814 Introduction to LTL Introduction to Linear-Time Temporal Logic CSE 814 Introduction to LTL 1 Outline Motivation for TL in general Types of properties to be expressed in TL Structures on which LTL formulas are evaluated Syntax

More information

CS586: Distributed Computing Tutorial 3

CS586: Distributed Computing Tutorial 3 CS586: Distributed Computing Tutorial 3 Professor: Panagiota Fatourou TA: Eleftherios Kosmas CSD - October 2011 Mutual Exclusion - Exercise 1 Present an execution of the Bakery Algorithm where the sequence

More information

Computer Lab 1: Model Checking and Logic Synthesis using Spin (lab)

Computer Lab 1: Model Checking and Logic Synthesis using Spin (lab) Computer Lab 1: Model Checking and Logic Synthesis using Spin (lab) Richard M. Murray Nok Wongpiromsarn Ufuk Topcu California Institute of Technology EECI 19 Mar 2013 Outline Spin model checker: modeling

More information

Network Protocol Design and Evaluation

Network Protocol Design and Evaluation Network Protocol Design and Evaluation 05 - Validation, Part I Stefan Rührup Summer 2009 Overview In the last lectures: Specification of protocols and data/message formats In this chapter: Building a validation

More information

A Case Study for CTL Model Update

A Case Study for CTL Model Update A Case Study for CTL Model Update Yulin Ding and Yan Zhang School of Computing & Information Technology University of Western Sydney Kingswood, N.S.W. 1797, Australia email: {yding,yan}@cit.uws.edu.au

More information

Proving Dekker with SPIN and PROMELA

Proving Dekker with SPIN and PROMELA 15-410...fairness disabled... Proving Dekker with SPIN and PROMELA Joshua Wise With help from Greg Hartman L36_SPIN 1 Synchronization Project 4 due Wednesday Everyone having fun? Kernel interviews If you

More information

Self Stabilization. CS553 Distributed Algorithms Prof. Ajay Kshemkalyani. by Islam Ismailov & Mohamed M. Ali

Self Stabilization. CS553 Distributed Algorithms Prof. Ajay Kshemkalyani. by Islam Ismailov & Mohamed M. Ali Self Stabilization CS553 Distributed Algorithms Prof. Ajay Kshemkalyani by Islam Ismailov & Mohamed M. Ali Introduction There is a possibility for a distributed system to go into an illegitimate state,

More information

Model-Checking Concurrent Systems

Model-Checking Concurrent Systems Model-Checking Concurrent Systems Wolfgang Schreiner Wolfgang.Schreiner@risc.jku.at Research Institute for Symbolic Computation (RISC) Johannes Kepler University, Linz, Austria http://www.risc.jku.at Wolfgang

More information

Scenario Graphs Applied to Security (Summary Paper)

Scenario Graphs Applied to Security (Summary Paper) Book Title Book Editors IOS Press, 2003 1 Scenario Graphs Applied to Security (Summary Paper) Jeannette M. Wing Computer Science Department Carnegie Mellon University Pittsburgh, PA 15213 US Abstract.

More information

Concurrency: Mutual Exclusion and Synchronization

Concurrency: Mutual Exclusion and Synchronization Concurrency: Mutual Exclusion and Synchronization 1 Needs of Processes Allocation of processor time Allocation and sharing resources Communication among processes Synchronization of multiple processes

More information

SWEN-220 Mathematical Models of Software. Process Synchronization Critical Section & Semaphores

SWEN-220 Mathematical Models of Software. Process Synchronization Critical Section & Semaphores SWEN-220 Mathematical Models of Software Process Synchronization Critical Section & Semaphores 1 Topics The critical section Synchronization using busy-wait Semaphores 2 The Critical Section Processes

More information

Model Checking DSL-Generated C Source Code

Model Checking DSL-Generated C Source Code Model Checking DSL-Generated C Source Code Martin Sulzmann and Axel Zechner Informatik Consulting Systems AG, Germany {martin.sulzmann,axel.zechner}@ics-ag.de Abstract. We report on the application of

More information

Automated Reasoning. Model Checking with SPIN (II)

Automated Reasoning. Model Checking with SPIN (II) Automated Reasoning Model Checking with SPIN (II) Alan Bundy page 1 Verifying Global Properties Assertions can be used to verify a property locally For example, place assert(memreturned) at the end of

More information

Directed Model Checking for PROMELA with Relaxation-Based Distance Functions

Directed Model Checking for PROMELA with Relaxation-Based Distance Functions Directed Model Checking for PROMELA with Relaxation-Based Distance Functions Ahmad Siyar Andisha and Martin Wehrle 2 and Bernd Westphal Albert-Ludwigs-Universität Freiburg, Germany {andishaa,westphal}@informatik.uni-freiburg.de

More information

Model Checking with Automata An Overview

Model Checking with Automata An Overview Model Checking with Automata An Overview Vanessa D Carson Control and Dynamical Systems, Caltech Doyle Group Presentation, 05/02/2008 VC 1 Contents Motivation Overview Software Verification Techniques

More information

SPIN: Introduction and Examples

SPIN: Introduction and Examples SPIN: Introduction and Examples Alessandra Giordani agiordani@disi.unitn.it http://disi.unitn.it/~agiordani Formal Methods Lab Class, September 28, 2014 *These slides are derived from those by Stefano

More information

State-Optimal Snap-Stabilizing PIF In Tree Networks

State-Optimal Snap-Stabilizing PIF In Tree Networks State-Optimal Snap-Stabilizing PIF In Tree Networks (Extended Abstract) Alain Bui, 1 Ajoy K. Datta, 2 Franck Petit, 1 Vincent Villain 1 1 LaRIA, Université de Picardie Jules Verne, France 2 Department

More information

WHEN concurrent processes share a resource such as a file

WHEN concurrent processes share a resource such as a file 1 Verification of mutual exclusion algorithms with SMV System Nikola Bogunović, Edgar Pek Faculty of Electrical Engineering and Computing Unska 3 Croatia email: nikola.bogunovic@fer.hr, edgar.pek@fer.hr

More information

Formal Methods for Software Development

Formal Methods for Software Development Formal Methods for Software Development Verification with Spin Wolfgang Ahrendt 07 September 2018 FMSD: Spin /GU 180907 1 / 34 Spin: Previous Lecture vs. This Lecture Previous lecture Spin appeared as

More information

Software Model Checking. From Programs to Kripke Structures

Software Model Checking. From Programs to Kripke Structures Software Model Checking (in (in C or or Java) Java) Model Model Extraction 1: int x = 2; int y = 2; 2: while (y

More information

Using Spin to Help Teach Concurrent Programming

Using Spin to Help Teach Concurrent Programming Using Spin to Help Teach Concurrent Programming John Regehr May 1, 1998 1 Introduction and Motivation Writing correct concurrent programs is very difficult; race conditions, deadlocks, and livelocks can

More information

Formal Verification of Process Communications in Operational Flight Program for a Small-Scale Unmanned Helicopter

Formal Verification of Process Communications in Operational Flight Program for a Small-Scale Unmanned Helicopter Formal Verication of Process Communications in Operational Flight Program for a Small-Scale Unmanned Helicopter Dong-Ah Lee 1, Junbeom Yoo 2 and Doo-Hyun Kim 3 1, 2 School of Computer Science and Engineering

More information

Action Language Verifier, Extended

Action Language Verifier, Extended Action Language Verifier, Extended Tuba Yavuz-Kahveci 1, Constantinos Bartzis 2, and Tevfik Bultan 3 1 University of Florida 2 Carnegie Mellon University 3 UC, Santa Barbara 1 Introduction Action Language

More information

Lecture 3 SPIN and Promela

Lecture 3 SPIN and Promela Lecture 3 SPIN and Promela 1 What is SPIN(Simple Promela INterpreter) A tool for analyzing mels of concurrent systems Mels described in Promela Language with concurrent processes Communication via shared

More information

Patrick Trentin Formal Methods Lab Class, Feb 26, 2016

Patrick Trentin  Formal Methods Lab Class, Feb 26, 2016 Spin: Introduction Patrick Trentin patrick.trentin@unitn.it http://disi.unitn.it/~trentin Formal Methods Lab Class, Feb 26, 2016 These slides are derived from those by Stefano Tonetta, Alberto Griggio,

More information

Formal Verification by Model Checking

Formal Verification by Model Checking Formal Verication by Model Checking Jonathan Aldrich Carnegie Mellon University Based on slides developed by Natasha Sharygina 17-654/17-754: Analysis of Software Artacts Spring 2006 1 CTL Model Checking

More information

A Verification Method for Software Safety Requirement by Combining Model Checking and FTA Congcong Chen1,a, Fuping Zeng1,b, Minyan Lu1,c

A Verification Method for Software Safety Requirement by Combining Model Checking and FTA Congcong Chen1,a, Fuping Zeng1,b, Minyan Lu1,c International Industrial Informatics and Computer Engineering Conference (IIICEC 2015) A Verification Method for Software Safety Requirement by Combining Model Checking and FTA Congcong Chen1,a, Fuping

More information

Research Collection. Formal background and algorithms. Other Conference Item. ETH Library. Author(s): Biere, Armin. Publication Date: 2001

Research Collection. Formal background and algorithms. Other Conference Item. ETH Library. Author(s): Biere, Armin. Publication Date: 2001 Research Collection Other Conference Item Formal background and algorithms Author(s): Biere, Armin Publication Date: 2001 Permanent Link: https://doi.org/10.3929/ethz-a-004239730 Rights / License: In Copyright

More information

Process Coordination

Process Coordination Process Coordination Why is it needed? Processes may need to share data More than one process reading/writing the same data (a shared file, a database record, ) Output of one process being used by another

More information

An Efficient Silent Self-Stabilizing Algorithm for 1-Maximal Matching in Anonymous Network

An Efficient Silent Self-Stabilizing Algorithm for 1-Maximal Matching in Anonymous Network An Efficient Silent Self-Stabilizing Algorithm for 1-Maximal Matching in Anonymous Network Yuma Asada and Michiko Inoue Nara Institute of Science and Technology, 8916-5 Takayama, Ikoma, NARA 630-0192 JAPAN,

More information

Initial Assumptions. Modern Distributed Computing. Network Topology. Initial Input

Initial Assumptions. Modern Distributed Computing. Network Topology. Initial Input Initial Assumptions Modern Distributed Computing Theory and Applications Ioannis Chatzigiannakis Sapienza University of Rome Lecture 4 Tuesday, March 6, 03 Exercises correspond to problems studied during

More information

Seminar Software Quality and Safety

Seminar Software Quality and Safety Seminar Software Quality and Safety SCADE a model-driven Software Development Environment by Dominik Protte Software Engineering Group Universität Paderborn Motivation Many safety-critical components in

More information

Models of concurrency & synchronization algorithms

Models of concurrency & synchronization algorithms Models of concurrency & synchronization algorithms Lecture 3 of TDA383/DIT390 (Concurrent Programming) Carlo A. Furia Chalmers University of Technology University of Gothenburg SP3 2016/2017 Today s menu

More information

CS 267: Automated Verification. Lecture 13: Bounded Model Checking. Instructor: Tevfik Bultan

CS 267: Automated Verification. Lecture 13: Bounded Model Checking. Instructor: Tevfik Bultan CS 267: Automated Verification Lecture 13: Bounded Model Checking Instructor: Tevfik Bultan Remember Symbolic Model Checking Represent sets of states and the transition relation as Boolean logic formulas

More information

Computer Science Technical Report

Computer Science Technical Report Computer Science Technical Report Feasibility of Stepwise Addition of Multitolerance to High Atomicity Programs Ali Ebnenasir and Sandeep S. Kulkarni Michigan Technological University Computer Science

More information

Dept. of CSE, York Univ. 1

Dept. of CSE, York Univ. 1 EECS 3221.3 Operating System Fundamentals No.5 Process Synchronization(1) Prof. Hui Jiang Dept of Electrical Engineering and Computer Science, York University Background: cooperating processes with shared

More information

Security for Multithreaded Programs under Cooperative Scheduling

Security for Multithreaded Programs under Cooperative Scheduling Security for Multithreaded Programs under Cooperative Scheduling Alejandro Russo and Andrei Sabelfeld Dept. of Computer Science and Engineering, Chalmers University of Technology 412 96 Göteborg, Sweden,

More information

No model may be available. Software Abstractions. Recap on Model Checking. Model Checking for SW Verif. More on the big picture. Abst -> MC -> Refine

No model may be available. Software Abstractions. Recap on Model Checking. Model Checking for SW Verif. More on the big picture. Abst -> MC -> Refine No model may be available Programmer Software Abstractions Tests Coverage Code Abhik Roychoudhury CS 5219 National University of Singapore Testing Debug Today s lecture Abstract model (Boolean pgm.) Desirable

More information

Distributed Systems Programming (F21DS1) SPIN: Formal Analysis I

Distributed Systems Programming (F21DS1) SPIN: Formal Analysis I Distributed Systems Programming (F21DS1) SPIN: Formal Analysis I Andrew Ireland Department of Computer Science School of Mathematical and Computer Sciences Heriot-Watt University Edinburgh Overview Introduce

More information

[module 2.2] MODELING CONCURRENT PROGRAM EXECUTION

[module 2.2] MODELING CONCURRENT PROGRAM EXECUTION v1.0 20130407 Programmazione Avanzata e Paradigmi Ingegneria e Scienze Informatiche - UNIBO a.a 2013/2014 Lecturer: Alessandro Ricci [module 2.2] MODELING CONCURRENT PROGRAM EXECUTION 1 SUMMARY Making

More information

Network Protocol Design and Evaluation

Network Protocol Design and Evaluation Network Protocol Design and Evaluation 05 - Validation, Part III Stefan Rührup Summer 2009 Overview In the first parts of this chapter: Validation models in Promela Defining and checking correctness claims

More information

An Eclipse Plug-in for Model Checking

An Eclipse Plug-in for Model Checking An Eclipse Plug-in for Model Checking Dirk Beyer, Thomas A. Henzinger, Ranjit Jhala Electrical Engineering and Computer Sciences University of California, Berkeley, USA Rupak Majumdar Computer Science

More information

Model-Driven Verifying Compilation of Synchronous Distributed Applications

Model-Driven Verifying Compilation of Synchronous Distributed Applications Model-Driven Verifying Compilation of Synchronous Distributed Applications Sagar Chaki, James Edmondson October 1, 2014 MODELS 14, Valencia, Spain Copyright 2014 Carnegie Mellon University This material

More information

Multi-Threaded System int x, y, r; int *p, *q, *z; int **a; EEC 421/521: Software Engineering. Thread Interleaving SPIN. Model Checking using SPIN

Multi-Threaded System int x, y, r; int *p, *q, *z; int **a; EEC 421/521: Software Engineering. Thread Interleaving SPIN. Model Checking using SPIN EEC 421/521: Software Engineering Model Checking using SPIN 4/29/08 EEC 421/521: Software Engineering 1 Multi-Threaded System int x, y, r; int *p, *q, *z; int **a; thread_1(void) /* initialize p, q, and

More information

The Black-White Bakery Algorithm and related bounded-space, adaptive, local-spinning and FIFO algorithms

The Black-White Bakery Algorithm and related bounded-space, adaptive, local-spinning and FIFO algorithms The Black-White Bakery Algorithm and related bounded-space, adaptive, local-spinning and FIFO algorithms Gadi Taubenfeld The Interdisciplinary Center, P.O.Box 167 Herzliya 46150, Israel tgadi@idc.ac.il

More information

An Anonymous Self-Stabilizing Algorithm For 1-Maximal Matching in Trees

An Anonymous Self-Stabilizing Algorithm For 1-Maximal Matching in Trees An Anonymous Self-Stabilizing Algorithm For 1-Maximal Matching in Trees Wayne Goddard, Stephen T. Hedetniemi Department of Computer Science, Clemson University {goddard,hedet}@cs.clemson.edu Zhengnan Shi

More information

Concurrent Reading and Writing of Clocks

Concurrent Reading and Writing of Clocks [1]1 27 Concurrent Reading and Writing of Clocks Leslie Lamport April 1, 1988, revised November 20, 1990 Systems Research Center DEC s business and technology objectives require a strong research program.

More information

Group Mutual Exclusion in Token Rings

Group Mutual Exclusion in Token Rings Group Mutual Exclusion in Token Rings SÉBASTIEN CANTARELL LRI/CNRS, Université de Paris-Sud, France AJOY K. DATTA Department of Computer Science, University of Nevada Las Vegas, USA FRANCK PETIT LaRIA,

More information

Syntax-directed model checking of sequential programs

Syntax-directed model checking of sequential programs The Journal of Logic and Algebraic Programming 52 53 (2002) 129 162 THE JOURNAL OF LOGIC AND ALGEBRAIC PROGRAMMING www.elsevier.com/locate/jlap Syntax-directed model checking of sequential programs Karen

More information

The Spin Model Checker : Part I. Moonzoo Kim KAIST

The Spin Model Checker : Part I. Moonzoo Kim KAIST The Spin Model Checker : Part I Moonzoo Kim KAIST Hierarchy of SW Coverage Criteria Complete Value Coverage CVC (SW) Model checking Complete Path Coverage CPC Concolic testing All-DU-Paths Coverage ADUP

More information

Specification and Generation of Environment for Model Checking of Software Components *

Specification and Generation of Environment for Model Checking of Software Components * Specification and Generation of Environment for Model Checking of Software Components * Pavel Parizek 1, Frantisek Plasil 1,2 1 Charles University, Faculty of Mathematics and Physics, Department of Software

More information

Model Checking with Abstract State Matching

Model Checking with Abstract State Matching Model Checking with Abstract State Matching Corina Păsăreanu QSS, NASA Ames Research Center Joint work with Saswat Anand (Georgia Institute of Technology) Radek Pelánek (Masaryk University) Willem Visser

More information

SPIN: Part /614 Bug Catching: Automated Program Verification. Sagar Chaki November 12, Carnegie Mellon University

SPIN: Part /614 Bug Catching: Automated Program Verification. Sagar Chaki November 12, Carnegie Mellon University SPIN: Part 1 15-414/614 Bug Catching: Automated Program Verification Sagar Chaki November 12, 2012 What is This All About? Spin On-the-fly verifier developed at Bell-labs by Gerard Holzmann and others

More information