!®      !"#$%&'()*+,-./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 <rudy@matela.com.br>None1! 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 j 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]], ...]fitspecTMutate a function at a single point. The following two declarations are equivalent: id' = id `mut` (0,1) id' 0 = 1 id' x = xfitspec$Mutate a function at several points. Ff `mutate` [(x,a),(y,b),(z,c)] = f `mut` (x,a) `mut` (y,b) `mut` (z,c)fitspecReturn tiers of possible mutations for a single point of a function. If the function is undefined at that point, no mutations are provided. This function does not return the null mutant. E(+1) `mutationsFor` 1 = [ [(1,0)], [(1,1)], [], [(1,3)], [(1,4)], ...fitspecReturns tiers of mutants on a selection of arguments of a function. Will only return the null mutant from an empty selection of arguments.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 <rudy@matela.com.br>None2(c) 2015-2017 Rudy Matela$3-Clause BSD (see the file LICENSE) Rudy Matela <rudy@matela.com.br>SafeJ fitspecbPluralizes a word. Is not comprehensive (and may never be), add missing cases as they are found. Kpluralize "test case" == "test cases" pluralize "property" == "properties"fitspec.Appends two Strings side by side, line by line =beside ["asdf\nqw\n","zxvc\nas"] == "asdfzxvc\n\ \qw as\n" fitspecJAppend two Strings on top of each other, adding line breaks *when needed*.!fitspecvShow elements of a list as a tuple. If there are multiple lines in any of the strings, tuple is printed multiline. bshowTuple ["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"fitspec;Fits a list to a certain width by appending a certain value fit ' ' 6 "str" == "str "  fit 0 6 [1,2,3] == [1,2,3,0,0,0]fitspec:normalize makes all list the same length by adding a value @normalize ["asdf","qw","er"] == normalize ["asdf","qw ","er "]fitspec0Given a list of lists returns the maximum length !"#$ !"#$(c) 2015-2017 Rudy Matela$3-Clause BSD (see the file LICENSE) Rudy Matela <rudy@matela.com.br>Noneu%fitspec[(Show) Structure of a mutant. This format is intended for processing then pretty-printing.&fitspecATypes 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 )VCan be easily copy pasted into an interactive session for manipulation. On GHCi, use :{ and :}1 to allow multi-line expressions and definitions.)fitspecSShow 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 = TrueRCan possibly be copied into the source of the original function for manipulation.*fitspecgShow 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.fitspec>Show a Mutant without providing a default name. An alias for showMutantAsTuple [].fitspec)Default function names (when none given): f g h f' g' h' f'' g'' h''fitspec1Default names in a call (function and variables): )f x y z w x' y' z' w' x'' y'' z'' w'' ...,fitspecFor a given type Type instance of Eq and Show, define the & instance as: 5instance ShowMutable Type where mutantS = mutantSEqfitspec Check if a % is nullfitspec Check if a % is a function.fitspecLShow a nameless mutant. Functions should not (but can) be shown using this.fitspec#Show top-level (maybe tuple) named % as a tuple.fitspecGiven a list with the function and variable names and a list of bindings, show a function as a case expression enclosed in a lambda.fitspecnGiven a list with the function and variable names and a list of bindings, show function binding declarations.The newY boolean argument indicates whether if the function should be shown as a new definition.fitspec?Separate function from variable names in a simple Haskell expr. Sfvarnames "f x y" == ["f","x","y"] fvarnames "aa bb cc dd" == ["aa","bb","cc","dd"]`When there are three lexemes, the function checks for a potential infix operator in the middle. $fvarnames "x + y" == ["(+)","x","y"]%This function always returns a "head" fvarnames "" == ["f"]fitspecApply a function (&) to a list of variables ('[String]').PFor the sake of clarity, in the following examples, double-quotes are omitted: > apply f == f > apply f x == f x > apply f x y == f x y > apply (+) == (+) > apply (+) x == (+) x > apply (+) x y == (+) x y > apply + == (+) > apply + x == (+) x > apply + x y == (x + y) > apply + x y z == (+) x y zfitspec'Check if a function / operator is infix aisInfix "foo" == False isInfix "(+)" == False isInfix "`foo`" == True isInfix "+" == Truefitspec3Transform an infix operator into an infix function: 3toPrefix "`foo`" == "foo" toPrefix "+" == "(+)"fitspecxs +- ys superimposes xs over ys. 1,2,3%+- [0,0,0,0,0,0,0] == [1,2,3,0,0,0,0]x,y,zU+- [a,b,c,d,e,f,g] == [x,y,z,d,e,f,g] "asdf" +- "this is a test" == "asdf is a test" %&'()*+,- &',(+*)%-(c) 2015-2017 Rudy Matela$3-Clause BSD (see the file LICENSE) Rudy Matela <rudy@matela.com.br>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.fitspecgGiven a type name, return the number of arguments taken by that type. Examples in partially broken TH: arity ''Int === Q 0 arity ''Int->Int === Q 0 arity ''Maybe === Q 1 arity ''Either === Q 2 arity ''Int-> === Q 1ZThis works for Data's and Newtype's and it is useful when generating typeclass instances.P%&'()*+,-BCDEBDCE(c) 2015-2017 Rudy Matela$3-Clause BSD (see the file LICENSE) Rudy Matela <rudy@matela.com.br>None(c) 2015-2017 Rudy Matela$3-Clause BSD (see the file LICENSE) Rudy Matela <rudy@matela.com.br>None:D      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJK(c) 2015-2017 Rudy Matela$3-Clause BSD (see the file LICENSE) Rudy Matela <rudy@matela.com.br>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 xscfitspec<Check if all elements of a list is contained in another listefitspeceU filter greater-later elements in a list according to a partial ordering relation. EfilterU (notContained) [[1],[2],[1,2,3],[3,4,5]] == [[1],[2],[3,4,5]]jfitspecTakes values from a list while the values increase. If the original list is non-empty, the returning list will also be non-emptylfitspeclastTimeout s xs will take the last value of xs it is able evaluate before s seconds elapse.^_`abcdefghijklm^_`abcdegihjklfm (c) 2015-2017 Rudy Matela$3-Clause BSD (see the file LICENSE) Rudy Matela <rudy@matela.com.br>NonexfitspecgA 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 exhaustedfitspecDAn 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 .ZThis 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.LfitspecReturns a description of property sets, grouping the ones that had the same surviving mutants. The resulting list is ordered starting with the least surviving mutants to the most surviving mutants. Arguments:is: list of property ids (length is == length (pmap x))pmap: a property mapms.: list of mutants to apply to the property map#Return a list of tuples containing:a list of property setsGa list of mutants paired with booleans indicating whether each survivedMfitspecReturns a description of property sets, grouping the ones that had the same surviving mutants. The resulting list is ordered starting with the least surviving mutants to the most surviving mutants. Arguments:is: list of property ids (length is == length (pmap x))pmap: a property mapms.: list of mutants to apply to the property map#Return a list of tuples containing:a list of property sets9a boolean list indicating whether a given mutant survivedNfitspecnSurv props fs[ returns the number of values that match compositions of properties on the property map.props should be a function from a value to a list of properties that match that value (in the case of functions, functions that "survive" those properties).fs* is a list of values to be mapped over by props 9length (nSurvivors props fs) == 2 ^ (length (props fs))RThis function is otherwise unused in this file. It is just a simpler version of pssurv to serve as documentation.It is also not exported!%nopqrstuvwxyz{|}~%xyz{|}~wnopqrstuv (c) 2015-2017 Rudy Matela$3-Clause BSD (see the file LICENSE) Rudy Matela <rudy@matela.com.br>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 = 5O, 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", ...]fitspecfNon 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: Bfixargs nm nt = args { nMutants = nm, nTests = nt, timeout = 0 } G(fixargs nm nt) { nMutants = 500, nTests = 1000, timeout = 5 } = argsfitspecGReport results generated by FitSpec. Uses standard configuration (see d). 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 q, but accepts a list of manually defined (extra) mutants to be tested alongside those automatically generated.OfitspecSame as N, does not abort if the original function does not follow the property set.Pfitspec%Show conjectures derived from results (c) 2015-2017 Rudy Matela$3-Clause BSD (see the file LICENSE) Rudy Matela <rudy@matela.com.br>None01LfitspecSame as F, but allow overriding of configuration via command line arguments.fitspecSame as 5, but allow configuration via command line arguments. (c) 2015-2017 Rudy Matela$3-Clause BSD (see the file LICENSE) Rudy Matela <rudy@matela.com.br>Nonem      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJK&'()*+,BCDE)&',(*+)BDCE (c) 2015-2017 Rudy Matela$3-Clause BSD (see the file LICENSE) Rudy Matela <rudy@matela.com.br>NoneQfitspecGiven a list of pairs of property groups and their implications, return implications between groups (transitive cases are ommitted).RfitspecGiven a list of relations, generate a graphviz graph containing those relations. Generate a dotfile from implications between groups.SfitspecEquivalent to  but returns a dotfileTfitspec4Equivalent to report, but writes a dotfile to a fileUfitspec4Equivalent to report, but writes a dotfile to stdoutQVWRSTUX !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{ | | } ~                   ! ! " # # $ % % & ' ' ( ) ) * + + , - - . / / 0 1 1 2 3 3 4 5 5 6 7 7 8 9 9 : ; ; < = = > ? ? @ A A B C D E F G G H H I I J J K K L M M N O P Q R S T U V W X YZ$fitspec-0.4.6-C93Ej68iSR85G4CnoHlSpoTest.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.7.2-EPNsNkdnB3GGru5dgPw3paTest.LeanCheck.CoreListablebaseGHC.Listtailmutmutate mutationsFortiersMutantsOn pluralizefit normalize maxLengthghc-prim GHC.ClassesEq showMutantdefaultFunctionNames defaultNames isUnmutated isFunction showMutantSshowMutantSAsTuple showLambda showBindingsfvnamesapplyGHC.BaseStringisInfixtoPrefix+-template-haskellLanguage.Haskell.TH.SyntaxNameTest.LeanCheck.DerivederiveListable typeArityTest.LeanCheck.Tiers listsOfLengthsetsOfbagsOf noDupListsOf normalizeTdeleteTproductslistsOfproductMaybeWith product3With noDupListConsmapConssetConsbagConsTest.LeanCheck.IOcheckResultFor checkResultcheckForcheckderiveListableCascadingTest.LeanCheck.Basic addWeightofWeightcons12cons11cons10cons9cons8cons7cons6==>existsfailsholdswitness witnessescounterExamplecounterExamplesresults productWith><\\//\/+|suchThatresetdelaycons5cons4cons3cons2cons1cons0 concatMapTconcatTfilterTmapTtiersFractional listIntegraltoTierslisttiersTestableTest.LeanCheck.Utils.TypesInt1unInt1Int2unInt2Int3unInt3Int4unInt4Word1unWord1Word2unWord2Word3unWord3Word4unWord4Natural unNaturalNatunNatNat1unNat1Nat2unNat2Nat3unNat3Nat4unNat4Nat5unNat5Nat6unNat6Nat7unNat7UInt1UInt2UInt3UInt4NoDupBagSetMapXunXXs getRawResultsgetRawResults'nSurvreportWithExtra'showConjecturesgroupImplicationsgenDotfileFromGI getDotfile writeDotfile putDotfile isObviousattachObviousness