Abstract
Reasoning about programs is a fundamental skill that every software engineer needs. This tutorial provides participants an opportunity to get hands-on experience with Dafny, a tool that can help develop this skill.
Dafny is a programming language and state-of-the-art program verifier. The language is type-safe and sequential, and it includes common imperative features, dynamic object allocation, and inductive datatypes. It also includes specification constructs like pre- and postconditions, which let a programmer record the intended behavior of the program along with the executable code that is supposed to cause that behavior. Because the Dafny verifier runs continuously in the background, the consistency of a program and its specifications is always enforced.
In this tutorial, I give a taste of how to use Dafny in program development. This includes an overview of Dafny, basics of writing specifications, how to debug verification attempts, and how to formulate and prove lemmas. Dafny has been used to verify a number of challenging algorithms, including Schorr-Waite graph marking, Floyd's ``tortoise and hare'' cycle-detection algorithm, and snapshotable trees with iterators. Dafny is also being used in teaching, with over 100,000 program-verification attempts submitted to the online version of the tool. Dafny was a popular choice in the VSTTE 2012 program verification competition, where two of the Dafny teams were among the competition's 6 medalists. Its open-source implementation has also been used as a foundation for other verification tools. More information is found from the Dafny project page, http://research.microsoft.com/dafny and in the references below. Binary downloads and sources are available from http://dafny.codeplex.com. The tool can also be run on the web at http://rise4fun.com/dafny, where there is an online version of the tutorial.
- L. Herbert, K. R. M. Leino, and J. Quaresma. Using Dafny, an automatic program verifier. In B. Meyer and M. Nordio, editors, LASER 2012, volume 7682 of LNCS, pages 156--181. Springer, 2012.Google Scholar
- B. Jacobs, J. Smans, and F. Piessens. VeriFast: Imperative programs as proofs. In VS-Tools workshop at VSTTE 2010, Aug. 2010.Google Scholar
- J. Koenig and K. R. M. Leino. Getting started with Dafny: A guide. In T. Nipkow, O. Grumberg, and B. Hauptmann, editors, Software Safety and Security: Tools for Analysis and Verification, volume 33 of NATO Science for Peace and Security Series D: Information and Communication Security, pages 152--181. IOS Press, 2012. Summer School Marktoberdorf 2011 lecture notes.Google Scholar
- C. Le Goues, K. R. M. Leino, and M. Moskal. The Boogie Verification Debugger (tool paper). In G. Barthe, A. Pardo, and G. Schneider, editors, Software Engineering and Formal Methods - 9th International Conference, SEFM 2011, volume 7041 of LNCS, pages 407--414. Springer, Nov. 2011. Google Scholar
Digital Library
- K. R. M. Leino. Specification and verification of object-oriented software. In M. Broy, W. Sitou, and T. Hoare, editors, Engineering Methods and Tools for Software Safety and Security, volume 22 of NATO Science for Peace and Security Series D: Information and Communication Security, pages 231--266. IOS Press, 2009. Summer School Marktoberdorf 2008 lecture notes.Google Scholar
- K. R. M. Leino. Dafny: An automatic program verifier for functional correctness. In E. M. Clarke and A. Voronkov, editors, LPAR-16, volume 6355 of LNCS, pages 348--370. Springer, Apr. 2010. Google Scholar
Digital Library
- K. R. M. Leino. Automating induction with an SMT solver. In V. Kuncak and A. Rybalchenko, editors, Verification, Model Checking, and Abstract Interpretation - 13th International Conference, VMCAI 2012, volume 7148 of LNCS, pages 315--331. Springer, Jan. 2012. Google Scholar
Digital Library
- K. R. M. Leino and M. Moskal. Usable auto-active verification. In T. Ball, L. Zuck, and N. Shankar, editors, UV10 (Usable Verification) workshop. http://fm.csl.sri.com/UV10/, Nov. 2010.Google Scholar
- B. Meyer. Object-oriented Software Construction. Series in Computer Science. Prentice-Hall International, 1988. Google Scholar
Digital Library
Index Terms
Developing verified programs with Dafny
Recommendations
Developing verified programs with Dafny
HILT '12: Proceedings of the 2012 ACM conference on High integrity language technologyReasoning about programs is a fundamental skill that every software engineer needs. This tutorial provides participants an opportunity to get hands-on experience with Dafny, a tool that can help develop this skill.
Dafny is a programming language and ...
Program proving using intermediate verification languages (IVLs) like boogie and why3
HILT '12A program verifier is a complex piece of software. To deal with this complexity, a standard architecture of a modern program verifier consists of two basic parts: a front end and a back end, separated by an intermediate verification language (IVL). The ...
Program proving using intermediate verification languages (IVLs) like boogie and why3
HILT '12: Proceedings of the 2012 ACM conference on High integrity language technologyA program verifier is a complex piece of software. To deal with this complexity, a standard architecture of a modern program verifier consists of two basic parts: a front end and a back end, separated by an intermediate verification language (IVL). The ...







Comments