ArticleslgStudy

computer science

Search-based software engineering

Search-based software engineering is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Search-based software engineering rather than just read about it. In short: Search-based software engineering (SBSE) 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.

Key takeaways

  • Search-based software engineering belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Search-based software engineering to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Search-based software engineering from memory before moving on to harder problems.

Reference excerpt

Search-based software engineering (SBSE) 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:

black-box optimization problems, for example, assigning people to tasks (a typical combinatorial optimization problem). white-box problems where operations on source code need to be considered.

Definition 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 (also called a fitness function, cost function, objective function or quality measure) 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 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 (or a code smell) and then debugging (or refactoring) 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 (for example via mutation testing). 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 GenProg Evolutionary Program Repair software repaired 55 out of 105 bugs for approximately $8 each in one test. Empirical analysis of bug-fix patterns mined from software repositories has been used to mathematically characterize the search space of automated program repair. This search space was later operationalized in Cardumen, a repair approach that synthesizes patches from code templates automatically mined from the source code of the application under repair. 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 the automatic generation of test cases (test data), 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 a 9% improvement in execution time, 13% improvement in memory consumption and 4% improvement in 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, EvoSuite, and Coverage, a code coverage measurement tool for Python.

Methods and techniques A number of methods and techniques are available, including:

Profiling via instrumentation in order to monitor certain parts of a program as it is executed. Obtaining an abstract syntax tree associated with the program, which can be automatically examined to gain insights into its structure. Applications of program slicing relevant to SBSE include software maintenance, optimization and program analysis. Code coverage allows measuring how much of the code is executed with a given set of input data. Static program analysis

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Search-based software engineering

Start with the simplest possible case. Write down what Search-based software engineering claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Search-based software engineering before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Search-based software engineering ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Search-based software engineering

In research
Search-based software engineering appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Search-based software engineering in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Search-based software engineering is common in secondary-school and first-year university syllabi. It links to neighbouring topics Computer-related introductions in 2001, Metaheuristics, Optimization algorithms and methods, so understanding it makes those chapters shorter.
In everyday life
Look for Search-based software engineering outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Search-based software engineering in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Search-based software engineering means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Search-based software engineering out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Search-based software engineering in simple terms?

Search-based software engineering (SBSE) 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.

Why does Search-based software engineering matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Search-based software engineering?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Search-based software engineering.

Tags

  • Computer-related introductions in 2001
  • Metaheuristics
  • Optimization algorithms and methods
  • Program analysis
  • Search algorithms
  • Software quality
  • Software testing

Keep exploring