|
ABSTRACT
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.
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
|
S. Antoy and R. Hamlet. Automatically checking an implementation against its formal specification. In Irvine Software Symposium, pages 29-48, March 1992.
|
| |
2
|
|
| |
3
|
F. Warren Burton. An efficient functional implementation of FIFO queues. Information Processing Letters, 14(5):205-206, July 1982.
|
 |
4
|
|
| |
5
|
|
| |
6
|
J. Duran and S. Ntafos. An evaluation of random testing. Transactions on Software Engineering, 10(4):438-444, July 1984.
|
| |
7
|
Stephen H. Edwards. A framework for practical, automated black-box testing of component-base software. Software Testing, Verification and Reliability, 11(2), June 2001.
|
 |
8
|
John Gannon , Paul McMullin , Richard Hamlet, Data Abstraction, Implementation, Specification, and Testing, ACM Transactions on Programming Languages and Systems (TOPLAS), v.3 n.3, p.211-223, July 1981
[doi> 10.1145/357139.357140]
|
| |
9
|
D. Hamlet. Random testing. In J. Marciniak, editor, Encyclopedia of Software Engineering, pages 970-978. Wiley, 1994.
|
| |
10
|
|
| |
11
|
|
| |
12
|
Dean Herington. HUnit 1.0 User's Guide, 2002. http://hunit.sourceforge.net/HUnit-1.0/Guide.html.
|
| |
13
|
|
| |
14
|
Simon Peyton Jones. Tackling the awkward squad: monadic input/output, concurrency, exceptions, and foreign-language calls in Haskell. In Tony Hoare, Manfred Broy, and Ralf Steinbruggen, editors, Engineering theories of software construction, pages 47-96. IOS Press, 2001. Presented at the 2000 Marktoberdorf Summer School.
|
| |
15
|
|
 |
16
|
Sheng Liang , Paul Hudak , Mark Jones, Monad transformers and modular interpreters, Proceedings of the 22nd ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.333-343, January 23-25, 1995, San Francisco, California, United States
[doi> 10.1145/199448.199528]
|
| |
17
|
Tom Moertel. Seven Lessons from the ICFP Programming Contest. http://www.kuro5hin.org/story/2001/7/31/0102/11014, 2001.
|
| |
18
|
|
 |
19
|
Nigel Tracey , John Penix , Willem C. Visser, The First International Workshop on Automated Program Analysis, Testing and Verification (workshop session), Proceedings of the 22nd international conference on Software engineering, p.796, June 04-11, 2000, Limerick, Ireland
[doi> 10.1145/337180.337819]
|
 |
20
|
|
| |
21
|
Chris Okasaki. An Overview of Edison. In Haskell Workshop, pages 34-54, September 2000.
|
 |
22
|
|
| |
23
|
Andrew M. Pitts. Evaluation logic. In G. Birtwistle, editor, Proceedings of the IVth Higher Order Workshop, pages 162-189. Springer-Verlag, 1990.
|
| |
24
|
|
| |
25
|
Malcolm Wallace, Olaf Chitil, Thorsten Brehm, and Colin Runciman. Multiple-View Tracing for Haskell: a New Hat. In Haskell Workshop. ACM, September 2001.
|
CITED BY 4
|
|
|
|
|
|
|
|
Cyrille Artho , Howard Barringer , Allen Goldberg , Klaus Havelund , Sarfraz Khurshid , Mike Lowry , Corina Pasareanu , Grigore Rosu , Koushik Sen , Willem Visser , Rich Washington, Combining test case generation and runtime verification, Theoretical Computer Science, v.336 n.2-3, p.209-234, 26 May 2005
|
|
|
|
|