Compilers translate programs from a high level of abstraction into a low level representation that can be understood and executed by the computer; interpreters directly execute instructions from source code to convey their semantics. Undoubtedly, the correctness of both compilers and interpreters is fundamental to reliably execute the semantics of any software developed by means of high-level languages. Testing is one of the most important methods to detect errors in any software, including compilers and interpreters. Among testing methods, mutation testing is an empirically effective technique often used to evaluate and improve the quality of test suites. However, mutation testing imposes severe demands in computing resources due to the large number of mutants that need to be generated, compiled and executed. In this work, we introduce a mutation approach for programming languages that mitigates this problem by leveraging the properties of language product lines, language workbenches and separate compilations. In this approach, the base language is taken as a black-box and mutated by means of mutation operators performed at language feature-level to create a family of mutants of the base language. Each variant of the mutant family is created at runtime, without any access to the source code and without performing any additional compilation. We report results from a preliminary case study in which mutants of an ECMAScript interpreter are tested against the Sputnik conformance test suite for the ECMA-262 specification. The experimental data indicates that this approach can be used to create generally non-trivial mutants.

The language mutation problem: leveraging language product lines for mutation testing of interpreters / W. Cazzola, L. Favalli. - In: THE JOURNAL OF SYSTEMS AND SOFTWARE. - ISSN 0164-1212. - 195:(2023 Jan), pp. 111533.1-111533.20. [10.1016/j.jss.2022.111533]

The language mutation problem: leveraging language product lines for mutation testing of interpreters

W. Cazzola
Primo
;
L. Favalli
Ultimo
2023

Abstract

Compilers translate programs from a high level of abstraction into a low level representation that can be understood and executed by the computer; interpreters directly execute instructions from source code to convey their semantics. Undoubtedly, the correctness of both compilers and interpreters is fundamental to reliably execute the semantics of any software developed by means of high-level languages. Testing is one of the most important methods to detect errors in any software, including compilers and interpreters. Among testing methods, mutation testing is an empirically effective technique often used to evaluate and improve the quality of test suites. However, mutation testing imposes severe demands in computing resources due to the large number of mutants that need to be generated, compiled and executed. In this work, we introduce a mutation approach for programming languages that mitigates this problem by leveraging the properties of language product lines, language workbenches and separate compilations. In this approach, the base language is taken as a black-box and mutated by means of mutation operators performed at language feature-level to create a family of mutants of the base language. Each variant of the mutant family is created at runtime, without any access to the source code and without performing any additional compilation. We report results from a preliminary case study in which mutants of an ECMAScript interpreter are tested against the Sputnik conformance test suite for the ECMA-262 specification. The experimental data indicates that this approach can be used to create generally non-trivial mutants.
No
English
language product lines; mutation testing; language testing
Settore INF/01 - Informatica
Articolo
Esperti anonimi
Ricerca applicata
Pubblicazione scientifica
   Typeful Language Adaptation for Dynamic, Interacting and Evolving Systems
   T-LADIES
   MINISTERO DELL'ISTRUZIONE E DEL MERITO
   2020TL3X8X_001
gen-2023
12-ott-2022
Elsevier
195
111533
1
20
20
Pubblicato
Periodico con rilevanza internazionale
manual
Aderisco
info:eu-repo/semantics/article
The language mutation problem: leveraging language product lines for mutation testing of interpreters / W. Cazzola, L. Favalli. - In: THE JOURNAL OF SYSTEMS AND SOFTWARE. - ISSN 0164-1212. - 195:(2023 Jan), pp. 111533.1-111533.20. [10.1016/j.jss.2022.111533]
reserved
Prodotti della ricerca::01 - Articolo su periodico
2
262
Article (author)
Periodico con Impact Factor
W. Cazzola, L. Favalli
File in questo prodotto:
File Dimensione Formato  
jss22-published.pdf

accesso riservato

Tipologia: Publisher's version/PDF
Dimensione 2.71 MB
Formato Adobe PDF
2.71 MB Adobe PDF   Visualizza/Apri   Richiedi una copia
Pubblicazioni consigliate

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/2434/939206
Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus 1
  • ???jsp.display-item.citation.isi??? 1
social impact