Verifying haskell programs using constructive type theory
Verifying haskell programs using constructive type theory
复制标题
使用构造类型理论验证 haskell 程序
DOI:
10.1145/1088348.1088355
复制
发表时间:
2005
期刊:
影响因子:
--
通讯作者:
U. Norell
中科院分区:
文献类型:
--
作者:
Andreas Abel;Marcin Benke;Ana Bove;John Hughes;U. Norell
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.