ABSTRACT
Program errors are hard to detect and are costly both to programmers who spend significant efforts in debugging, and for systems that are guarded by runtime checks. Static verification techniques have been applied to imperative and object-oriented languages, like Java and C#, but few have been applied to a higher-order lazy functional language, like Haskell. In this paper, we describe a sound and automatic static verification framework for Haskell, that is based on contracts and symbolic execution. Our approach is modular and gives precise blame assignments at compile-time in the presence of higher-order functions and laziness.
- Lennart Augustsson. Cayenne -- language with dependent types. In Proceedings of the third ACM SIGPLAN international conference on Functional programming, pages 239--250, New York, NY, USA, 1998. ACM. Google ScholarDigital Library
- Mike Barnett, K. Rustan M. Leino, and Wolfram Schulte. The Spec# programming system: An overview. CASSIS, LNCS 3362, 2004.Google Scholar
- Matthias Blume and David McAllester. Sound and complete models of contracts. J. Funct. Program., 16(4-5):375--414, 2006. Google ScholarDigital Library
- L. Burdy, Y. Cheon, D. Cok, M. Ernst, J. Kiniry, G. Leavens, K. Leino, and E. Poll. An overview of JML tools and applications, 2003.Google Scholar
- Koen Claessen and John Hughes. Specification-based testing with QuickCheck. In Fun of Programming, Cornerstones of Computing, pages 17--40. Palgrave, March 2003.Google Scholar
- Sa Cui, Kevin Donnelly, and Hongwei Xi. ATS: A language that combines programming with theorem proving. In Bernhard Gramlich, editor, FroCos, volume 3717 of Lecture Notes in Computer Science, pages 310--320. Springer, 2005. Google ScholarDigital Library
- Rowan Davies. Refinement-type checker for standard ML. In AMAST '97: Proceedings of the 6th International Conference on Algebraic Methodology and Software Technology, pages 565--566, London, UK, 1997. Springer-Verlag. Google ScholarDigital Library
- Peter Dybjer, Qiao Haiyan, and Makoto Takeyama. Verifying Haskell programs by combining testing and proving. In Proceedings of Third International Conference on Quality Software, pages 272--279. IEEE Press, 2003. Google ScholarDigital Library
- R. B. Findler, M. Blume, and M. Felleisen. An investigation of contracts as projections. Technical report, University of Chicago Computer Science Department, 2006. Technical Report TR-2004-02.Google Scholar
- Robert Bruce Findler and Matthias Blume. Contracts as pairs of projections. In Functional and Logic Programming, pages 226--241. Springer Berlin / Heidelberg, 2006. Google ScholarDigital Library
- Robert Bruce Findler and Matthias Felleisen. Contracts for higher-order functions. In Proceedings of the seventh ACM SIGPLAN international conference on Functional programming, pages 48--59, New York, NY, USA, 2002. ACM. Google ScholarDigital Library
- Cormac Flanagan. Hybrid type checking. In Morrisett and Peyton Jones \citeDBLP:conf/popl/2006, pages 245--256. Google ScholarDigital Library
- Cormac Flanagan, K. Rustan M. Leino, Mark Lillibridge, Greg Nelson, James B. Saxe, and Raymie Stata. Extended static checking for Java. In PLDI '02: Proceedings of the ACM SIGPLAN 2002 Conference on Programming language design and implementation, pages 234--245, New York, NY, USA, 2002. ACM. Google ScholarDigital Library
- Cormac Flanagan and James B. Saxe. Avoiding exponential explosion: generating compact verification conditions. In POPL '01: Proceedings of the 28th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 193--205, New York, NY, USA, 2001. ACM. Google ScholarDigital Library
- Tim Freeman and Frank Pfenning. Refinement types for ML. In PLDI '91: Proceedings of the ACM SIGPLAN 1991 conference on Programming language design and implementation, pages 268--277, New York, NY, USA, 1991. ACM. Google ScholarDigital Library
- Jessica Gronski and Cormac Flanagan. Unifying hybrid types and contracts. In Eighth Symposium on Trends in Functional Programming, April 2007.Google Scholar
- Thomas Hallgren. Haskell tools from the Programatica project. In Haskell '03: Proceedings of the 2003 ACM SIGPLAN workshop on Haskell, pages 103--106, New York, NY, USA, 2003. ACM. Google ScholarDigital Library
- Ralf Hinze, Johan Jeuring, and Andres Löh. Typed contracts for functional programming. In Functional and Logic Programming: 8th International Symposium, pages 208--225, 2006. Google ScholarDigital Library
- Kohei Honda and Nobuko Yoshida. A compositional logic for polymorphic higher-order functions. In PPDP '04: Proceedings of the 6th ACM SIGPLAN international conference on Principles and practice of declarative programming, pages 191--202, New York, NY, USA, 2004. ACM. Google ScholarDigital Library
- Kenneth Knowles and Cormac Flanagan. Type reconstruction for general refinement types. In ESOP '07: Programming Languages and Systems, 16th European Symposium on Programming. Springer-Verlag, April 2007. Google ScholarDigital Library
- Kenneth Knowles, Aaron Tomb, Jessica Gronski, Stephen N. Freund, and Cormac Flanagan. SAGE: Unified hybrid checking for first--class types, general refinement types, and dynamic (extended report). Technical report, UC Santa Cruz, 2006. http://sage.soe.ucsc.edu/sage-tr.pdf.Google Scholar
- K. Rustan M. Leino and Greg Nelson. An extended static checker for Modula-3. In CC '98: Proceedings of the 7th International Conference on Compiler Construction, pages 302--305, London, UK, 1998. Springer-Verlag. Google ScholarDigital Library
- Philippe Meunier, Robert Bruce Findler, and Matthias Felleisen. Modular set-based analysis from contracts. In Morrisett and Peyton Jones {27}, pages 218--231. Google ScholarDigital Library
- Bertrand Meyer. Eiffel: The Language. Prentice Hall International, London, 1992. Google ScholarDigital Library
- Neil Mitchell. Transformation and Analysis of Functional Programs. PhD thesis, University of York, 2008.Google Scholar
- Neil Mitchell and Colin Runciman. Not all patterns, but enough: an automatic verifier for partial but sufficient pattern matching. In Haskell '08: Proceedings of the first ACM SIGPLAN symposium on Haskell, pages 49--60, New York, NY, USA, 2008. ACM. Google ScholarDigital Library
- J. Gregory Morrisett and Simon L. Peyton Jones, editors. POPL '06: Proceedings of the 33rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, Charleston, South Carolina, USA, January 11-13, 2006. ACM, 2006. Google ScholarCross Ref
- Aleksandar Nanevski, Amal Ahmed, Greg Morrisett, and Lars Birkedal. Abstract predicates and mutable ADTs in Hoare Type Theory. In Rocco De Nicola, editor, ESOP, volume 4421 of Lecture Notes in Computer Science, pages 189--204. Springer, 2007. Google ScholarDigital Library
- Aleksandar Nanevski, Greg Morrisett, and Lars Birkedal. Polymorphism and separation in hoare type theory. In Proceedings of the 11th ACM SIGPLAN International Conference on Functional Programming, Portland, Oregon, USA, Sept., pages 62--73, 2006. Google ScholarDigital Library
- D. L. Parnas. A technique for software module specification with examples. Communications of the ACM, 15(5):330--336, May 1972. Google ScholarDigital Library
- Yann Régis-Gianas and François Pottier. A Hoare logic for call-by-value functional programs. In P Audebaud and C Paulin-Mohring, editors, MPC, volume 5133 of Lecture Notes in Computer Science, pages 305--335. Springer, 2008. Google ScholarDigital Library
- Tim Sheard. Languages of the future. In OOPSLA '04: Companion to the 19th annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications, pages 116--119, New York, NY, USA, 2004. ACM. Google ScholarDigital Library
- The GHC Team. The Glasgow Haskell Compiler user's guide. www.haskell.org/ghc/documentation.html, 1998.Google Scholar
- J Visser, J. N. Oliveira, Barbosa L. S., J. F. Ferreira, and A. Mendes. CAMILA revival: VDM meets Haskell. In Nico Plat and Peter Gorm Larsen, editors, Overture Workshop (co-located with FM'05), 2005.Google Scholar
- Philip Wadler and Robert Bruce Findler. Well-typed programs can't be blamed. In Workshop on Scheme and Functional Programming, Sept 2007.Google Scholar
- Edwin M. Westbrook, Aaron Stump, and Ian Wehrman. A language--based approach to functionally correct imperative programming. In Proceedings of the 10th ACM SIGPLAN International Conference on Functional Programming, Tallinn, Estonia, pages 268--279, Sept. 2005. Google ScholarDigital Library
- Hongwei Xi and Frank Pfenning. Dependent types in practical programming. In POPL '99: Proceedings of the 26th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pages 214--227, New York, NY, USA, 1999. ACM. Google ScholarDigital Library
- Dana N. Xu. Extended static checking for Haskell. In Haskell '06: Proceedings of the 2006 ACM SIGPLAN workshop on Haskell, pages 48--59, New York, NY, USA, 2006. ACM. Google ScholarDigital Library
- Na Xu. Static Contract Checking for Haskell. PhD thesis, University of Cambridge, 2008. http://www.cl.cam.ac.uk/techreports/.Google Scholar
Index Terms
- Static contract checking for Haskell
Recommendations
HALO: haskell to logic through denotational semantics
POPL '13: Proceedings of the 40th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languagesEven well-typed programs can go wrong in modern functional languages, by encountering a pattern-match failure, or simply returning the wrong answer. An increasingly-popular response is to allow programmers to write contracts that express semantic ...
Static contract checking for Haskell
POPL '09Program errors are hard to detect and are costly both to programmers who spend significant efforts in debugging, and for systems that are guarded by runtime checks. Static verification techniques have been applied to imperative and object-oriented ...
Extended static checking for haskell
Haskell '06: Proceedings of the 2006 ACM SIGPLAN workshop on HaskellProgram errors are hard to detect and are costly both to programmers who spend significant efforts in debugging, and to systems that are guarded by runtime checks. Extended static checking can reduce these costs by helping to detect bugs at compile-time,...
Comments