Abstract
We propose a testing framework for validating static typing procedures in compilers. Our core component is a program generator suitably crafted for producing programs that are likely to trigger typing compiler bugs. One of our main contributions is that our program generator gives rise to transformation-based compiler testing for finding typing bugs. We present two novel approaches (type erasure mutation and type overwriting mutation) that apply targeted transformations to an input program to reveal type inference and soundness compiler bugs respectively. Both approaches are guided by an intra-procedural type inference analysis used to capture type information flow. We implement our techniques as a tool, which we call Hephaestus. The extensibility of Hephaestus enables us to test the compilers of three popular JVM languages: Java, Kotlin, and Groovy. Within nine months of testing, we have found 156 bugs (137 confirmed and 85 fixed) with diverse manifestations and root causes in all the examined compilers. Most of the discovered bugs lie in the heart of many critical components related to static typing, such as type inference.
Original language | English |
---|---|
Title of host publication | PLDI 2022 - Proceedings of the 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation |
Editors | Ranjit Jhala, Isil Dillig |
Publisher | ACM |
Pages | 183-198 |
Number of pages | 16 |
ISBN (Electronic) | 9781450392655 |
DOIs | |
Publication status | Published - 2022 |
Event | 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation, PLDI 2022 - Virtual, Online, United States Duration: 13 Jun 2022 → 17 Jun 2022 |
Publication series
Name | Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI) |
---|
Conference
Conference | 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation, PLDI 2022 |
---|---|
Country/Territory | United States |
City | Virtual, Online |
Period | 13/06/22 → 17/06/22 |
Bibliographical note
Green Open Access added to TU Delft Institutional Repository ‘You share, we take care!’ – Taverne project https://www.openaccess.nl/en/you-share-we-take-careOtherwise as indicated in the copyright section: the publisher is the copyright holder of this work and the author uses the Dutch legislation to make this work public.
Keywords
- compiler bugs
- compiler testing
- Groovy
- Java
- Kotlin
- static typing