MuCheck-0.1.2.2: Automated Mutation Testing

Safe HaskellNone
LanguageHaskell2010

MuCheck.Mutation

Synopsis

Documentation

genMutants :: String -> FilePath -> IO Int Source

The genMutants function is a wrapper to genMutantsWith with standard configuraton

genMutantsWith :: Config -> String -> FilePath -> IO Int Source

The genMutantsWith function takes configuration 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.

mutates :: [MuOp] -> Decl -> [Decl] Source

Mutating a function's code using a bunch of mutation operators (In all the three mutate functions, we assume working with functions declaration.)

mutatesN :: [MuOp] -> Decl -> Int -> [Decl] Source

mutate :: MuOp -> Decl -> [Decl] Source

Given a function, generate all mutants after applying applying op once (op might be applied at different places).E.g.: op = "== ">" and there are two instances of "<"

permMatches :: Decl -> [MuOp] Source

Generate all operators for permutating pattern matches in a function. We don't deal with permutating guards and case for now.

removeOneElem :: Eq t => [t] -> [[t]] Source

parseModuleFromFile :: String -> Module Source

Parse a module. Input is the content of the file

selectValOps :: (Data a, Eq a, Typeable b, Mutable b, Eq b) => (b -> Bool) -> [b -> b] -> a -> [MuOp] Source

selectValOps' :: (Data a, Eq a, Typeable b, Mutable b) => (b -> Bool) -> (b -> [b]) -> a -> [MuOp] Source

selectIntOps :: (Data a, Eq a) => a -> [MuOp] Source

selectIfElseBoolNegOps :: (Data a, Eq a) => a -> [MuOp] Source

negating boolean in if/else statements

selectGuardedBoolNegOps :: (Data a, Eq a) => a -> [MuOp] Source

negating boolean in Guards