<p dir="ltr">I was wondering the same thing about testing GHC itself. In particular, the test case for Trac #9964 (a subtle code generator crash) seems like it could conceivably be small enough for QuickCheck to have come up with. Although I can see why good properties would be hard to formulate (and some/many/most important ones are impossible to check in general), "does not quickly trigger a GHC panic" should be a very easy one.</p>
<div class="gmail_quote">On Feb 16, 2015 11:53 AM, "Maurizio Vitale" <<a href="mailto:mrz.vtl@gmail.com">mrz.vtl@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">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.<div><br></div><div>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++).</div><div><br></div><div>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.</div><div><br></div><div>Any idea or pointers to examples? or should I give up on quickcheck for this and just do direct testing?</div><div><br></div><div>Thanks,</div><div><br></div><div> Maurizio</div></div>
<br>_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
<br></blockquote></div>