|
ABSTRACT
Proof assistants based on dependent type theory are closely related to functional programming languages, and so it is tempting to use them to prove the correctness of functional programs. In this paper, we show how Agda, such a proof assistant, can be used to prove theorems about Haskell programs. Haskell programs are translated into an Agda model of their semantics, by translating via GHC's Core language into a monadic form specially adapted to represent Haskell's polymorphism in Agda's predicative type system. The translation can support reasoning about either total values only, or total and partial values, by instantiating the monad appropriately. We claim that, although these Agda models are generated by a relatively complex translation process, proofs about them are simple and natural, and we offer a number of examples to support this claim.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
| |
1
|
G. Barthe, J. Hatcliff, and P. Thiemann. Monadic type systems: Pure type systems for impure settings. In A. Gordon, A. Pitts, and C. Talcott, editors, HOOTS II, Second Workshop on Higher-Order Operational Techniques in Semantics, volume 10 of Electronic Notes in Theoretical Computer Science, pages 54--120, 1997.
|
| |
2
|
|
| |
3
|
V. Capretta. General recursion via coinductive types. Logical Methods in Computer Science, 2005. To appear.
|
| |
4
|
K. Claessen and J. Hughes. Quickcheck: A lightweight tool for random testing of haskell programs, 2000.
|
| |
5
|
C. Coquand and T. Coquand. Structured type theory. In Proc. Workshop on Logical Frameworks and Meta-languages, 1999.
|
| |
6
|
|
| |
7
|
|
| |
8
|
|
| |
9
|
T. Hallgren, J. Hook, M. P. Jones, and R. B. Kieburtz. An overview of the programatica toolset. Presented at the High Confidence Software and Systems Conference, HCSS04, 2004.
|
| |
10
|
|
| |
11
|
W. A. Howard. The formulae-as-types notion of construction. In J. P. Seldin and J. R. Hindley, editors, To H.B. Curry: Essays on Combinatory Logic, Lambda Calculus and Formalism, pages 479--490. Academic Press, London, 1980.
|
| |
12
|
|
| |
13
|
|
| |
14
|
|
| |
15
|
J. Longley and R. Pollack. Reasoning about cbv functional programs in isabelle/hol. In K. Slind, A. Bunker, and G. Gopalakrishnan, editors, Theorem Proving in Higher Order Logics, 17th International Conference, TPHOLs 2004, Park City, Utah, USA, September 14-17, 2004, Proceedings, volume 3223 of Lecture Notes in Computer Science, pages 201--216. Springer, 2004.
|
| |
16
|
P. Martin-Löf. Intuitionistic Type Theory. Bibliopolis, Napoli, 1984.
|
| |
17
|
|
| |
18
|
T. Uustalu. Monad translating inductive and coinductive types. In H. Geuvers and F. Wiedijk, editors, Types for Proofs and Programs, Second International Workshop, TYPES 2002, Berg en Dal, The Netherlands, April 24-28, 2002, Selected Papers, volume 2646 of Lecture Notes in Computer Science, pages 299--315. Springer, 2003.
|
 |
19
|
|
CITED BY 3
|
Philip Derrin , Kevin Elphinstone , Gerwin Klein , David Cock , Manuel M. T. Chakravarty, Running the manual: an approach to high-assurance microkernel development, Proceedings of the 2006 ACM SIGPLAN workshop on Haskell, September 17-17, 2006, Portland, Oregon, USA
|
|
|
|
|
|
|