Testing monadic code with QuickCheck
Paper i proceeding, 2002

QuickCheck is a previously published random testing tool for Haskell programs. In this paper we show how to use it for testing monadic code, and in particular imperative code written using the ST monad. QuickCheck tests a program against a specification: we show that QuickCheck's specification language is sufficiently powerful to represent common forms of specifications: algebraic, model-based (both functional and relational), and pre-/post-conditional. Moreover, all these forms of specification can be used directly for testing. We define a new language of monadic properties, and make a link between program testing and the notion of observational equivalence.

Författare

Koen Lindström Claessen

Chalmers, Institutionen för datavetenskap

John Hughes

Chalmers, Institutionen för datavetenskap

SIGPLAN Notices (ACM Special Interest Group on Programming Languages)

07308566 (ISSN)

Vol. 37 12 47-59

Ämneskategorier

Data- och informationsvetenskap

DOI

10.1145/636517.636527

Mer information

Skapat

2017-10-08