SearchCorpus
Rasuvaeff\PropertyTesting\Runner\SearchCorpus
Interface — Package: property-testing-core — Source — Version: v1.0.0-1-g88fdee2
Implemented by: Runner\FilesystemCorpus, Runner\RedisCorpus
The adaptive example database behind targeted search: the best-scoring inputs of every Target label, kept from one run to the next so the search resumes where it got to instead of climbing from scratch every time. A separate optional seam — a Corpus that also implements it keeps the search document apart from the regression document, so an older reader never mistakes a best-scoring input for a regression and never prunes it as one.
Methods
recallTargets()
recallTargets(string $id, list<string> $parameterNames): arrayThe stored best inputs of $id, by label, for the parameters the property currently has. An entry recorded under other parameter names, or a label stored with the opposite direction, is not returned.
$id— The property id.$parameterNames— The property's current parameters, in order.
rememberTargets()
rememberTargets(
string $id,
\Runner\Targets $targets,
list<string> $parameterNames,
): voidReplace the stored best inputs of $id with $targets — the whole document, since the pool it comes from already merged what was recalled.
$id— The property id.$targets— The pool, by label.$parameterNames— The property's current parameters, in order.