Class CoverageMap


  • public class CoverageMap
    extends Object
    Coverage Map storing all uncovered t-tuples.
    • Constructor Detail

      • CoverageMap

        public CoverageMap​(int[] parameterSizes,
                           int strength,
                           ConstraintChecker checker)
        Parameters:
        parameterSizes - contains number of possible values for each parameter
        strength - testing strength t
        checker - 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 to checker
      • 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