Jump to content

Bisection (software engineering)

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Hdu hh (talk | contribs) at 13:08, 4 June 2012 (minor reshuffling). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Code Bisection is a method used in software development to identify change sets that result in a specific behavior change. It is mostly employed for finding the patch that introduced a bug. Another application area is finding the patch that indirectly fixed a bug.

Overview

The code bisection method is a divide and conquer algorithm that tries to minimize the effort to find a specific change set.

It depends on the having access to the code history which is usually preserved by revision control in a code repository.

The Bisection Method

Code Bisection Algorithm

Since code history has the structure of an acyclic directed graph which can be topologically sorted it is possible split up a search space, test for the behavior in question and depending on the result reducing the search space further for a next iteration step.

Algorithmic complexity

Code bisection as a divide and conquer algorithm is in LSPACE having an algorithmic complexity of with denoting the number of revisions in the search space.

Desirable Repository Properties

For code bisection it is desirable that each revision in the search space can be compiled and tested independently.

Support by Revision Control Systems

Revision control systems like Git or Mercurial directly support [1][2] code bisection.

Other revision control systems like [[Bazaar_(software)|Bazaar] or Subversion support it indirectly employing plugins[3] or external scripts[4].

References