Publication | Closed Access
Testing an optimising compiler by generating random lambda terms
118
Citations
13
References
2011
Year
Unknown Venue
Mathematical ProgrammingEngineeringCompiler TechnologyVerificationTest Data GenerationSoftware EngineeringRandom TestingSoftware AnalysisFormal VerificationComputational TestingDependently Typed ProgrammingCompilersDynamic CompilationCompiler SupportComputer EngineeringRandom GenerationComputer ScienceOptimizing CompilerProgram AnalysisAutomated ReasoningSoftware TestingFormal MethodsParallel ProgrammingGlasgow Haskell CompilerRandom Lambda Terms
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.
| Year | Citations | |
|---|---|---|
Page 1
Page 1