Finding Bugs with Specification-Based Testing is Easy!

02/26/2021
by   Janice Chin, et al.
0

Automated specification-based testing has a long history with several notable tools having emerged. For example, QuickCheck for Haskell focuses on testing against user-provided properties. Others, such as JMLUnit, use specifications in the form of pre- and post-conditions to drive testing. An interesting (and under-explored) question is how effective this approach is at finding bugs in practice. In general, one would assume automated testing is less effective at bug finding than static verification. But, how much less effective? To shed light on this question, we consider automated testing of programs written in Whiley – a language with first-class support for specifications. Whilst originally designed with static verification in mind, we have anecdotally found automated testing for Whiley surprisingly useful and cost-effective. For example, when an error is detected with automated testing, a counterexample is always provided. This has motivated the more rigorous empirical examination presented in this paper. To that end, we provide a technical discussion of the implementation behind an automated testing tool for Whiley. Here, a key usability concern is the ability to parameterise the input space, and we present novel approaches for references and lambdas. We then report on several large experiments investigating the tool's effectiveness at bug finding using a range of benchmarks, including a suite of 1800+ mutants. The results indicate the automated testing is effective in many cases, and that sampling offers useful performance benefits with only modest reductions in bug-finding capability. Finally, we report on some real-world uses of the tool where it has proved effective at finding bugs (such as in the standard library).

READ FULL TEXT

page 4

page 6

page 16

page 18

research
09/14/2022

HyperPUT: Generating Synthetic Faulty Programs to Challenge Bug-Finding Tools

As research in automatically detecting bugs grows and produces new techn...
research
05/29/2019

Sub-Turing Islands in the Wild

Recently, there has been growing debate as to whether or not static anal...
research
02/19/2020

A Recurrent Neural Network Based Patch Recommender for Linux Kernel Bugs

Software bugs in a production environment have an undesirable impact on ...
research
11/14/2017

Comparing Bug Finding Tools with Reviews and Tests

Bug finding tools can find defects in software source code us- ing an au...
research
08/16/2021

Effects of Hints on Debugging Scratch Programs: An Empirical Study with Primary School Teachers in Training

Bugs in learners' programs are often the result of fundamental misconcep...
research
05/06/2019

Interactive Semi-automated Specification Mining for Debugging: An Experience Report

Context: Specification mining techniques are typically used to extract t...
research
02/02/2023

Effective Random Test Generation for Deep Learning Compilers

Deep learning compilers help address difficulties of deploying deep lear...

Please sign up or login with your details

Forgot password? Click here to reset