public class DefUseCoverageFactory extends AbstractFitnessFactory<DefUseCoverageTestFitness>
DefUseCoverageFactory class.
goalComputationTime| Constructor and Description |
|---|
DefUseCoverageFactory() |
| Modifier and Type | Method and Description |
|---|---|
static void |
clear() |
static void |
computeGoals()
Determines all goals that need to get covered in order to fulfill
DefUseCoverage
Those are the following: - for each parameterUse this method creates a
goal trying to cover i - for each duPair with a definition clear path
inside the methods of the CUT a goal is created - for each definition in
the CUT with a clear path to an exit of its method and each use with a
clear path from its methods entry a goal is created
|
static DefUseCoverageTestFitness |
createGoal(BytecodeInstruction def,
BytecodeInstruction use,
DefUseCoverageTestFitness.DefUsePairType type)
Convenience method that retrieves the Definition and Use object for the
given BytecodeInstructions from the DefUsePool and calls
createGoal(Definition,Use)
|
static DefUseCoverageTestFitness |
createGoal(Definition def,
Use use,
DefUseCoverageTestFitness.DefUsePairType type)
Given a definition and a use, this method creates a DefUseCoverageGoal
for this DefUsePair.
|
static boolean |
detectAliasingGoals(List<ExecutionResult> results) |
List<DefUseCoverageTestFitness> |
getCoverageGoals()
Generate a list of goals to cover
|
static List<DefUseCoverageTestFitness> |
getDUGoals()
getDUGoals
|
static int |
getInterMethodGoalsCount()
getInterMethodGoalsCount
|
static int |
getIntraClassGoalsCount()
getIntraClassGoalsCount
|
static int |
getIntraMethodGoalsCount()
getIntraMethodGoalsCount
|
static Set<DefUseCoverageTestFitness> |
getParameterGoals()
For each parameterUse in the CUT this method creates a
DefUseCoverageTestFitness that tries to cover that use
|
static int |
getParamGoalsCount()
getParamGoalsCount
|
static Set<Definition> |
getRegisteredDefinitions()
getRegsiteredDefinitions
|
static Map<Use,DefUseCoverageTestFitness> |
getRegisteredGoalsForDefinition(Definition def)
getRegisteredGoalsForDefinition
|
static DefUseCoverageTestFitness |
retrieveGoal(Definition def,
Use use)
retrieveGoal
|
static DefUseCoverageTestFitness |
retrieveGoal(int defId,
int useId)
retrieveGoal
|
getFitness, isCUTpublic static List<DefUseCoverageTestFitness> getDUGoals()
getDUGoals
List object.public List<DefUseCoverageTestFitness> getCoverageGoals()
List object.public static void computeGoals()
public static DefUseCoverageTestFitness createGoal(Definition def, Use use, DefUseCoverageTestFitness.DefUsePairType type)
def - The definition of the goaluse - The use of the goaltype - a
DefUseCoverageTestFitness.DefUsePairType
object.public static DefUseCoverageTestFitness createGoal(BytecodeInstruction def, BytecodeInstruction use, DefUseCoverageTestFitness.DefUsePairType type)
def - a BytecodeInstruction object.use - a BytecodeInstruction object.type - a
DefUseCoverageTestFitness.DefUsePairType
object.DefUseCoverageTestFitness
object.public static DefUseCoverageTestFitness retrieveGoal(int defId, int useId)
retrieveGoal
defId - a int.useId - a int.DefUseCoverageTestFitness
object.public static DefUseCoverageTestFitness retrieveGoal(Definition def, Use use)
retrieveGoal
def - a Definition object.use - a Use object.DefUseCoverageTestFitness
object.public static Set<DefUseCoverageTestFitness> getParameterGoals()
Set object.public static Set<Definition> getRegisteredDefinitions()
getRegsiteredDefinitions
Set object.public static Map<Use,DefUseCoverageTestFitness> getRegisteredGoalsForDefinition(Definition def)
getRegisteredGoalsForDefinition
def - a Definition object.Map object.public static int getParamGoalsCount()
getParamGoalsCount
public static int getIntraMethodGoalsCount()
getIntraMethodGoalsCount
public static int getInterMethodGoalsCount()
getInterMethodGoalsCount
public static int getIntraClassGoalsCount()
getIntraClassGoalsCount
public static void clear()
public static boolean detectAliasingGoals(List<ExecutionResult> results)
Copyright © 2010–2017 EvoSuite. All rights reserved.