[Haskell-cafe] quickcheck for compiler testing
doug at cs.dartmouth.edu
Wed Feb 18 20:30:17 UTC 2015
>> I'm ... wondering whether people use quickcheck at all for
>> compiler testing.
> it's worth giving a try, but keep in mind that you might still
> need to use unit tests
If your compiler is for a widely used language, you might consider
a hybrid approach due to Bill McKeeman: generate random code
and check it by automated crowd-sourcing. The crowd is a jury
of other compilers, not necessarily even for the same hardware.
The check is to compare compilability, compile time, run time
and run results against those of the jury.
McKeeman used a generative grammar whose productions were
adjustably weighted to influence the characteristics of the
generated code. Over the course of several months of overnight
runs torturing a production C compiler, he turned up something
like one anomaly per day, excluding jury errors and extra
reports from a common root cause. (One amusing find was that
the compiler took Omega(INT_MAX) time to evaluate the constant
More information about the Haskell-Cafe