Class IterationBasedIterAifl
- java.lang.Object
-
- de.rwth.swc.coffee4j.engine.characterization.SuspiciousCombinationAlgorithm
-
- de.rwth.swc.coffee4j.engine.characterization.aifl.Aifl
-
- de.rwth.swc.coffee4j.engine.characterization.aifl.IterationBasedIterAifl
-
- All Implemented Interfaces:
FaultCharacterizationAlgorithm
public class IterationBasedIterAifl extends Aifl
Extension to the AIFL algorithm based on "Adaptive Interaction Fault Location Based on Combinatorial Testing". In each new iteration, test inputs are generated based on the failed test inputs of the previous generation. The algorithm stops if there either were no failed test inputs in the last iteration, or the number of iterations is now greater than the testing strength, or if the number of suspicious combinations did not change during the last iteration, or if the number of iterations is below a defined threshold (default: 1). Consequently, the algorithm always terminates.Important Information: -Generates many additional test inputs if there are many parameters -Generates many additional test inputs if there are many failing test inputs -Does not order failure-inducing combinations by probability and can return quite a few of them -Does not consider constraints -Is a bit more exact than AIFL itself, but needs considerably more test inputs
-
-
Field Summary
-
Fields inherited from class de.rwth.swc.coffee4j.engine.characterization.SuspiciousCombinationAlgorithm
configuration, previousSuspiciousCombinations, suspiciousCombinations, testResults
-
-
Constructor Summary
Constructors Constructor Description IterationBasedIterAifl(FaultCharacterizationConfiguration configuration)Creates a new IterAIFL algorithm based on the given configuration.IterationBasedIterAifl(FaultCharacterizationConfiguration configuration, int suspiciousCombinationsThreshold)Creates a new IterAIFL algorithm based on the given configuration.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<IntArrayWrapper>generateNextTestInputs(java.util.Map<int[],TestResult> newTestResults)The concrete algorithm generates test for which it needs the result for better fault characterization.static FaultCharacterizationAlgorithmFactoryiterAifl()static FaultCharacterizationAlgorithmFactoryiterAifl(int suspiciousCombinationsThreshold)Creates a factory which uses the given threshold to configuration the IterAIFL algorithm.booleanshouldGenerateFurtherTestInputs()-
Methods inherited from class de.rwth.swc.coffee4j.engine.characterization.aifl.Aifl
aifl, computeFailureInducingCombinations, getRelevantSubCombinations
-
Methods inherited from class de.rwth.swc.coffee4j.engine.characterization.SuspiciousCombinationAlgorithm
computeNextTestInputs, getChecker, getModel, getReporter
-
-
-
-
Constructor Detail
-
IterationBasedIterAifl
public IterationBasedIterAifl(FaultCharacterizationConfiguration configuration)
Creates a new IterAIFL algorithm based on the given configuration. The ConstraintsChecker is ignored.- Parameters:
configuration- the configuration for the algorithm
-
IterationBasedIterAifl
public IterationBasedIterAifl(FaultCharacterizationConfiguration configuration, int suspiciousCombinationsThreshold)
Creates a new IterAIFL algorithm based on the given configuration. The ConstraintsChecker is ignored. The threshold is used as a stopping conditions as described inIterationBasedIterAifl.- Parameters:
configuration- the configuration for the algorithmsuspiciousCombinationsThreshold- the threshold for algorithm termination
-
-
Method Detail
-
iterAifl
public static FaultCharacterizationAlgorithmFactory iterAifl()
- Returns:
- a factory always returning new instances of the IterAIFL algorithm
-
iterAifl
public static FaultCharacterizationAlgorithmFactory iterAifl(int suspiciousCombinationsThreshold)
Creates a factory which uses the given threshold to configuration the IterAIFL algorithm.- Parameters:
suspiciousCombinationsThreshold- the threshold as described inIterationBasedIterAifl- Returns:
- a factory always returning new instances of the IterAIFL algorithm with the given threshold
-
shouldGenerateFurtherTestInputs
public boolean shouldGenerateFurtherTestInputs()
- Overrides:
shouldGenerateFurtherTestInputsin classAifl- Returns:
- Whether further test inputs should be generated. If not,
FaultCharacterizationAlgorithm.computeFailureInducingCombinations()will be called next
-
generateNextTestInputs
public java.util.List<IntArrayWrapper> generateNextTestInputs(java.util.Map<int[],TestResult> newTestResults)
Description copied from class:SuspiciousCombinationAlgorithmThe 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.- Overrides:
generateNextTestInputsin classAifl- 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
-
-