Search-based software engineering


Search-based software engineering applies metaheuristic search techniques such as genetic algorithms, simulated annealing and tabu search to software engineering problems. Many activities in software engineering can be stated as optimization problems. Optimization techniques of operations research such as linear programming or dynamic programming are often impractical for large scale software engineering problems because of their computational complexity or their assumptions on the problem structure. Researchers and practitioners use metaheuristic search techniques, which impose little assumptions on the problem structure, to find near-optimal or "good-enough" solutions.
SBSE problems can be divided into two types:
SBSE converts a software engineering problem into a computational search problem that can be tackled with a metaheuristic. This involves defining a search space, or the set of possible solutions. This space is typically too large to be explored exhaustively, suggesting a metaheuristic approach. A metric is then used to measure the quality of potential solutions. Many software engineering problems can be reformulated as a computational search problem.
The term "search-based application", in contrast, refers to using search engine technology, rather than search techniques, in another industrial application.

Brief history

One of the earliest attempts to apply optimization to a software engineering problem was reported by Webb Miller and David Spooner in 1976 in the area of software testing. In 1992, S. Xanthakis and his colleagues applied a search technique to a software engineering problem for the first time. The term SBSE was first used in 2001 by Harman and Jones. The research community grew to include more than 800 authors by 2013, spanning approximately 270 institutions in 40 countries.

Application areas

Search-based software engineering is applicable to almost all phases of the software development process. Software testing has been one of the major applications. Search techniques have been applied to other software engineering activities, for instance, requirements analysis, design, refactoring, development, and maintenance.

Requirements engineering

is the process by which the needs of a software's users and environment are determined and managed. Search-based methods have been used for requirements selection and optimisation with the goal of finding the best possible subset of requirements that matches user requests amid constraints such as limited resources and interdependencies between requirements. This problem is often tackled as a multiple-criteria decision-making problem and, generally involves presenting the decision maker with a set of good compromises between cost and user satisfaction as well as the requirements risk.

Debugging and maintenance

Identifying a software bug and then debugging the software is largely a manual and labor-intensive endeavor, though the process is tool-supported. One objective of SBSE is to automatically identify and fix bugs.
Genetic programming, a biologically-inspired technique that involves evolving programs through the use of crossover and mutation, has been used to search for repairs to programs by altering a few lines of source code. The software repaired 55 out of 105 bugs for approximately $8 each in one test.
Coevolution adopts a "predator and prey" metaphor in which a suite of programs and a suite of unit tests evolve together and influence each other.

Testing

Search-based software engineering has been applied to software testing, including automatic generation of test cases, test case minimization and test case prioritization. Regression testing has also received some attention.

Optimizing software

The use of SBSE in program optimization, or modifying a piece of software to make it more efficient in terms of speed and resource use, has been the object of successful research. In one instance, a 50,000 line program was genetically improved, resulting in a program 70 times faster on average.
A recent work by Basios et al. shows that by optimising the data structure, Google Guava found 9% improvement on execution time, 13% improvement on memory consumption and 4% improvement on CPU usage separately.

Project management

A number of decisions that are normally made by a project manager can be done automatically, for example, project scheduling.

Tools

Tools available for SBSE include OpenPAT. and EvoSuite and , a code coverage measurement tool for Python

Methods and techniques

A number of methods and techniques are available, including:
As a relatively new area of research, SBSE does not yet experience broad industry acceptance. Software engineers are reluctant to adopt tools over which they have little control or that generate solutions that are unlike those that humans produce. In the context of SBSE use in fixing or improving programs, developers need to be confident that any automatically produced modification does not generate unexpected behavior outside the scope of a system's requirements and testing environment. Considering that fully automated programming has yet to be achieved, a desirable property of such modifications would be that they need to be easily understood by humans to support maintenance activities.
Another concern is that SBSE might make the software engineer redundant. Supporters claim that the motivation for SBSE is to enhance the relationship between the engineer and the program.