T - The type of event in the generated tracespublic abstract class GreedyTraceGenerator<T extends Event> extends TraceGenerator<T>
| Modifier and Type | Field and Description |
|---|---|
protected float |
m_lastCoverage
The coverage obtained the last time
generateTraces() was
called |
protected int |
m_maxIterations
The maximum number of iterations of the algorithm before giving up
|
protected CoverageMetric<T,java.lang.Float> |
m_metric
The coverage metric used to evaluate the generated traces
|
protected int |
m_numCandidates
The number of candidate traces to generate at each pass
|
protected java.util.Random |
m_random
The random number generator used to generate the traces
|
| Constructor and Description |
|---|
GreedyTraceGenerator(java.util.Random random,
CoverageMetric<T,java.lang.Float> metric) |
| Modifier and Type | Method and Description |
|---|---|
abstract Trace<T> |
generateTrace(int length)
Randomly generates a trace of given length
|
TestSuite<T> |
generateTraces()
Generates a set of traces
|
float |
getLastCoverage()
Gets the coverage obtained the last time
generateTraces() was
called |
int |
pickLength()
Chooses a length for a trace to be generated
|
void |
setMaxIterations(int iterations)
Sets the maximum number of iterations of the algorithm before giving up
|
protected final java.util.Random m_random
protected final CoverageMetric<T extends Event,java.lang.Float> m_metric
protected int m_numCandidates
protected int m_maxIterations
protected float m_lastCoverage
generateTraces() was
calledpublic GreedyTraceGenerator(java.util.Random random,
CoverageMetric<T,java.lang.Float> metric)
public void setMaxIterations(int iterations)
iterations - The number of iterationspublic float getLastCoverage()
generateTraces() was
calledpublic TestSuite<T> generateTraces()
TraceGeneratorgenerateTraces in class TraceGenerator<T extends Event>public int pickLength()
Copyright © Sylvain HallĂ©. All Rights Reserved.