Journal of Automated Reasoning

, Volume 42, Issue 1, pp 1–33 | Cite as

Performance Analysis and Functional Verification of the Stop-and-Wait Protocol in HOL



Real-time systems usually involve a subtle interaction of a number of distributed components and have a high degree of parallelism, which makes their performance analysis quite complex. Thus, traditional techniques, such as simulation, or the state-based formal methods usually fail to produce reasonable results. In this paper, we propose to use higher-order-logic (HOL) theorem proving for the performance analysis of real-time systems. The idea is to formalize the real-time system as a logical conjunction of HOL predicates, whereas each one of these predicates define an autonomous component or process of the given real-time system. The random or unpredictable behavior found in these components is modeled as random variables. This formal specification can then be used in a HOL theorem prover to reason about both functional and performance related properties of the given real-time system. In order to illustrate the practical effectiveness of our approach, we present the analysis of the Stop-and-Wait protocol, which is a classical example of real-time systems. The functional correctness of the protocol is verified by proving that the protocol ensures reliable data transfers. Whereas, the average message delay relation is verified in HOL for the sake of performance analysis. The paper includes the protocol’s formalization details along with the HOL proof sketches for the major theorems.


Communication protocols Higher-order-logic HOL theorem prover Probability theory Real-time systems 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Alur, R.: Techniques for Automatic Verification of Real-time Systems. PhD Thesis. Stanford University, Stanford, USA (1992)Google Scholar
  2. 2.
    Amnell, T., Behrmann, G., Bengtsson, J., D’Argenio, P., David, A., Fehnker, A., Hune, T., Jeannet, B., Larsen, K.G., Möller, M., Pettersson, P., Weise, C., Yi, W.: Uppaal – now, next, and future. In: Modeling and Verification of Parallel Processes. LNCS, vol. 2067, pp. 99–124. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  3. 3.
    Beyer, D., Lewerentz, C., Noack, A.: Rabbit: a tool for BDD-based verification of real-time systems. In: Computer Aided Verification. LNCS, vol. 2725, pp. 122–125. Springer, Heidelberg (2003)Google Scholar
  4. 4.
    Billington, J., Gallasch, G., Petrucci, L.: Fast verification of the class of stop-and-wait protocols modelled by coloured petri nets. Nordic J. Comput. 12(3), 251–274 (2005)MATHMathSciNetGoogle Scholar
  5. 5.
    Aviation Safety Network: Boeing 777 Incident. (2008)
  6. 6.
    Bucci, G., Sassoli, L., Vicario, E.: Correctness verification and performance analysis of real-time systems using stochastic preemptive time petri nets. IEEE Trans. Softw. Eng. 31(11), 913–927 (2005)CrossRefGoogle Scholar
  7. 7.
    Cardell-Oliver, R.: The Formal Verification of Hard Real-time systems. PhD Thesis. University of Cambridge, Cambridge (1992)Google Scholar
  8. 8.
    Clarke, E., Grumberg, O., Peled, D.: Model Checking. MIT, Cambridge (2000)Google Scholar
  9. 9.
    Wikipedia: Code Red (Computer Worm). (2008)
  10. 10.
    DeGroot, M.: Probability and Statistics. Addison-Wesley, Reading (1989)Google Scholar
  11. 11.
    Duflot, M., Fribourg, L., Hérault, T., Lassaigne, R., Magniette, F., Messika, S., Peyronnet, S., Picaronny, C.: Probabilistic model checking of the CSMA/CD protocol using PRISM and APMC. In: Proc. 4th Workshop on Automated Verification of Critical Systems, pp. 195–214. Elsevier Science, Oxford (2004)Google Scholar
  12. 12.
    Gallasch, G., Billington, J.: A parametric state space for the analysis of the infinite class of stop-and-wait protocols. In: Model Checking Software. LNCS, vol. 3925, pp. 201–218. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  13. 13.
    Leon Garcia, A., Widjaja, I.: Communication Networks: Fundamental Concepts and Key Architectures. McGraw-Hill, New York (2004)Google Scholar
  14. 14.
    Gordon, M.: Mechanizing programming logics in higher-order logic. In: Current Trends in Hardware Verification and Automated Theorem Proving, pp. 387–439. Springer, Heidelberg (1989)Google Scholar
  15. 15.
    Guerra, F., Figueiredo, J., Guerrero, D.: Protocol performance analysis using a timed extension for an object oriented petri net language. Electron. Notes Theor. Comput. Sci. 130, 187–209 (2005)CrossRefGoogle Scholar
  16. 16.
    Harrison, J.: Theorem Proving with the Real Numbers. Springer, Heidelberg (1998)MATHGoogle Scholar
  17. 17.
    Harrison, J., Slind, K., Arthan, R.: HOL. In: The Seventeen Provers of the World. LNCS, vol. 3600, pp. 11–19. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  18. 18.
    Hasan, O., Tahar, S.: Formalization of the continuous probability distributions. In: Automated Deduction. LNAI, vol. 4603, pp. 3–18. Springer, Heidelberg (2007)Google Scholar
  19. 19.
    Hasan, O., Tahar, S.: Verification of expectation properties for discrete random variables in HOL. In: Theorem Proving in Higher-Order Logics. LNCS, vol. 4732, pp. 119–134. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  20. 20.
    Hasan, O., Tahar, S.: Verification of tail distribution bounds in a theorem prover. In: Numerical Analysis and Applied Mathematics, vol. 936, pp. 259–262. American Institute of Physics, New York (2007)Google Scholar
  21. 21.
    Hasan, O., Tahar, S.: Formal Verification of Expectation and Variance for Discrete Random Variables. Technical Report. Concordia University, Montreal, June (2007).
  22. 22.
    Havelund, K., Shankar, N.: Experiments in theorem proving and model checking for protocol verification. In: Industrial Benefit and Advances in Formal Methods. LNCS, vol. 1051, pp. 662–681. Springer, Heidelberg (1996)Google Scholar
  23. 23.
    Hurd, J.: Formal Verification of Probabilistic Algorithms. PhD Thesis. University of Cambridge, Cambridge (2002)Google Scholar
  24. 24.
    Khazanie, R.: Basic Probability Theory and Applications. Goodyear, Toronto (1976)Google Scholar
  25. 25.
    Kwiatkowska, M., Norman, G., Parker, D.: Quantitative analysis with the probabilistic model checker PRISM. Electron. Notes Theor. Comput. Sci. 153(2), 5–31 (2005)CrossRefGoogle Scholar
  26. 26.
    Kwiatkowska, M., Norman, G., Parker, D.: Stochastic model checking. In: Formal Methods for Performance Evaluation. LNCS, vol. 4486, pp. 220–270. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  27. 27.
    Kwiatkowska, M., Norman, G., Segala, R., Sproston, J.: Automatic verification of real-time systems with discrete probability distributions. Theor. Comput. Sci., Elsevier. 282(1), 101–150 (2002)MATHMathSciNetCrossRefGoogle Scholar
  28. 28.
  29. 29.
    NASA: Mars Polar Lander. (2008)
  30. 30.
    Marson, M., Bianco, A., Ciminiera, L., Sisto, R., Valenzano, A.: A LOTUS extension for the perfomance analysis of distributed systems. IEEE Trans. Netw. 2(2), 151–165 (1994)CrossRefGoogle Scholar
  31. 31.
    Paulson, L.: Isabelle: A Generic Theroem Prover. LNCS, vol. 828. Springer, Heidelberg (1994)Google Scholar
  32. 32.
    PVS: PVS Specification and Verification System. (2008)
  33. 33.
    Steggles, L., Kosiuczenko, P.: A timed rewriting logic semantics for SDL: a case study of the alternating bit protocol. Electron. Notes Theor. Comput. Sci. 15, 83–104 (1998)CrossRefGoogle Scholar
  34. 34.
    Stenning, N.: A data transfer protocol. Comput. Netw. 1, 99–110 (1976)Google Scholar
  35. 35.
    Suzuki, I.: Formal analysis of the alternating bit protocol by temporal petri nets. IEEE Trans. Softw. Eng. 16(10), 1273–1281 (1990)CrossRefGoogle Scholar
  36. 36.
    Tanenbaum, A.: Computer Networks. Prentice-Hall International, New York (1996)Google Scholar
  37. 37.
    Wells, L.: Performance analysis using coloured petri nets. In: Peoc. IEEE International Symposium on Modeling, Analysis, and Simulation of Computer and Telecommunications Systems, pp. 217–222. IEEE Computer Society, Los Alamitos (2002)CrossRefGoogle Scholar

Copyright information

© Springer Science+Business Media B.V. 2008

Authors and Affiliations

  1. 1.Department of Electrical and Computer EngineeringConcordia UniversityMontrealCanada

Personalised recommendations