This chapter contains five case studies designed to bring together the individual programming structures in Promela and the Spin verification techniques that we have studied in isolation. The first case study shows how to create data structures using channels together with the various send and receive statements. In the second case study we show how to program two classic nondeterministic algorithms. The third and fourth case studies model a scheduling algorithm and a mutual exclusion algorithm for real-time systems. The final case study examines an algorithm for a distributed system. It shows that a model for verifying a distributed system need not be constructed according the system architecture; instead, a more efficient model can be constructed that captures the algorithmic behavior of the system.
KeywordsSimple Cycle Sparse Array Mutual Exclusion Algorithm Outgoing Channel Environment Node
Unable to display preview. Download preview PDF.