h$>5^      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmn o p q r s t u v w x y z { | } ~                                                (c) 2015-2017 Rudy Matela$3-Clause BSD (see the file LICENSE) Rudy Matela None fitspecThis typeclass is similar to . A type is  when there exists a function that is able to list mutations of a value. Ideally: list all possible values without repetitions.#Instances are usually defined by a  function that given a value, returns tiers of mutants of that value: the first tier contains the equivalent mutant, of size 0, the second tier contains mutants of size 1, the third tier contains mutants of size 2, and so on.?The equivalent mutant is the actual function without mutations.The size of a mutant is given by the sum of: the number of mutated points (relations) and the sizes of mutated arguments and results.1To get only inequivalent mutants, just take the  of either  or :  tail mutants  tail mutiersGiven that the underlying  enumeration has no repetitions, parametric instances defined in this file will have no repeated mutants.fitspecImplementation of  for non-functional data types. Use this to create instances for user-defined data types, e.g.: +instance MyData where mutiers = mutiersEqand for parametric datatypes: =instance (Eq a, Eq b) => MyDt a b where mutiers = mutiersEq Examples: mutiersEq True = [[True], [False]] mutiersEq 2 = [[2], [0], [1], [], [3], [4], [5], [6], [7], [8], [9], ...] mutiersEq [1] = [[[1]], [[]], [[0]], [[0,0]], [[0,0,0],[0,1],[1,0],[-1]], ...]fitspec .mutants (0,1) = [(0,1),(0,0),(1,1),(0,-1),...] fitspec mutants not = [ not , \p -> case p of False -> False; _ -> not p , \p -> case p of True -> True; _ -> not p , \p -> case p of False -> False; True -> True ]fitspec (mutants (Just 0) = [Just 0, Nothing, ...fitspec (mutants [0] = [ [0], [], [0,0], [1], ...fitspec mutants True = [True,False]fitspec #mutants 3 = [3,0,1,2,4,5,6,7,8,...]fitspec mutants () = [()](c) 2015-2017 Rudy Matela$3-Clause BSD (see the file LICENSE) Rudy Matela None }(c) 2015-2017 Rudy Matela$3-Clause BSD (see the file LICENSE) Rudy Matela  Safe-Inferredfitspec.Appends two Strings side by side, line by line =beside ["asdf\nqw\n","zxvc\nas"] == "asdfzxvc\n\ \qw as\n" fitspecAppend two Strings on top of each other, adding line breaks *when needed*.!fitspecShow elements of a list as a tuple. If there are multiple lines in any of the strings, tuple is printed multiline. showTuple ["asdf\nqwer\n","zxvc\nasdf\n"] == "( asdf\n\ \ qwer\n\ \, zxvc\n\ \ asdf )\n" *showTuple ["asdf","qwer"] == "(asdf,qwer)""fitspec(Formats a table using a given separator. table " " [ ["asdf", "qwer", "zxvc\nzxvc"] , ["0", "1", "2"] , ["123", "456\n789", "3"] ] == "asdf qwer zxvc\n\ \ zxvc\n\ \0 1 2\n\ \123 456 3\n\ \ 789\n\"#fitspec,Given a separator, format strings in columns columns " | " ["asdf", "qw\nzxcv", "as\ndf"] == "asdf | qw | as\n\ \ | zxcv | df\n" !"#$ !"#$(c) 2015-2017 Rudy Matela$3-Clause BSD (see the file LICENSE) Rudy Matela None<%fitspec(Show) Structure of a mutant. This format is intended for processing then pretty-printing.&fitspecTypes that can have their mutation shown. Has only one function ' that returns a simple AST (%:) representing the mutant. A standard implementation of ' for  types is given by ,.(fitspec$Show a Mutant as a tuple of lambdas. > putStrLn $ showMutantAsTuple ["p && q","not p"] ((&&),not) ((||),id) ( \p q -> case (p,q) of (False,False) -> True _ -> p && q , \p -> case p of False -> False True -> True _ -> not p )Can be easily copy pasted into an interactive session for manipulation. On GHCi, use :{ and :}1 to allow multi-line expressions and definitions.)fitspecShow a Mutant as the list of bindings that differ from the original function(s). > putStrLn $ showMutantBindings ["p && q","not p"] ((&&),not) ((==),id) False && False = True not False = False not True = TrueCan possibly be copied into the source of the original function for manipulation.*fitspecShow a Mutant as a new complete top-level definition, with a prime appended to the name of the mutant. > putStrLn $ showMutantDefinition ["p && q","not p"] ((&&),not) ((==),id) False &&- False = True p &&- q = p && q not' False = False not' True = True not' p = not p+fitspec=Show a Mutant as a tuple of nested lambdas. Very similar to (, but the underlying data structure is not flatten: so the output is as close as possible to the underlying representation.,fitspecFor a given type Type instance of Eq and Show, define the & instance as: 5instance ShowMutable Type where mutantS = mutantSEq %&'()*+,- &',(+*)%-(c) 2015-2017 Rudy Matela$3-Clause BSD (see the file LICENSE) Rudy Matela NoneBfitspecDerives , & and (optionally)  instances for a given type .Consider the following Stack datatype: (data Stack a = Stack a (Stack a) | EmptyWriting deriveMutable ''Stack)will automatically derive the following ,  and & instances: instance Listable a => Listable (Stack a) where tiers = cons2 Stack \/ cons0 Empty instance (Eq a, Listable a) => Mutable a where mutiers = mutiersEq instance (Eq a, Show a) => ShowMutable a where mutantS = mutantSEqIf a 4 instance already exists, it is not derived. (cf.: ) Needs the TemplateHaskell extension.Dfitspec,Derives a Mutable instance for a given type 1 using a given context for all type variables.%&'()*+,-BCDEBDCE(c) 2015-2017 Rudy Matela$3-Clause BSD (see the file LICENSE) Rudy Matela None(c) 2015-2017 Rudy Matela$3-Clause BSD (see the file LICENSE) Rudy Matela Noneq(c) 2015-2017 Rudy Matela$3-Clause BSD (see the file LICENSE) Rudy Matela None ^fitspec'Compose composed with compose operator. (f ... g) x y === f (g x y)afitspeca bs5 returns all compositions formed by taking values of bsbfitspecb xs9 returns the list of sublists formed by taking values of xscfitspecNone&]xfitspecA line of result for a single equivalence class of properties with the exact same surviving mutants.zfitspec&property-sets in the equivalence class{fitspec properties implied by this class|fitspeclist of surviving mutants}fitspec!smallest surviving mutant, if any~fitspecnumber of surviving mutantsfitspecnumber of killed mutantsfitspec,total number of mutants generated and testedfitspec#percentage of killed mutants, 0-100fitspec,Requested number of tests (same for all rs.)fitspecmutants were exhaustedfitspecAn encoded representation of a property suitable for use by FitSpec.Each list of strings is a printable representation of one possible choice of argument values for the property. Each boolean indicate whether the property holds for this choice.fitspecGiven a  type (as defined by Test.LeanCheck ), returns a .This function should be used on every property to create a property list to be passed to report,  reportWith,  mainDefault or mainWith. 'property $ \x y -> x + y < y + (x::Int)fitspec1Return minimality and completeness results. See report.%nopqrstuvwxyz{|}~%xyz{|}~wnopqrstuv (c) 2015-2017 Rudy Matela$3-Clause BSD (see the file LICENSE) Rudy Matela None.fitspec$Extra arguments / configuration for  . See  for default values.fitspec'(starting) number of function mutationsfitspec1(starting) number of test values (for each prop.)fitspectimeout in seconds, 0 for just  * fitspecnames of functions: ["foo x y","goo x y"]fitspec whether to show detailed resultsfitspechow to show mutantsfitspec#number of surviving mutants to showfitspec'ignored argument (user defined meaning)fitspec'How to show mutants. Use this to fill .fitspecDefault arguments for :nMutants = 500, start with 500 mutants nTests = 1000, start with 1000 test values timeout = 5, keep incresing the number of mutants until 5 seconds elapse names = []!, default function call template: &["f x y z", "g x y z", "h x y z", ...]fitspecNon timed-out default arguments. Make conjectures based on a fixed number of mutants and tests, e.g.: #reportWith (fixargs 100 200) f pmapThis is just a shorthand, see: fixargs nm nt = args { nMutants = nm, nTests = nt, timeout = 0 } (fixargs nm nt) { nMutants = 500, nTests = 1000, timeout = 5 } = argsfitspecReport results generated by FitSpec. Uses standard configuration (see ). Needs a function to be mutated and a property map. Example (specification of boolean negation): properties not = [ property $ \p -> not (not p) == p , property $ \p -> not (not (not p)) == not p ] main = report not propertiesfitspecSame as  but can be configured via  ( or  ), e.g.: /reportWith args { timeout = 10 } fun propertiesfitspecSame as , but accepts a list of manually defined (extra) mutants to be tested alongside those automatically generated. (c) 2015-2017 Rudy Matela$3-Clause BSD (see the file LICENSE) Rudy Matela None2308fitspecSame as , but allow overriding of configuration via command line arguments.fitspecSame as 5, but allow configuration via command line arguments. (c) 2015-2018 Rudy Matela$3-Clause BSD (see the file LICENSE) Rudy Matela None0&'()*+,BCDE)&',(*+)BDCE (c) 2015-2017 Rudy Matela$3-Clause BSD (see the file LICENSE) Rudy Matela None5KfitspecGiven a list of pairs of property groups and their implications, return implications between groups (transitive cases are ommitted).fitspecGiven a list of relations, generate a graphviz graph containing those relations. Generate a dotfile from implications between groups.fitspecEquivalent to  but returns a dotfilefitspec4Equivalent to report, but writes a dotfile to a filefitspec4Equivalent to report, but writes a dotfile to stdout !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{ | | } ~                                                                   %fitspec-0.4.10-9hvJk5pPbkOIpTJ3y7BCbFTest.FitSpec.MutableTest.FitSpec.Mutable.TuplesTest.FitSpec.PrettyPrintTest.FitSpec.ShowMutableTest.FitSpec.DeriveTest.FitSpec.ShowMutable.TuplesTest.FitSpec.TestTypesTest.FitSpec.UtilsTest.FitSpec.EngineTest.FitSpec.ReportTest.FitSpec.Main Test.FitSpecTest.FitSpec.DotMutablemutiersmutants mutiersEq$fMutable(,,,,,)$fMutable(,,,,)$fMutable(,,,) $fMutable(,,) $fMutable(,) $fMutable-> $fMutableWord$fMutableOrdering$fMutableDouble$fMutableFloat$fMutableRatio$fMutableEither$fMutableMaybe $fMutable[] $fMutableBool $fMutableChar$fMutableInteger $fMutableInt $fMutable()$fMutable(,,,,,,,,,,,)$fMutable(,,,,,,,,,,)$fMutable(,,,,,,,,,)$fMutable(,,,,,,,,)$fMutable(,,,,,,,)$fMutable(,,,,,,) showQuantityshowEachbesideabove showTupletablecolumns headToUpperMutantS ShowMutablemutantSshowMutantAsTupleshowMutantBindingsshowMutantDefinitionshowMutantNested mutantSEq mutantSTuple$fShowMutable(,,,,,)$fShowMutable(,,,,)$fShowMutable(,,,)$fShowMutable(,,)$fShowMutable(,)$fShowMutable->$fShowMutableWord$fShowMutableOrdering$fShowMutableDouble$fShowMutableFloat$fShowMutableRatio$fShowMutableEither$fShowMutableMaybe$fShowMutable[]$fShowMutableBool$fShowMutableChar$fShowMutableInteger$fShowMutableInt$fShowMutable() $fShowMutantS deriveMutablederiveMutableCascadingderiveMutableEderiveMutableCascadingE$fShowMutable(,,,,,,,,,,,)$fShowMutable(,,,,,,,,,,)$fShowMutable(,,,,,,,,,)$fShowMutable(,,,,,,,,)$fShowMutable(,,,,,,,)$fShowMutable(,,,,,,)$fShowMutableWord4$fShowMutableWord3$fShowMutableWord2$fShowMutableWord1$fShowMutableInt4$fShowMutableInt3$fShowMutableInt2$fShowMutableInt1$fShowMutableNat$fMutableWord4$fMutableWord3$fMutableWord2$fMutableWord1 $fMutableInt4 $fMutableInt3 $fMutableInt2 $fMutableInt1 $fMutableNat...uncurry3count compositionssubsets containedcontainsfilterUsortOnsortAndGroupOnsortGroupAndCollapsesortAndGroupFstBySndtakeWhileIncreasingtakeWhileIncreasingOn lastTimeout*** ConjectureisEqisImcleftcrightcscorecnKilled cnSurvivorsResultsResultsetsimplied survivorssmallestSurvivor nSurvivorsnKilled totalMutantsscoremaxTestsmutantsExhaustedPropertypropertypropertiesToMappropertiesHold propertiesCEpropertiesNTestspropertiesTestsExhaustedfilterNonCanonreduceImplications getResultsgetResultsExtragetResultsExtraTimeoutminimalcomplete conjectures$fShowConjectureArgsnMutantsnTeststimeoutnamesverbose showMutantAsrowsextra ShowMutantAsTuple NestedTuple DefinitionBindingsargsfixargsreport reportWithreportWithExtra getArgsWithgetArgsmainWith defaultMain $fDataArgs$fDataShowMutantAs%leancheck-0.9.6-3Yykg1cPQjH4vu6hMnjzbTest.LeanCheck.CoreListablebaseGHC.Listtailghc-prim GHC.ClassesEqtemplate-haskellLanguage.Haskell.TH.SyntaxNameTest.LeanCheck.DerivederiveListableTest.LeanCheck.Tiers listsOfLengthsetsOfbagsOf noDupListsOf normalizeTdeleteTproductslistsOfproductMaybeWith product3With noDupListConsmapConssetConsbagConsTest.LeanCheck.IOcheckResultFor checkResultcheckForcheckderiveListableCascadingTest.LeanCheck.Basic addWeightofWeightcons12cons11cons10cons9cons8cons7cons6==>existsfailsholdswitness witnessescounterExamplecounterExamplesresults productWith><\\//\/+|suchThatresetdelaycons5cons4cons3cons2cons1cons0 concatMapTconcatTfilterTmapT tiersFloatingtiersFractional listIntegraltoTierslisttiersTestableTest.LeanCheck.Utils.TypesInt1unInt1Int2unInt2Int3unInt3Int4unInt4Word1unWord1Word2unWord2Word3unWord3Word4unWord4Natural unNaturalNatunNatNat1unNat1Nat2unNat2Nat3unNat3Nat4unNat4Nat5unNat5Nat6unNat6Nat7unNat7ABCDEFUInt1UInt2UInt3UInt4NoDupBagSetMapXunXXsSpaceunSpaceLowerunLowerUpperunUpperAlphaunAlphaDigitunDigitAlphaNum unAlphaNumLetterunLetterSpacesunSpacesLowersunLowersUppersunUppersAlphasunAlphasDigitsunDigits AlphaNums unAlphaNumsLetters unLettersgroupImplicationsgenDotfileFromGI getDotfile writeDotfile putDotfile isObviousattachObviousness