Cargando…
SpecTest: Specification-Based Compiler Testing
Compilers are error-prone due to their high complexity. They are relevant for not only general purpose programming languages, but also for many domain specific languages. Bugs in compilers can potentially render all programs at risk. It is thus crucial that compilers are systematically tested, if no...
Autores principales: | , |
---|---|
Formato: | Online Artículo Texto |
Lenguaje: | English |
Publicado: |
2021
|
Materias: | |
Acceso en línea: | https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7978860/ http://dx.doi.org/10.1007/978-3-030-71500-7_14 |
_version_ | 1783667230812143616 |
---|---|
author | Schumi, Richard Sun, Jun |
author_facet | Schumi, Richard Sun, Jun |
author_sort | Schumi, Richard |
collection | PubMed |
description | Compilers are error-prone due to their high complexity. They are relevant for not only general purpose programming languages, but also for many domain specific languages. Bugs in compilers can potentially render all programs at risk. It is thus crucial that compilers are systematically tested, if not verified. Recently, a number of efforts have been made to formalise and standardise programming language semantics, which can be applied to verify the correctness of the respective compilers. In this work, we present a novel specification-based testing method named SpecTest to better utilise these semantics for testing. By applying an executable semantics as test oracle, SpecTest can discover deep semantic errors in compilers. Compared to existing approaches, SpecTest is built upon a novel test coverage criterion called semantic coverage which brings together mutation testing and fuzzing to specifically target less tested language features. We apply SpecTest to systematically test two compilers, i.e., the Java compiler and the Solidity compiler. SpecTest improves the semantic coverage of both compilers considerably and reveals multiple previously unknown bugs. |
format | Online Article Text |
id | pubmed-7978860 |
institution | National Center for Biotechnology Information |
language | English |
publishDate | 2021 |
record_format | MEDLINE/PubMed |
spelling | pubmed-79788602021-03-23 SpecTest: Specification-Based Compiler Testing Schumi, Richard Sun, Jun Fundamental Approaches to Software Engineering Article Compilers are error-prone due to their high complexity. They are relevant for not only general purpose programming languages, but also for many domain specific languages. Bugs in compilers can potentially render all programs at risk. It is thus crucial that compilers are systematically tested, if not verified. Recently, a number of efforts have been made to formalise and standardise programming language semantics, which can be applied to verify the correctness of the respective compilers. In this work, we present a novel specification-based testing method named SpecTest to better utilise these semantics for testing. By applying an executable semantics as test oracle, SpecTest can discover deep semantic errors in compilers. Compared to existing approaches, SpecTest is built upon a novel test coverage criterion called semantic coverage which brings together mutation testing and fuzzing to specifically target less tested language features. We apply SpecTest to systematically test two compilers, i.e., the Java compiler and the Solidity compiler. SpecTest improves the semantic coverage of both compilers considerably and reveals multiple previously unknown bugs. 2021-02-24 /pmc/articles/PMC7978860/ http://dx.doi.org/10.1007/978-3-030-71500-7_14 Text en © The Author(s) 2021 Open Access This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made. The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. |
spellingShingle | Article Schumi, Richard Sun, Jun SpecTest: Specification-Based Compiler Testing |
title | SpecTest: Specification-Based Compiler Testing |
title_full | SpecTest: Specification-Based Compiler Testing |
title_fullStr | SpecTest: Specification-Based Compiler Testing |
title_full_unstemmed | SpecTest: Specification-Based Compiler Testing |
title_short | SpecTest: Specification-Based Compiler Testing |
title_sort | spectest: specification-based compiler testing |
topic | Article |
url | https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7978860/ http://dx.doi.org/10.1007/978-3-030-71500-7_14 |
work_keys_str_mv | AT schumirichard spectestspecificationbasedcompilertesting AT sunjun spectestspecificationbasedcompilertesting |