Program Proofs

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

This comprehensive and highly readable textbook teaches how to formally reason about computer programs using an incremental approach and the verification-aware programming language Dafny. Program Proofs shows students what it means to write specifications for programs, what it means for programs to satisfy those specifications, and how to write proofs that connect specifications and programs. Writing with clarity and humor, K. Rustan M. Leino first provides an overview of the basic theory behind reasoning about programs. He then gradually builds up to complex concepts and applications, until students are facing real programs using objects, data structures, and non-trivial recursion. To emphasize the practical nature of program proofs, all material and examples use the verification-aware programming language Dafny, but no previous knowledge of Dafny is assumed. • Written in a highly readable and student-friendly style • Builds up to complex concepts in an incremental manner • Comprehensively covers how to write proofs and how to specify and verify both functional programs and imperative programs • Uses real program text from a real programming language, not psuedo code • Features engaging illustrations and hands-on learning exercises

Author(s): K. Rustan M. Leino
Edition: 1
Publisher: The MIT Press
Year: 2023

Language: English
Pages: 496
City: Cambridge, MA
Tags: Software Engineering; Software Reliability; Functional Programming; Recursion; Software Specifications; Program Verification; Proofs; Software Quality; Programming Languages; Software Verification; Software Validation; Dafny; Inductive Data Types; Proof-Driven Development

Cover
Contents
Preface
Notes for Teachers
Chapter 0. Introduction
Part 0. Learning the Ropes

Chapter 1. Basics
Chapter 2. Making It Formal
Chapter 3. Recursion and Termination
Chapter 4. Inductive Datatypes
Chapter 5. Lemmas and Proofs

Part 1. Functional Programs

Chapter 6. Lists
Chapter 7. Unary Numbers
Chapter 8. Sorting
Chapter 9. Abstraction
Chapter 10. Data-Structure Invariants

Part 2. Imperative Programs

Chapter 11. Loops
Chapter 12. Recursive Specifications, Iterative Programs
Chapter 13. Arrays and Searching
Chapter 14. Modifying Arrays
Chapter 15. In-situ Sorting
Chapter 16. Objects
Chapter 17. Dynamic Heap Data Structures

Reference Material

Appendix A. Dafny Syntax Cheat Sheet
Appendix B. Boolean Algebra
Appendix C. Answers to Select Exercises

References
Index