Class SuspiciousCombinationAlgorithm

  • All Implemented Interfaces:
    FaultCharacterizationAlgorithm
    Direct Known Subclasses:
    Ben

    public abstract class SuspiciousCombinationAlgorithm
    extends Object
    implements FaultCharacterizationAlgorithm
    A "helper" class for some fault characterization algorithms. It has been observed that many algorithms like AIFL and BEN work by keeping an internal list of suspicious combinations. They then generate new test inputs if a criterion is met and those test inputs are used to refine the suspicious set by removing all suspicious combinations appearing in a successful test. The basic housekeeping work is done by this class so the algorithms can focus on the important bits.

    The class keeps two sets of suspicious combinations in memory: the current one, and one from last iteration. This is needed to calculate differences. Additionally, the FaultCharacterizationConfiguration and all test results are stored.

    • Method Detail

      • getReporter

        protected Reporter getReporter()
      • getRelevantSubCombinations

        protected abstract Set<IntArrayWrapper> getRelevantSubCombinations​(int[] combination)
        Defined which sub-combinations of any given combination can be part of the suspicious set. For example, BEN only works on all t-value-combinations while AIFL considers all possible sub-combinations.
        Parameters:
        combination - for which the relevant sub-combinations are needed
        Returns:
        all sub-combination the concrete algorithm considers
      • generateNextTestInputs

        protected abstract List<IntArrayWrapper> generateNextTestInputs​(Map<int[],​TestResult> newTestResults)
        The concrete algorithm generates test for which it needs the result for better fault characterization. If no further characterization is needed, an empty list should be returned.
        Parameters:
        newTestResults - the results from the test inputs generated in the last iteration of the initially generated test inputs if in the first iteration
        Returns:
        test inputs for which the result is needed