{"title":"Verifying Haskell programs by combining testing and proving","authors":"P. Dybjer, Qiao Haiyan, M. Takeyama","doi":"10.1109/QSIC.2003.1319111","DOIUrl":null,"url":null,"abstract":"We propose a method for improving confidence in the correctness of Haskell programs by combining testing and proving. Testing is used for debugging programs and specification before a costly proof attempt. During a proof development, testing also quickly eliminates wrong conjectures. Proving helps us to decompose a testing task in a way that is guaranteed to be correct. To demonstrate the method, we have extended the Agda/Alfa proof assistant for dependent type theory with a tool for random testing. As an example, we show how the correctness of a BDD-algorithm written in Haskell is verified by testing properties of component functions. We also discuss faithful translations from Haskell to type theory.","PeriodicalId":145980,"journal":{"name":"Third International Conference on Quality Software, 2003. Proceedings.","volume":null,"pages":null},"PeriodicalIF":0.0000,"publicationDate":"2003-11-06","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"16","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Third International Conference on Quality Software, 2003. Proceedings.","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/QSIC.2003.1319111","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 16
Abstract
We propose a method for improving confidence in the correctness of Haskell programs by combining testing and proving. Testing is used for debugging programs and specification before a costly proof attempt. During a proof development, testing also quickly eliminates wrong conjectures. Proving helps us to decompose a testing task in a way that is guaranteed to be correct. To demonstrate the method, we have extended the Agda/Alfa proof assistant for dependent type theory with a tool for random testing. As an example, we show how the correctness of a BDD-algorithm written in Haskell is verified by testing properties of component functions. We also discuss faithful translations from Haskell to type theory.