T - The type of the events in the traces that are generatedpublic class TWayScoringTraceGenerator<T extends Event> extends TraceGenerator<T>
| Modifier and Type | Field and Description |
|---|---|
protected Alphabet<T> |
m_alphabet
The alphabet used
|
protected int |
m_maxIterations
The maximum number of iterations of the algorithm, in case it does not
succeed at achieving total coverage
|
protected int |
m_numCandidates
The number of candidate tests to generate at each iteration
|
protected java.util.Random |
m_random
A random number generator used to generate the random events
|
protected int |
m_strength
The strength of the test suite (i.e.
|
| Constructor and Description |
|---|
TWayScoringTraceGenerator(Alphabet<T> alphabet,
int strength,
java.util.Random random)
Creates a new trace generator
|
| Modifier and Type | Method and Description |
|---|---|
protected int |
countCoveredCombinations(java.util.Map<java.util.Vector<T>,java.lang.Boolean> combinations)
Computes the number of covered combinations in the present map
(i.e.
|
TestSuite<T> |
generateTraces()
Generates a set of traces
|
protected java.util.Set<java.util.Vector<T>> |
getCombinations()
Gets the set of all combinations of t events
|
protected java.util.Set<java.util.Vector<T>> |
getCombinations(Trace<T> trace)
Gets the combinations of events contained in the current trace
|
protected java.util.Set<java.util.Vector<T>> |
getCombinations(Trace<T> trace,
java.util.Vector<T> current,
int j,
int n)
Gets the combinations of events contained in the current trace
|
protected java.util.Set<java.util.Vector<T>> |
getCombinations(java.util.Vector<T> prefix,
Alphabet<T> remaining,
int n)
Gets the set of all combinations of t events
|
protected Trace<T> |
getRandomTrace()
Generates a random trace composed of all elements of the alphabet
|
protected int m_strength
protected int m_numCandidates
protected int m_maxIterations
protected java.util.Random m_random
public TestSuite<T> generateTraces()
TraceGeneratorgenerateTraces in class TraceGenerator<T extends Event>protected int countCoveredCombinations(java.util.Map<java.util.Vector<T>,java.lang.Boolean> combinations)
true)combinations - The map of combinationsprotected Trace<T> getRandomTrace()
protected java.util.Set<java.util.Vector<T>> getCombinations()
protected java.util.Set<java.util.Vector<T>> getCombinations(java.util.Vector<T> prefix, Alphabet<T> remaining, int n)
prefix - remaining - n - protected java.util.Set<java.util.Vector<T>> getCombinations(Trace<T> trace)
trace - The traceprotected java.util.Set<java.util.Vector<T>> getCombinations(Trace<T> trace, java.util.Vector<T> current, int j, int n)
trace - The tracecurrent - The current prefix to be consideredn - The number of events remaining to putCopyright © Sylvain HallĂ©. All Rights Reserved.