``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, :ref:`adv-clusters`, :ref:`adv-refiners` and :ref:`adv-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 :doc:`flitsr plugin `. For more information, see :doc:`adv_type_ext`. .. _adv-clusters: Clusters ------------------------------------------------------------------------------- `Cluster`\s 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 ``flitsr``\s 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 :ref:`--parallel ` command line option for usage of these techniques. The API for a `Cluster ` type, as well as any implemented ``Cluster``\s are given below: .. autosummary:: :recursive: :toctree: generated :template: custom-class-template.rst flitsr.advanced.cluster.Cluster flitsr.advanced.parallel.Parallel .. _adv-refiners: Refiners ------------------------------------------------------------------------------- The second advanced type that is run by ``flitsr`` is a `Refiner `. `Refiner `\s take a ``flitsr`` spectrum, manipulate and extend it, and return a modified spectrum. `Refiner `\s 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 `Refiner `\s implemented directly in the ``flitsr`` framework. However you can still :doc:`create your own `. The API for a `Refiner ` type is given below: .. autosummary:: :recursive: :toctree: generated :template: custom-class-template.rst flitsr.advanced.refiner.Refiner .. _adv-rankers: 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 :ref:`sbfl `, :ref:`flitsr `, :ref:`multi ` and :ref:`artemis `. The simplest of these is the :ref:`sbfl ` technique, which simply returns the `Ranking ` formed by the SBFL base metric given. The :ref:`flitsr ` and :ref:`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 :ref:`flitsr ` `Ranker ` is the default when running the :ref:`flitsr command line tool `. Finally the :ref:`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 `Ranker `\s in ``flitsr`` are given below: .. autosummary:: :recursive: :toctree: generated :template: custom-class-template.rst flitsr.advanced.ranker.Ranker flitsr.advanced.sbfl.SBFL flitsr.advanced.flitsr.Flitsr flitsr.advanced.flitsr.Multi flitsr.advanced.artemis_wrapper.Artemis