,h      !"#$%&'()*+,-./0123456789:;<=>?@ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g NoneE)simple wrapper for adding a % at the end.join lines togethermake lists into lines in text.convenience function for debug&Capture output and err of an IO action0Capture output and err of an IO action to a fileRedirect out and err to handleNoneHMFMutation operation representing translation from one fn to another fn. 8MuOp constructor used to specify mutation transformationh1Apply the given function on the tuple inside MuOp  The function   applies on a MuOP7 determining if transformation is between same values. A wrapper over mkMpiShow a specified mutation  The function  O pairs up the given element with all elements of the second list, and applies  on them.  The function  S pairs up all elements of first list with all elements of second list and applies  between them. The function  accepts two values, and returns a function that if given a value equal to first, returns second we handle x ~~> x separatelyjGuardedRhs instance for MutablekLiteral instance for MutablelExp instance for MutablemExp instance for MutablenQOp instance for MutableoQName instance for MutablepName instance for MutableqMuOp instance for Show rstuvwxh i jklmnopq     xwvutsrh i jklmnopqNoneHMTapply a mutating function on a piece of code one at a time like somewhere (from so) The function  does two filters. For the first, it removes spurious transformations like "Int 1 ~~> Int 1". Secondly, it tries to apply the transformation to the given program on some element if it does not succeed, then we discard that transformation.None*Datatype to hold results of the entire runThe number of mutants tested<The number of mutants that were alive after the mutation run&The number of mutants that were killed!The number of non-viable mutants.&The show instance for MAnalysisSummaryNone+ /Interface to be implemented by a test framework(Summary of test suite on a single mutantWas the test run a successWas the test run a failure*Was the test run neither (gaveup/timedout)Summary of test runHolding test information Holding mutant information!Wrapper for interpreter output  !"#$  !"#$ !"#$  !"#$ Safe-Inferred %The %+ function generates subsets of a given size&The &Q function produces all possible pairings, and applies the given function to each'The 'V function replaces first matching element in a list given old and new values as a pair(The (U function takes a random generator and chooses a random sample subset of given size.)/Wrapper around sample providing the random seed*The *` function takes a random generator, and a fraction and returns subset of size given by fraction+The +8 function removes element at index specified from a list,The ,: function swaps two elements in a list given their indices-The -J generates a list of lists where each element has been swapped by another.%Generate a random seed from the time./Otake a function of two args producing a monadic result, and apply it to a pair0 A simple hash %&'()*+,-./0 %&'()*+,-./0 %&'()*+,-./0 %&'()*+,-./0None+EU 14Data type to hold results of a single test execution2AUndetermined - we will treat it as killed as it is not a success.3The mutant was kileld4The mutant was alive5 Capture the error if one occured6GGiven the list of tests suites to check, run the test suite on mutants.7The 7B function evaluates the results of a test run using the supplied  and  testSummaryFn functions from the adapters8Run all tests on a mutantyRStop mutant runs at the first sign of problems (invalid mutants or test failure).9Run one single test on a mutant:XGiven the filename, modulename, test to evaluate, evaluate, and return result as a pair. et = I.runInterpreter (evalMethod "Examples/QuickCheckTest.hs" "quickCheckResult idEmp")z7Summarize the entire run. Passed results are per mutant 123456The summary functionThe mutants to be evaluated)The tests to be used by mutation analysisAReturns a tuple of full run summary and individual mutant summary7The summary functionTests we used to run analysis5The mutant and its corresponding output of test runs.+Returns a summary of the run for the mutant8The tests to be usedMutant being testedReturns the result of test runsy?The function that given a test, runs it, and returns the resultThe tests to be runXReturns the output of all tests. If there is an error, then it will be at the last test.9>The mutant _file_ that we have to evaluate (_not_ the content)CThe file where we will write the stdout and stderr during the run. The test to be run$Returns the output of given test run:The mutant _file_ to loadThe test to be run=Returns the monadic computation to be run by I.runInterpreterzThe list of tests we used'The test ouput (per mutant, (per test))#Returns the full summary of the run 123456789: 6:8971543215432678y9:zNone;all available operators<comparison operators [" ","", " =","=", "/=", "=="]all available operators=!predicates ["pred", "id", "succ"]all available operators>&binary arithmetic ["+", "-", "*", "/"]all available operators?Kfunctions on lists ["sum", "product", "maximum", "minimum", "head", "last"]all available operators{'wrapper to produce Function from String;<=>?{;<=>?<=>?;;<=>?{ None @+Enumeration of different kinds of mutationsEThe configuration options if 1 is provided, all mutants are selected for that kind, and 0 ensures that no mutants are picked for that kind. Any fraction in between causes that many mutants to be picked randomly from the available poolG6Mutation operators on operator or function replacementH2Mutate pattern matches for functions? for example 'first [] = Nothing first (x:_) = Just x is mutated to 'first (x:_) = Just x first [] = NothingIAMutates integer values by +1 or -1 or by replacing it with 0 or 1Jnegate if conditions, that is if True then 1 else 0becomes if True then 0 else 1K.negate guarded booleans in guarded definitions 1myFn x | x == 1 = True myFn | otherwise = Falsebecomes 7myFn x | not (x == 1) = True myFn | otherwise = FalseL&Maximum number of mutants to generate.MaGeneration mode, can be traditional (firstOrder) and higher order (higher order is experimental)N5The knob controlling if we want first order mutation.QThe default configurationRMgetSample returns the fraction in config corresponding to the enum passed in@ABCDEFGHIJKLMNOPQR@ABCDEFGHIJKLMNOPQRNPOEFGHIJKLMQ@DCBAR@DCBAEFGHIJKLMNPOQR NoneHIMSThe SD function is a wrapper to genMutantsWith with standard configuratonTThe T function takes configuration function to mutate, function to mutate, filename the function is defined in, and produces mutants in the same directory as the filename, and returns the number of mutants produced.U_Wrapper around sampleF that returns correct sampling ratios according to configuration passed.VThe V takes the function name to mutate, source where it is defined, and a sampling function, and returns the mutated sources selected using sampling function.W9Replace old function definition with a new one in the ASTX)Fetch the function definition from moduleYHigher order mutation of a function's code using a bunch of mutation operators (In all the three mutate functions, we assume working with functions declaration.)ZgFirst and higher order mutation. The third argument specifies whether it's first order or higher order[Given a function, generate all mutants after applying applying op once (op might be applied at different places). E.g.: if the operator is (op = " "==e ">") and there are two instances of "<" in the AST, then it will return two AST with each replaced.\9is the parsed expression the function we are looking for?]~Generate all operators for permutating pattern matches in a function. We don't deal with permutating guards and case for now.^UGenerates transformations that removes one pattern match from a function definition._)Generate sub-arrays with one less element`Returns the AST from the fileaSet the declaration in a modulebFor valops, unlike functions, we specify how any given literal value might change. So we take a predicate specifying how to recognize the literal value, a list of mappings specifying how the literal can change, and the AST, and recurse over the AST looking for literals that match our predicate. When we find any, we apply the given list of mappings to them, and produce a MuOp mapping between the original value and transformed value. This list of MuOp mappings are then returned.ctLook for literal values in AST, and return applicable MuOp transforms. Unfortunately booleans are not handled here.dConvert Boolean Literals  (True, False)becomes  (False, True)e&Negating boolean in if/else statements if True then 1 else 0becomes if True then 0 else 1fLNegating boolean in Guards | negate guarded booleans in guarded definitions 1myFn x | x == 1 = True myFn | otherwise = Falsebecomes 7myFn x | not (x == 1) = True myFn | otherwise = FalseS The mutating function under test2The module where the mutating function is declaredReturns the mutants produced.TThe configuration to be usedThe mutating function4The module file where mutating function was declaredReturns the mutants producedU ConfigurationThe random seed-What kind of a mutation are we interested in?'The original list of mutation operators&Returns the sampled mutation operatorsV ConfigurationThe mutating function/The module where mutating function was declaredThe sampling functionReturns the sampled mutantsWXYZ[\]^_`abcdefSTUVWXYZ[\]^_`abcdefSTUVWXYZ[\]^_`abcdefSTUVWXYZ[\]^_`abcdef NonegPerform mutation analysis using any of the test frameworks that support Summarizable (essentially, after running it on haskell, we should be able to distinguish a successful run without failures from one with failures.) E.g. using the mucheck-quickcheck adapter tFn :: Mutant -> TestStr -> InterpreterOutput QuickCheckSummary` tFn = testSummary mucheck tFn "qsort" "Examples/QuickCheckTest.hs" ["quickCheckResult revProp"]g1The summarization function to use on test results;The mutating function we are checking the test adequacy of.8The module file where the mutating function was declared$The tests we can use to kill mutants?Returns a tuple of full summary, and individual mutant results.ggg|   !"#$%&'(()*+,-./0123456789:;<=>?@ABCDEFGHI J K L M N O O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o pqrstuvwxyz{|}~MuCheck-0.3.0.4Test.MuCheck.Utils.PrintTest.MuCheck.MuOpTest.MuCheck.Utils.SybTest.MuCheck.AnalysisSummaryTest.MuCheck.TestAdapterTest.MuCheck.Utils.CommonTest.MuCheck.InterpreterTest.MuCheck.OperatorsTest.MuCheck.ConfigTest.MuCheck.Mutation Test.MuCheck./.showASshowAttcatchOutputStr catchOutputredirectToHandleMutable==>MuOpsamemkMpMuOp==>**==>*~~>once relevantOpsMAnalysisSummary _maNumMutants_maAlive _maKilled _maErrors$fShowMAnalysisSummary Summarizable testSummary isSuccess isFailureisOtherSummaryTestStrMutantInterpreterOutputIo_io_ioLogchoosecoupling replaceFstsamplerSamplesampleFremEltswapElts genSwapped genRandomSeedcurryMhash MutantSummary MSumOther MSumKilled MSumAlive MSumErrorevaluateMutantssummarizeResults evalMutantevalTest evalMethodallOps comparatorspredNums binAriths arithListsMuVarsMutateNegateGuardsMutateNegateIfElse MutateValuesMutatePatternMatchConfigmuOpsdoMutatePatternMatchesdoMutateValuesdoNegateIfElsedoNegateGuards maxNumMutantsgenModeGenerationModeFirstAndHigherOrderFirstOrderOnly defaultConfig getSample genMutantsgenMutantsWithsamplergenMutantsForSrc replaceDefgetFuncmutatesmutatesNmutate isFunctionD permMatchesremoveOnePMatch removeOneElem getASTFromStrputDecls selectValOps selectLitOps selectBLitOpsselectIfElseBoolNegOpsselectGuardedBoolNegOpsmucheckapplyshowM$fMutableGuardedRhs$fMutableLiteral $fMutableDecl $fMutableExp $fMutableQOp$fMutableQName $fMutableName $fShowMuOpGLDEQOQNNstopFast fullSummaryvarfn