Dafny: An Automatic Program Verifier for Functional Correctness

  • K. Rustan M. Leino
Conference paper

DOI: 10.1007/978-3-642-17511-4_20

Part of the Lecture Notes in Computer Science book series (LNCS, volume 6355)
Cite this paper as:
Leino K.R.M. (2010) Dafny: An Automatic Program Verifier for Functional Correctness. In: Clarke E.M., Voronkov A. (eds) Logic for Programming, Artificial Intelligence, and Reasoning. LPAR 2010. Lecture Notes in Computer Science, vol 6355. Springer, Berlin, Heidelberg


Traditionally, the full verification of a program’s functional correctness has been obtained with pen and paper or with interactive proof assistants, whereas only reduced verification tasks, such as extended static checking, have enjoyed the automation offered by satisfiability-modulo-theories (SMT) solvers. More recently, powerful SMT solvers and well-designed program verifiers are starting to break that tradition, thus reducing the effort involved in doing full verification.

This paper gives a tour of the language and verifier Dafny, which has been used to verify the functional correctness of a number of challenging pointer-based programs. The paper describes the features incorporated in Dafny, illustrating their use by small examples and giving a taste of how they are coded for an SMT solver. As a larger case study, the paper shows the full functional specification of the Schorr-Waite algorithm in Dafny.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer-Verlag Berlin Heidelberg 2010

Authors and Affiliations

  • K. Rustan M. Leino
    • 1
  1. 1.Microsoft ResearchRedmondUSA

Personalised recommendations