<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
I use QuichCheck for compiler testing where I generate random, but
well-formed programs and check some high-level syntactic properties
on results. The QuickCheck instance is open-source (see
language-ecmascript), but the compiler-test code is closed-source at
this time. Still, I found that it's not the ultimate answer: many
properties are hard to formalize, so I have to resort to unit tests.
I'm not sure what you mean by "how this would play with test size
reduction". I think it's worth giving a try, but keep in mind that
you might still need to use unit tests.<br>
<br>
Let me know if you have any questions.<br>
<br>
/Andrey<br>
<br>
<div class="moz-cite-prefix">On 02/16/2015 11:53 AM, Maurizio Vitale
wrote:<br>
</div>
<blockquote
cite="mid:CAAeLbQJaetsyOV8F+0ZTcSKgR=o8xd=Rp_eHWFDkVS_de41n0A@mail.gmail.com"
type="cite">
<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>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Haskell-Cafe mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a>
<a class="moz-txt-link-freetext" href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a>
</pre>
</blockquote>
<br>
</body>
</html>