Journal of Automated Reasoning

, Volume 53, Issue 2, pp 129–139 | Cite as

Proof Pearl: The KeY to Correct and Stable Sorting



We discuss a proof of the correctness of two sorting algorithms: Counting sort and Radix sort. The semi-automated proof is formalized in the state-of-the-art theorem prover KeY.


Sorting Correctness Theorem prover KeY Counting sort Radix sort 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Ahrendt, W., Mostowski, W., Paganelli, G.: Real-time Java API specifications for high coverage test generation. In: Proceedings of the 10th International Workshop on Java Technologies for Real-time and Embedded Systems, JTRES ’12, pp. 145–154. ACM, New York (2012). doi: 10.1145/2388936.2388960
  2. 2.
    Apt, K.R., de Boer, F.S., Olderog, E.R.: Verification of Sequential and Concurrent Programs, 3rd Edn. Texts in Computer Science. Springer-Verlag (2009). 502 pp, ISBN 978-1-84882-744-8Google Scholar
  3. 3.
    Apt, K.R., de Boer, F.S., Olderog, E.R., de Gouw, S.: Verification of Object-Oriented programs: A transformational approach. J. Comput. Syst. Sci. 78(3), 823–852 (2012)CrossRefMATHGoogle Scholar
  4. 4.
    Beckert, B., Bruns, D., Klebanov, V., Scheben, C., Schmitt, P.H., Ulbrich, M.: Secure information flow for Java. A Dynamic Logic approach. Karlsruhe reports in informatics; 2013-10, KIT (2013).
  5. 5.
    Beckert, B., Hähnle, R., Schmitt, P.H. (eds.): Verification of Object-Oriented Software: The KeY Approach, Lecture Notes in Computer Science, vol. 4334. Springer (2007)Google Scholar
  6. 6.
    Burdy, L., Cheon, Y., Cok, D.R., Ernst, M.D., Kiniry, J.R., Leavens, G.T., Leino, K.R.M., Poll, E.: An overview of JML tools and applications. Int. J. Softw. Tools Technol. Transfer 7(3), 212–232 (2005)CrossRefGoogle Scholar
  7. 7.
    Filliâtre, J.C., Magaud, N.: Certification of sorting algorithms in the system Coq. In: Theorem Proving in Higher Order Logics: Emerging Trends. Nice, France (1999).
  8. 8.
    Foley, M., Hoare, C.A.R.: Proof of a recursive program: Quicksort. Comput. J. 14(4), 391–395 (1971)MathSciNetCrossRefMATHGoogle Scholar
  9. 9.
    Mostowski, W.: Formalisation and verification of Java Card security properties in Dynamic Logic. In: M. Cerioli (ed.) Proceedings Fundamental Approaches to Software Engineering (FASE), Edinburgh, Lecture Notes in Computer Science, vol. 3442, pp. 357–371. Springer (2005).
  10. 10.
    Mostowski, W.: Fully verified Java Card API reference implementation. In: VERIFY (2007)Google Scholar
  11. 11.
    Sternagel, C.: Proof Pearl - A mechanized proof of GHC’s mergesort. J. Autom. Reasoning 51(4), 357–370 (2013)MathSciNetCrossRefGoogle Scholar

Copyright information

© Springer Science+Business Media Dordrecht 2014

Authors and Affiliations

  • Stijn de Gouw
    • 1
    • 2
  • Frank de Boer
    • 1
    • 2
  • Jurriaan Rot
    • 1
    • 2
  1. 1.LIACS – Leiden UniversityLeidenNetherlands
  2. 2.CWIAmsterdamNetherlands

Personalised recommendations