flitsr advanced types

The flitsr framework supports the use of advanced techniques which operate over the spectra or rankings. Currently there are three types of advanced types, Clusters, Refiners and Rankers. Each of these flitsr advanced types is a template which specifies a class of techniques that take a certain input(s) and return a certain output.

Note

You can implement any of the flitsr advanced types by creating a flitsr plugin. For more information, see Extending flitsr advanced types.

Clusters

Clusters are the first type of flitsr advanced type, and operate directly on the spectrum, returning multiple spectra in return. They are the first advanced type to be run in the flow of flitsrs execution.

The Cluster type is only required to define one method, cluster, which takes the input Spectrum (along with some other useful parameters), and returns a collection of spectra decomposed from the original.

Various implementations of the Cluster type may implement the decomposition differently, which constitute novel techniques.

Incorporated in the flitsr framework are the collection of Parallel Debugging techniques, which decompose the spectrum according to the techniques described in “More Debugging in Parallel”. See the –parallel command line option for usage of these techniques.

The API for a Cluster type, as well as any implemented Clusters are given below:

flitsr.advanced.cluster.Cluster()

A Cluster technique takes a Spectrum and returns a collection of spectra that are decompositions of the original

flitsr.advanced.parallel.Parallel([parType])

Run one of the parallel debugging algorithms on the spectrum to produce multiple spectrums, and process all other options on each spectrum.

Refiners

The second advanced type that is run by flitsr is a Refiner. Refiners take a flitsr spectrum, manipulate and extend it, and return a modified spectrum. Refiners are useful for extending a spectrum with additional information before using it to form a Ranking with SBFL techniques.

Like the Cluster type, Refiner types need only implement one method: refine, which takes a spectrum and returns a modified spectrum.

Currently there are no Refiners implemented directly in the flitsr framework. However you can still create your own.

The API for a Refiner type is given below:

flitsr.advanced.refiner.Refiner()

A Refiner technique takes a Spectrum and manipulates and extends it, returning a modified spectrum.

Rankers

The last, and possibly most useful flitsr advanced type is a Ranker. A Ranker takes a Spectrum and uses the information from the Spectrum to rank the elements, forming a Ranking.

As before, there is only one method to implement, the rank method which takes a spectrum and SBFL base metric and returns a Ranking.

The flitsr framework currently has four defined Ranker types, which are sbfl, flitsr, multi and artemis.

The simplest of these is the sbfl technique, which simply returns the Ranking formed by the SBFL base metric given.

The flitsr and multi techniques implement the FLITSR and FLITSR*/FLITSR MULTI algorithms as described in “FLITSR: Improved Spectrum-Based Localization of Multiple Faults by Iterative Test Suite Reduction”. These techniques improve the effectiveness of the SBFL techniques for programs with multiple faults. The flitsr Ranker is the default when running the flitsr command line tool.

Finally the artemis techniques implement the ARTEMIS algorithm, as described in “Augmenting Automated Spectrum Based Fault Localization For Multiple Faults”. The technique is also designed to improve SBFL effectiveness in the presence of multiple faults.

The API for a Ranker as well as all Rankers in flitsr are given below:

flitsr.advanced.Config([ranker, cluster, ...])

The advanced type configuration for a particular run of SBFL methods.

flitsr.advanced.ranker.Ranker()

A Ranker technique takes a Spectrum and forms a Ranking of the elements in the the spectrum.

flitsr.advanced.sbfl.SBFL([tiebrk])

Disables the FLITSR algorithm so that only the base metric is used to produce the ranking.

flitsr.advanced.flitsr.Flitsr([args, ...])

Run the main FLITSR algorithm over the spectrum to produce ranked lists.

flitsr.advanced.flitsr.Multi([args, cutoff])

Run the FLITSR* algorithm over the spectrum to produce ranked lists.

flitsr.advanced.artemis_wrapper.Artemis([...])

Run the ARTEMIS technique on the spectrum to produce the ranked lists.