Fuzzing Class Specifications
F. Z. Molina,Marcelo d’Amorim,Nazareno Aguirre +2 more
- 26 Jan 2022
pp 1008-1020
TL;DR: The results show that SPECFUZZER can easily support a more expressive assertion language, over which is more effective than GAssert and EvoSpex in inferring specifications, according to standard performance metrics.
read more
Abstract: Expressing class specifications via executable constraints is important for various software engineering tasks such as test generation, bug finding and automated debugging, but developers rarely write them. Techniques that infer specifications from code exist to fill this gap, but they are designed to support specific kinds of assertions and are difficult to adapt to support different assertion languages, e.g., to add support for quantification, or additional comparison operators, such as membership or containment. To address the above issue, we present SPECFUZZER, a novel technique that combines grammar-based fuzzing, dynamic invariant detection, and mutation analysis, to automatically produce class specifications. SPECFUZZER uses: (i) a fuzzer as a generator of candidate assertions derived from a grammar that is automatically obtained from the class definition; (ii) a dynamic invariant detector -Daikon- to filter out assertions invalidated by a test suite; and (iii) a mutation-based mechanism to cluster and rank assertions, so that similar constraints are grouped and then the stronger prioritized. Grammar-based fuzzing enables SPECFUZZER to be straightforwardly adapted to support different specification languages, by manipulating the fuzzing grammar, e.g., to include additional operators. We evaluate our technique on a benchmark of 43 Java methods employed in the evaluation of the state-of-the-art techniques GAssert and EvoSpex. Our results show that SPECFUZZER can easily support a more expressive assertion language, over which is more effective than GAssert and EvoSpex in inferring specifications, according to standard performance metrics.
read more
Chat with Paper
AI Agents for this Paper
Find similar papers on Google Scholar, PubMed and Arxiv
Write a critical review of this paper
Analyze citations of this paper to find unaddressed research gaps
Citations
µBert: Mutation Testing using Pre-Trained Language Models
01 Apr 2022
TL;DR: The µBert tool as mentioned in this paper uses a pre-trained language model (CodeBERT) to generate mutants by masking a token from the expression given as input and using CodeBERT to predict it.
Perfect is the enemy of test oracle
Ali Reza Ibrahimzada,Yigit Varli,Dilara Tekinoglu,Reyhaneh Jabbarvand +3 more
- 07 Nov 2022
TL;DR: In this paper , a learning-based approach is proposed to determine whether a unit test passes or fails on a given method under test (MUT) by jointly embedding unit tests and the implementation of MUTs into a unified vector space.
Enchanting Program Specification Synthesis by Large Language Models Using Static Analysis and Program Verification
Cheng Wen,Jialun Cao,Jie Su,Zhiwu Xu,Shengchao Qin,Mengda He,Haokun Li,Shing-Chi Cheung,Cong Tian +8 more
TL;DR: Researchers present AutoSpec, an automated approach to synthesize specifications for program verification using large language models, static analysis, and program verification, outperforming existing works by successfully verifying 79% of programs with a 1.592x improvement.
7
A Generative and Mutational Approach for Synthesizing Bug-Exposing Test Cases to Guide Compiler Fuzzing
Guixin Ye,Tianmin Hu,Zhanyong Tang,Zhenye Fan,Shin Hwei Tan,Bo Zhang,Wenxiang Qian,Zheng Wang +7 more
- 30 Nov 2023
TL;DR: COMFUZZ aims to improve compiler fuzzing efficiency by focusing on testing components and language features that are likely to trigger compiler bugs, and employs deep learning to learn a test program generator from open-source projects hosted on GitHub.
7
References
Introduction to Software Testing: List of Figures
Paul Ammann,Jeff Offutt +1 more
- 01 Jan 2008
TL;DR: The structure of the text directly reflects the pedagogical approach and incorporates the latest innovations in testing, including techniques to test modern types of software such as OO, web applications and embedded software.
1.2K
The Daikon system for dynamic detection of likely invariants
Michael D. Ernst,Jeff H. Perkins,Philip J. Guo,Stephen McCamant,Carlos Pacheco,Matthew S. Tschantz,Chen Xiao +6 more
TL;DR: Daikon is an implementation of dynamic detection of likely invariants; that is, the Daikon invariant detector reports likely program invariants, a property that holds at a certain point or points in a program.
1.2K
The Oracle Problem in Software Testing: A Survey
TL;DR: This paper provides a comprehensive survey of current approaches to the test oracle problem and an analysis of trends in this important area of software testing research and practice.
1K