Class CoverageMap
- java.lang.Object
-
- de.rwth.swc.coffee4j.algorithmic.interleaving.CoverageMap
-
public class CoverageMap extends Object
Coverage Map storing all uncovered t-tuples.
-
-
Constructor Summary
Constructors Constructor Description CoverageMap(int[] parameterSizes, int strength, ConstraintChecker checker)
CoverageMap(CoverageMap coverageMap, ConstraintChecker checker)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
allCombinationsCovered()
long
getNumberOfCoveredCombinationsByTestInput(int[] testInput)
ParameterValuePair
getParameterValuePairCoveringMostCombinations(Set<ParameterValuePair> forbiddenPairs)
Set<it.unimi.dsi.fastutil.ints.IntList>
getPassingTestInputs()
void
updateCoverage()
update coverage: remove all tuples that became invalid after new forbidden combination was added tochecker
void
updateCoverage(int[] testInput)
remove all combinations contained by given test input
-
-
-
Constructor Detail
-
CoverageMap
public CoverageMap(int[] parameterSizes, int strength, ConstraintChecker checker)
- Parameters:
parameterSizes
- contains number of possible values for each parameterstrength
- testing strength tchecker
- Constraint checker used to remove invalid t-tuples
-
CoverageMap
public CoverageMap(CoverageMap coverageMap, ConstraintChecker checker)
- Parameters:
coverageMap
-CoverageMap
to copy.checker
- Constraint checker used to remove invalid t-tuples.
-
-
Method Detail
-
getPassingTestInputs
public Set<it.unimi.dsi.fastutil.ints.IntList> getPassingTestInputs()
-
allCombinationsCovered
public boolean allCombinationsCovered()
- Returns:
- true iff all valid t-tuples are covered
-
updateCoverage
public void updateCoverage(int[] testInput)
remove all combinations contained by given test input- Parameters:
testInput
- successful test input in normal control-flow
-
updateCoverage
public void updateCoverage()
update coverage: remove all tuples that became invalid after new forbidden combination was added tochecker
-
getNumberOfCoveredCombinationsByTestInput
public long getNumberOfCoveredCombinationsByTestInput(int[] testInput)
- Parameters:
testInput
- combination to compute covered t-tuples for- Returns:
- number of t-tuples covered by given combination
-
getParameterValuePairCoveringMostCombinations
public ParameterValuePair getParameterValuePairCoveringMostCombinations(Set<ParameterValuePair> forbiddenPairs)
- Parameters:
forbiddenPairs
- parameter-value paris to be excluded from search of optimal pair- Returns:
- parameter-value pair covering most uncovered t-tuples
-
-