randoop
Class ForwardGenerator
Object
AbstractGenerator
ForwardGenerator
public class ForwardGenerator
extends AbstractGenerator
Randoop's forward, component-based generator.
| Fields inherited from class AbstractGenerator |
componentManager, currSeq, dump_sequences, executionVisitor, listenerMgr, maxSequences, maxTimeMillis, num_failing_sequences, num_sequences_generated, num_steps, outputTestFilters, outSeqs, statements, timer |
| Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
allSequences
public final Set<Sequence> allSequences
- The set of ALL sequences ever generated, including
sequences that were executed and then discarded.
subsumed_sequences
public Set<Sequence> subsumed_sequences
- Sequences that are used in other sequences (and are thus redundant)
objectCache
protected ObjectCache objectCache
ForwardGenerator
public ForwardGenerator(List<StatementKind> statements,
long timeMillis,
int maxSequences,
ComponentManager componentManager,
IStopper stopper,
RandoopListenerManager listenerManager,
List<ITestFilter> fs)
setObjectCache
public void setObjectCache(ObjectCache newCache)
numSequences
public int numSequences()
- Specified by:
numSequences in class AbstractGenerator
step
public ExecutableSequence step()
- Specified by:
step in class AbstractGenerator
allSequences
public Set<Sequence> allSequences()
processSequence
public void processSequence(ExecutableSequence seq)
- Determines what indices in the given sequence are active. An active index i
means that the i-th method call creates an interesting/useful value that
can be used as an input to a larger sequence; inactive indices are never
used as inputs. The effect of setting active/inactive indices is that the
SequenceCollection to which the given sequences is added only considers the
active indices when deciding whether the sequence creates values of a given
type.
In addition to determining active indices, this method determines if any
primitive values created during execution of the sequence are new values
not encountered before. Such values are added to the component manager so
they can be used during subsequent generation attempts.
randoopConsistencyTest2
protected void randoopConsistencyTest2(Sequence newSequence)
randoopConsistencyTests
protected void randoopConsistencyTests(Sequence newSequence)
subsumed_sequences
public Set<Sequence> subsumed_sequences()
- Returns the set of sequences that are used as inputs in other sequences
(and can thus be thought of as subsumed by another sequence).
- Overrides:
subsumed_sequences in class AbstractGenerator