patternMinor
What are common formal techniques for proving functional code correct?
Viewed 0 times
provingwhatareformalcodeforcorrectfunctionalcommontechniques
Problem
I want to provide proofs for parts of a Haskell program I'm writing as part of my thesis. So far however, I failed to find a good reference work.
Graham Hutton's introductory book Programming in Haskell (Google Books)—which I read while learning Haskell—touches on a few techniques for reasoning about programs such as
in chapter 13 but it's not very in-depth.
Are there any books or article you can recommend which provide a more detailed overview of formal proving techniques for Haskell, or other functional, code?
Graham Hutton's introductory book Programming in Haskell (Google Books)—which I read while learning Haskell—touches on a few techniques for reasoning about programs such as
- equational reasoning
- using non-overlapping patterns
- list induction
in chapter 13 but it's not very in-depth.
Are there any books or article you can recommend which provide a more detailed overview of formal proving techniques for Haskell, or other functional, code?
Solution
You can start with
Topics include basic concepts of logic, computer-assisted theorem proving, the Coq proof assistant, functional programming, operational semantics, Hoare logic, and static type systems. The exposition is intended for a broad range of readers, from advanced undergraduates to PhD students and researchers. No specific background in logic or programming languages is assumed, though a degree of mathematical maturity will be helpful.
You can skip (or skim) the programming language theory parts and only learn how to deal with formal proofs starting from Preface up to IndPrinciples. The book is really well-written and illuminating.
Then you might want to proceed with
In this volume you will learn how to specify and verify (prove the correctness of) sorting algorithms, binary search trees, balanced binary search trees, and priority queues. Before using this book, you should have some understanding of these algorithms and data structures, available in any standard undergraduate algorithms textbook.
You should understand all the material in Software Foundations Volume 1 (Logic Foundations)
A note of warning: VFA is still in beta-release!
- Software Foundations by Benjamin C. Pierce et al.
Topics include basic concepts of logic, computer-assisted theorem proving, the Coq proof assistant, functional programming, operational semantics, Hoare logic, and static type systems. The exposition is intended for a broad range of readers, from advanced undergraduates to PhD students and researchers. No specific background in logic or programming languages is assumed, though a degree of mathematical maturity will be helpful.
You can skip (or skim) the programming language theory parts and only learn how to deal with formal proofs starting from Preface up to IndPrinciples. The book is really well-written and illuminating.
Then you might want to proceed with
- Verified Functional Algorithms by Andrew W. Appel
In this volume you will learn how to specify and verify (prove the correctness of) sorting algorithms, binary search trees, balanced binary search trees, and priority queues. Before using this book, you should have some understanding of these algorithms and data structures, available in any standard undergraduate algorithms textbook.
You should understand all the material in Software Foundations Volume 1 (Logic Foundations)
A note of warning: VFA is still in beta-release!
Context
StackExchange Computer Science Q#63363, answer score: 6
Revisions (0)
No revisions yet.