[Haskell-cafe] quickcheck for compiler testing

Maurizio Vitale mrz.vtl at gmail.com
Mon Feb 16 16:53:25 UTC 2015


I'm starting to work on my first real haskell program (I've only RWH
exercises under my belt) and wondering whether people use quickcheck at all
for compiler testing.

I've seen uses of quickcheck for testing parsers, but I'm interested in
generating well-formed programs (e.g. random programs with all declarations
in reasonable random places). This could be used to test passes other than
parsing (or even parsing, for languages that needs to distinguish
identifiers, like the 'typedef' problem in C/C++).

The only thing I can think of, is to use quickcheck for randomly generating
statements, go over them and figure out free variables (incl. functions)
and generate declarations in random places for them. But I'm not sure how
this would play with test size reduction and doesn't look like a nice
solution anyhow.

Any idea or pointers to examples? or should I give up on quickcheck for
this and just do direct testing?

Thanks,

  Maurizio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20150216/43949d8f/attachment.html>


More information about the Haskell-Cafe mailing list