Testing an Optimising Compiler by Generating Random Lambda Terms
Paper in proceeding, 2011

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.

Author

Michal Palka

Chalmers, Computer Science and Engineering (Chalmers), Software Technology (Chalmers)

Koen Lindström Claessen

Chalmers, Computer Science and Engineering (Chalmers), Software Technology (Chalmers)

Alejandro Russo

Chalmers, Computer Science and Engineering (Chalmers), Software Technology (Chalmers)

John Hughes

Chalmers, Computer Science and Engineering (Chalmers), Software Technology (Chalmers)

International Workshop on Automation of Software Test

Areas of Advance

Information and Communication Technology

Subject Categories

Software Engineering

Computer Science

More information

Created

10/7/2017