Input-Gen: Guided Generation of Stateful Inputs for Testing, Tuning, and Training

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Ivanov, Ivan R., Meyer, Joachim, Grossman, Aiden, Moses, William S., Doerfert, Johannes
Format: Preprint
Publié: 2024
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866914833618698240
author Ivanov, Ivan R.
Meyer, Joachim
Grossman, Aiden
Moses, William S.
Doerfert, Johannes
author_facet Ivanov, Ivan R.
Meyer, Joachim
Grossman, Aiden
Moses, William S.
Doerfert, Johannes
contents The size and complexity of software applications is increasing at an accelerating pace. Source code repositories (along with their dependencies) require vast amounts of labor to keep them tested, maintained, and up to date. As the discipline now begins to also incorporate automatically generated programs, automation in testing and tuning is required to keep up with the pace - let alone reduce the present level of complexity. While machine learning has been used to understand and generate code in various contexts, machine learning models themselves are trained almost exclusively on static code without inputs, traces, or other execution time information. This lack of training data limits the ability of these models to understand real-world problems in software. In this work we show that inputs, like code, can be generated automatically at scale. Our generated inputs are stateful, and appear to faithfully reproduce the arbitrary data structures and system calls required to rerun a program function. By building our tool within the compiler, it both can be applied to arbitrary programming languages and architectures and can leverage static analysis and transformations for improved performance. Our approach is able to produce valid inputs, including initial memory states, for 90% of the ComPile dataset modules we explored, for a total of 21.4 million executable functions. Further, we find that a single generated input results in an average block coverage of 37%, whereas guided generation of five inputs improves it to 45%.
format Preprint
id arxiv_https___arxiv_org_abs_2406_08843
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Input-Gen: Guided Generation of Stateful Inputs for Testing, Tuning, and Training
Ivanov, Ivan R.
Meyer, Joachim
Grossman, Aiden
Moses, William S.
Doerfert, Johannes
Software Engineering
Performance
Programming Languages
The size and complexity of software applications is increasing at an accelerating pace. Source code repositories (along with their dependencies) require vast amounts of labor to keep them tested, maintained, and up to date. As the discipline now begins to also incorporate automatically generated programs, automation in testing and tuning is required to keep up with the pace - let alone reduce the present level of complexity. While machine learning has been used to understand and generate code in various contexts, machine learning models themselves are trained almost exclusively on static code without inputs, traces, or other execution time information. This lack of training data limits the ability of these models to understand real-world problems in software. In this work we show that inputs, like code, can be generated automatically at scale. Our generated inputs are stateful, and appear to faithfully reproduce the arbitrary data structures and system calls required to rerun a program function. By building our tool within the compiler, it both can be applied to arbitrary programming languages and architectures and can leverage static analysis and transformations for improved performance. Our approach is able to produce valid inputs, including initial memory states, for 90% of the ComPile dataset modules we explored, for a total of 21.4 million executable functions. Further, we find that a single generated input results in an average block coverage of 37%, whereas guided generation of five inputs improves it to 45%.
title Input-Gen: Guided Generation of Stateful Inputs for Testing, Tuning, and Training
topic Software Engineering
Performance
Programming Languages
url https://arxiv.org/abs/2406.08843