Testing an optimising compiler by generating random lambda terms
Michal H. Palka,Koen Claessen,Alejandro Russo,John Hughes +3 more
- 23 May 2011
- pp 91-97
TL;DR: This paper considers random testing of a compiler, using randomly generated programs as inputs, and comparing their behaviour with and without optimisation, and finds a workable solution to this problem.
read more
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.
read more
Chat with Paper
AI Agents for this Paper
Find similar papers on Google Scholar, PubMed and Arxiv
Write a critical review of this paper
Analyze citations of this paper to find unaddressed research gaps
Citations
A Survey of Compiler Testing
TL;DR: This research presents a meta-compiler that automates the very labor-intensive and therefore time-heavy and therefore expensive and expensive process of manually compiling software.
182
An empirical comparison of compiler testing techniques
Junjie Chen,Wenxiang Hu,Dan Hao,Yingfei Xiong,Hongyu Zhang,Lu Zhang,Bing Xie +6 more
- 14 May 2016
TL;DR: A systematic and comprehensive empirical comparison of three compiler testing techniques, namely, Randomized Differential Testing (RDT), a variant of RDT—Different Optimization Levels (DOL), and Equivalence Modulo Inputs (EMI), indicates that DOL is more effective at detecting bugs related to optimization, whereas RDT is moreeffective at detecting other types of bugs.
111
Skeletal program enumeration for rigorous compiler testing
Qirun Zhang,Chengnian Sun,Zhendong Su +2 more
- 14 Jun 2017
TL;DR: Skeleton program enumeration (SPE) as mentioned in this paper enumerates a set of programs exhibiting all possible variable usage patterns within a given syntactic structure P (syntactic skeleton) parameterized by a collection of identifiers V (variable names).
Learning to prioritize test programs for compiler testing
Junjie Chen,Yanwei Bai,Dan Hao,Yingfei Xiong,Hongyu Zhang,Bing Xie +5 more
- 20 May 2017
TL;DR: The idea of learning to test is proposed, which learns the characteristics of bug-revealing test programs from previous test programs that triggered bugs, an approach to prioritizing test programs for compiler testing acceleration.
92
•Journal Article
Quickcheck testing for fun and profit
TL;DR: One of the nice things about purely functional languages is that functions often satisfy simple properties, and enjoy simple algebraic relationships as discussed by the authors, and if the functions of an API satisfy elegant laws, that in itself is a sign of a good design.
75
References
•Book
Types and Programming Languages
Benjamin C. Pierce
- 01 Jan 2002
TL;DR: This text provides a comprehensive introduction both to type systems in computer science and to the basic theory of programming languages, with a variety of approaches to modeling the features of object-oriented languages.
2.7K
•Book
Haskell 98 language and libraries : the revised report
Peyton Jones,L Simon +1 more
- 01 Jan 2003
TL;DR: The Haskell 98 Language: Lexical structure, Declarations and bindings, Predefined types and classes, and Libraries.
1.4K
Formal verification of a realistic compiler
TL;DR: This paper reports on the development and formal verification of CompCert, a compiler from Clight (a large subset of the C programming language) to PowerPC assembly code, using the Coq proof assistant both for programming the compiler and for proving its correctness.
Principal type-schemes for functional programs
Luis Damas,Robin Milner +1 more
- 25 Jan 1982
TL;DR: Permission to copy without fee all or part of this material is granted provided that the copies are not made or distributed for direct commercial advantage.
Simplifying and isolating failure-inducing input
Andreas Zeller,R. Hildebrandt +1 more
TL;DR: The delta debugging algorithm generalizes and simplifies the failing test case to a minimal test case that still produces the failure, and isolates the difference between a passing and a failingTest case.
Related Papers (5)
Koen Claessen,John Hughes +1 more
- 01 Sep 2000
Xuejun Yang,Yang Chen,Eric Eide,John Regehr +3 more
- 04 Jun 2011
Vu Le,Mehrdad Afshari,Zhendong Su +2 more
- 09 Jun 2014