Safe Haskell | None |
---|---|
Language | Haskell2010 |
- genMutants :: String -> FilePath -> IO Int
- genMutantsWith :: Config -> String -> FilePath -> IO Int
- mutates :: [MuOp] -> Decl -> [Decl]
- mutatesN :: [MuOp] -> Decl -> Int -> [Decl]
- mutate :: MuOp -> Decl -> [Decl]
- isFunctionD :: String -> Decl -> Bool
- permMatches :: Decl -> [MuOp]
- removeOnePMatch :: Decl -> [MuOp]
- removeOneElem :: Eq t => [t] -> [[t]]
- parseModuleFromFile :: String -> Module
- getDecls :: Module -> [Decl]
- putDecls :: Module -> [Decl] -> Module
- selectValOps :: (Data a, Eq a, Typeable b, Mutable b, Eq b) => (b -> Bool) -> [b -> b] -> a -> [MuOp]
- selectValOps' :: (Data a, Eq a, Typeable b, Mutable b) => (b -> Bool) -> (b -> [b]) -> a -> [MuOp]
- selectIntOps :: (Data a, Eq a) => a -> [MuOp]
- selectIfElseBoolNegOps :: (Data a, Eq a) => a -> [MuOp]
- selectGuardedBoolNegOps :: (Data a, Eq a) => a -> [MuOp]
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.)
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 "<"
isFunctionD :: String -> Decl -> Bool Source
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.
removeOnePMatch :: Decl -> [MuOp] Source
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