Skip to main content
Log in

Abstract

We give an account on the authors’ experience and results from the software verification competition held at the Formal Methods 2012 conference. Competitions like this are meant to provide a benchmark for verification systems. It consisted of three algorithms which the authors have implemented in Java, specified with the Java Modeling Language, and verified using the KeY system. Building on our solutions, we argue that verification systems which target implementations in real-world programming languages better have powerful abstraction capabilities. Regarding the KeY tool, we explain features which, driven by the competition, have been freshly implemented to accommodate for these demands.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Institutional subscriptions

Fig. 1
Fig. 2
Fig. 3

Notes

  1. For an empirical analysis of user experience with KeY, see [2].

  2. In this case, we also need to prove that no runtime exceptions, such as NullPointer Exception or IndexOutOfBounds Exception, are raised.

  3. For all proofs, KeY was running on standard desktop computers in single-processor mode.

  4. This is in fact essential to this algorithm being parallelisable.

  5. Currently, we only support single return statements for the body, i.e., definitions can be only given with direct formulae, rather than proper Java programs that involve, e.g., loops or similar constructs.

  6. This would not have been the case if we had used a ghost field to track the exact size of the tree by precisely adding sub-tree sizes.

References

  1. Barnett, M., Leino, K.R.M., Schulte, W.: The Spec# programming system: an overview. In: Construction and Analysis of Safe, Secure, and Interoperable Smart Devices (CASSIS), International Workshop, 2004, Revised Selected Papers. LNCS, vol. 3362, pp. 49–69. Springer (2005)

  2. Beckert, B., Grebing, S.: Evaluating the usability of interactive verification systems. In: Klebanov, V., Beckert, B., Biere, A., Sutcliffe, G. (eds.) 1st International Workshop on Comparative Empirical Evaluation of Reasoning Systems (COMPARE) 2012, CEUR Workshop Proceedings, vol. 873 (2012)

  3. Beckert, B., Hähnle, R., Schmitt, P.H. (eds.): Verification of Object-Oriented Software: The KeY Approach. LNCS, vol. 4334. Springer (2007)

  4. Blelloch, G.E.: Prefix sums and their applications. Tech. Rep. CMU-CS-90-190, School of Computer Science, Carnegie Mellon University (1990)

  5. Bormer, T., Brockschmidt, M., Distefano, D., Ernst, G., Filliâtre, J.C., Grigore, R., Huisman, M., Klebanov, V., Marché, C., Monahan, R., Mostowski, W., Polikarpova, N., Scheben, C., Schellhorn, G., Tofan, B., Tschannen, J., Ulbrich, M.: The COST IC0701 verification competition 2011. In: Beckert, B., Damiani, F., Gurov, D. (eds.) Revised Selected Papers, International Conference on Formal Verification of Object-Oriented Software (FoVeOOS 2011). LNCS, vol. 7421, pp. 3–21. Springer (2012)

  6. Burdy, L., Cheon, Y., Cok, D., Ernst, M., Kiniry, J., Leavens, G.T., Leino, K.R.M., Poll, E.: An overview of JML tools and applications. In: Arts, T., Fokkink, W. (eds.) Proceedings of the Eighth International Workshop on Formal Methods for Industrial Critical Systems (FMICS 03). ENTCS, vol. 80, pp. 73–89. Elsevier (2003)

  7. Cheon, Y., Leavens, G.T., Sitaraman, M., Edwards, S.: Model variables: cleanly supporting abstraction in design by contract. Softw. Pract. Exp. 35(6), 583–599 (2005)

    Article  Google Scholar 

  8. De Moura, L., Bjørner, N.: Satisfiability modulo theories: introduction and applications. Commun. ACM 54(9), 69–77 (2011)

    Article  Google Scholar 

  9. Filliâtre, J.C., Marché, C.: The Why/Krakatoa/Caduceus platform for deductive program verification. In: Damm, W., Hermanns, H. (eds.) 19th International Conference on Computer Aided Verification. LNCS, vol. 4590. Springer (2007)

  10. Filliâtre, J.C., Paskevich, A., Stump, A.: The 2nd verified software competition: experience report. In: Beckert, B., Biere, A., Klebanov, V., Sutcliffe, G. (eds.) 1st International Workshop on Comparative Empirical Evaluation of Reasoning Systems (COMPARE) 2012, CEUR Workshop Proceedings, vol. 873 (2012)

  11. Harel, D.: Dynamic logic. In: Gabbay, D., Guenther, F. (eds.) Handbook of Philosophical Logic, Volume II: Extensions of Classical Logic, pp. 497–604. D. Reidel Publishing Co., Dordrecht (1984)

    Chapter  Google Scholar 

  12. Jacobs, B., Smans, J., Philippaerts, P., Vogels, F., Penninckx, W., Piessens, F.: VeriFast: a powerful, sound, predictable, fast verifier for C and Java. In: Bobaru, M.G., Havelund, K., Holzmann, G.J., Joshi, R. (eds.) NASA Formal Methods—Third International Symposium, 2011. LNCS, vol. 6617, pp. 41–55. Springer (2011)

  13. Kassios, I.T.: The dynamic frames theory. Form. Asp. Comput. 23(3), 267–288 (2011)

    Article  MATH  MathSciNet  Google Scholar 

  14. Kassios, I.T., Müller, P., Schwerhoff, M.: Comparing verification condition generation with symbolic execution: an experience report. In: Joshi, R., Müller, P., Podelski, A. (eds.) Verified Software Theories Tools Experiments (VSTTE) 2012. LNCS, vol. 7152, pp. 196–208. Springer (2012)

  15. Klebanov, V., Müller, P., Shankar, N., Leavens, G.T., Wüstholz, V., Alkassar, E., Arthan, R., Bronish, D., Chapman, R., Cohen, E., Hillebrand, M., Jacobs, B., Leino, K.R.M., Monahan, R., Piessens, F., Polikarpova, N., Ridge, T., Smans, J., Tobies, S., Tuerk, T., Ulbrich, M., Weiß, B.: The 1st verified software competition: experience report. In: Butler, M., Schulte, W. (eds.) Proceedings, 17th International Symposium on Formal Methods (FM) 2011. LNCS, vol. 6664, pp. 154–168. Springer (2011)

  16. Leavens, G.T., Baker, A.L., Ruby, C.: Preliminary design of JML: a behavioral interface specification language for Java. SIGSOFT 31(3), 1–38 (2006)

    Article  Google Scholar 

  17. Mostowski, W.: Formal reasoning about non-atomic Java Card methods in dynamic logic. In: Misra, J., Nipkow, T., Sekerinski, E. (eds.) Proceedings, Formal Methods (FM) 2006. LNCS, vol. 4085, pp. 444–459. Springer (2006)

  18. Mostowski, W.: Fully verified Java Card API reference implementation. In: Beckert, B. (ed.) 4th International Verification Workshop, CEUR WS, vol. 259 (2007)

  19. The on-line encyclopedia of integer sequences. http://oeis.org/A006519/. Retrieved 30/07/2013

  20. Parkinson, M., Bierman, G.: Separation logic and abstraction. SIGPLAN Notes 40(1), 247–258 (2005)

    Google Scholar 

  21. Scheben, C., Schmitt, P.H.: Verification of information flow properties of Java programs without approximations. In: Formal Verification of Object-Oriented Software. LNCS, vol. 7421, pp. 232–249. Springer (2012)

  22. Schmitt, P.H., Tonin, I.: Verifying the Mondex case study. In: Hinchey, M., Margaria, T. (eds.) Proceedings of the 5th IEEE International Conference on Software Engineeging and Formal Methods (SEFM), pp. 47–56. IEEE Press (2007)

  23. Schulte, W., Songtao, X., Smans, J., Piessens, F.: A glimpse of a verifying C compiler. In: C/C++ Verification Workshop (2007). https://lirias.kuleuven.be/handle/123456789/146853

  24. Sedgewick, R., Wayne, K.: Algorithms, 4th edn. Addison-Wesley, Reading (2011)

  25. Stenzel, K.: A formally verified calculus for full Java Card. In: Rattray, C., Maharaj, S., Shankland, C. (eds.) Algebraic Methodology and Software Technology, 10th International Conference, AMAST 2004. LNCS, vol. 3116, pp. 491–505. Springer (2004)

  26. Weiß, B.: Deductive verification of object-oriented software: dynamic frames, dynamic logic and predicate abstraction. Ph.D. thesis, Karlsruhe Institute of Technology (2011)

Download references

Acknowledgments

The work of Daniel Bruns is supported by the German National Science Foundation (DFG) under project “Program-level Specification and Deductive Verification of Security Properties” within priority programme 1496 “Reliably Secure Software Systems—RS3”. Wojciech Mostowski is supported by European Research Council (ERC) grant 258405 for the VerCors project.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Wojciech Mostowski.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Bruns, D., Mostowski, W. & Ulbrich, M. Implementation-level verification of algorithms with KeY. Int J Softw Tools Technol Transfer 17, 729–744 (2015). https://doi.org/10.1007/s10009-013-0293-y

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10009-013-0293-y

Keywords

Navigation