ACM Home Page
Please provide us with feedback. Feedback
Verifying haskell programs using constructive type theory
Full text PdfPdf (194 KB)
Source Haskell archive
Proceedings of the 2005 ACM SIGPLAN workshop on Haskell table of contents
Tallinn, Estonia
Pages: 62 - 73  
Year of Publication: 2005
ISBN:1-59593-071-X
Authors
Andreas Abel  Chalmers University of Technology
Marcin Benke  Chalmers University of Technology
Ana Bove  Chalmers University of Technology
John Hughes  Chalmers University of Technology
Ulf Norell  Chalmers University of Technology
Sponsors
ACM: Association for Computing Machinery
SIGPLAN: ACM Special Interest Group on Programming Languages
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 17,   Downloads (12 Months): 74,   Citation Count: 4
Additional Information:

abstract   references   cited by   index terms   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/1088348.1088355
What is a DOI?

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


Collaborative Colleagues:
Andreas Abel: colleagues
Marcin Benke: colleagues
Ana Bove: colleagues
John Hughes: colleagues
Ulf Norell: colleagues