High-Performance Generation of Constrained Inputs

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Crump, Addison, Turcotte, Alexi, Amaya, José Antonio Zamudio, Zeller, Andreas
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866915612641460224
author Crump, Addison
Turcotte, Alexi
Amaya, José Antonio Zamudio
Zeller, Andreas
author_facet Crump, Addison
Turcotte, Alexi
Amaya, José Antonio Zamudio
Zeller, Andreas
contents Language-based testing combines context-free grammar definitions with semantic constraints over grammar elements to generate test inputs. By pairing context-free grammars with constraints, users have the expressiveness of unrestricted grammars while retaining simple structure. However, producing inputs in the presence of such constraints can be challenging. In past approaches, SMT solvers have been found to be very slow at finding string solutions; evolutionary algorithms are faster and more general, but current implementations still struggle with complex constraints that would be required for domains such as compiler testing. In this paper, we present a novel approach for evolutionary language-based testing that improves performance by 3-4 orders of magnitude over the current state of the art, reducing hours of generation and constraint solving time to seconds. We accomplish this by (1) carefully transforming grammar definitions into Rust types and trait implementations, ensuring that the compiler may near-maximally optimize arbitrary operations on arbitrary grammars; and (2) using better evolutionary algorithms that improve the ability of language-based testing to solve complex constraint systems. These performance and algorithmic improvements allow our prototype, FANDANGO-RS, to solve constraints that previous strategies simply cannot handle. We demonstrate this by a case study for a C subset, in which FANDANGO-RS is able to generate 401 diverse, complex, and valid test inputs for a C compiler per minute.
format Preprint
id arxiv_https___arxiv_org_abs_2511_05987
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle High-Performance Generation of Constrained Inputs
Crump, Addison
Turcotte, Alexi
Amaya, José Antonio Zamudio
Zeller, Andreas
Software Engineering
Formal Languages and Automata Theory
Programming Languages
68N15, 68N20, 68Q42
D.2.5; D.3.4; F.4.2
Language-based testing combines context-free grammar definitions with semantic constraints over grammar elements to generate test inputs. By pairing context-free grammars with constraints, users have the expressiveness of unrestricted grammars while retaining simple structure. However, producing inputs in the presence of such constraints can be challenging. In past approaches, SMT solvers have been found to be very slow at finding string solutions; evolutionary algorithms are faster and more general, but current implementations still struggle with complex constraints that would be required for domains such as compiler testing. In this paper, we present a novel approach for evolutionary language-based testing that improves performance by 3-4 orders of magnitude over the current state of the art, reducing hours of generation and constraint solving time to seconds. We accomplish this by (1) carefully transforming grammar definitions into Rust types and trait implementations, ensuring that the compiler may near-maximally optimize arbitrary operations on arbitrary grammars; and (2) using better evolutionary algorithms that improve the ability of language-based testing to solve complex constraint systems. These performance and algorithmic improvements allow our prototype, FANDANGO-RS, to solve constraints that previous strategies simply cannot handle. We demonstrate this by a case study for a C subset, in which FANDANGO-RS is able to generate 401 diverse, complex, and valid test inputs for a C compiler per minute.
title High-Performance Generation of Constrained Inputs
topic Software Engineering
Formal Languages and Automata Theory
Programming Languages
68N15, 68N20, 68Q42
D.2.5; D.3.4; F.4.2
url https://arxiv.org/abs/2511.05987