NobleBlocks

Research indexJournal article

Testing an optimising compiler by generating random lambda terms

Pałka, Claessen, Russo and 1 other

Proceedings of the 6th International Workshop on Automation of Software Test23 May 2011

NobleIDark:/48914/w1/20260515/33C7FF38DOI10.1145/1982595.1982615

Paywalled

The full text is at the publisher

You can read the abstract here, or open it at the publisher.

Read at the publisher

Abstract

This paper considers random testing of a compiler, using randomly generated programs as inputs, and comparing their behaviour with and without optimisation. Since the generated programs must compile, then we need to take into account syntax, scope rules, and type checking during our random generation. Doing so, while attaining a good distribution of test data, proves surprisingly subtle; the main contribution of this paper is a workable solution to this problem. We used it to generate typed functions on lists, which we compiled using the Glasgow Haskell compiler, a mature production quality Haskell compiler. After around 20,000 tests we triggered an optimiser failure, and automatically simplified it to a program with just a few constructs.

Citations

Topics

More

Suggest a correction or report