Quick Check
Afp0607
AFP Exercise 4: Testing and Tracing
For the fourth exercise of AFP, you have to use the Quickcheck library as well as the Hat debugging tools.
More precisely, you are asked to answer the questions about merge-sort that are included
in the Quickcheck/Hat paper. These questions can be found in Section 7.1 on pages 37 and 38
(
Exercises 1-7).
In addition to your answers for the seven questions, please give a
short opinion (5-10 sentences) about
the usefulness of Quickcheck and Hat for testing and tracing functional programs. How well did you get on
with the tools? Will you ever consider using it for larger applications?
Resources
- Quickcheck is part of GHC's hierarchical libraries, and the latest version can be found here.
- The sources for building Hat can be found at the project's homepage (check out the system requirements first). You need to install hmake beforehand.
General remark
If someone succeeds in building the
hat-trail and
hat-observe tools on the Windows platform, please put the executables online
(for instance on this Wiki) so that others can benefit from this. (Or inform me, then I will add it.)
Addendum
(June 17th, 2005)

Due to the problems with (compiling and running) the Hat toolbox under Windows, you may continue with this exercise
without using Hat. Building Hat on other platforms should be more straightforward (for instance, on my mac I didn't experience any problem at all). If you succeed in building Hat, please let me know.
Huib added some comments to the
Discussion Forum about errors on the readline package when using
QuickCheck, and these comments may be helpful to others.
Because the deadline was scheduled for today, you will be given a bit more time to complete this exercise.
I propose that all solutions are submitted to me before the next lecture, that is,
Tuesday 21 June.