Files
fail/tools/prune-trace/FESamplingPruner.hpp
Horst Schirmeier a1e3b31cd5 prune-trace: sample from known results
The --use-known-results switch simulates sampling (with fault
expansion, FESamplingPruner) by reusing results from a previous
campaign covering the full fault space (that used the "basic" pruner).
The pruner only creates entries in the "fspgroup" table that refer to
already existing pilots and corresponding results.

This switch is not for normal Fail* use, but only for experimenting
with the FESamplingPruner.

Change-Id: I1bf561d93f55918d243c5306551a1c6b48027198
2015-01-21 00:09:37 +01:00

39 lines
1.1 KiB
C++

#ifndef __FESAMPLING_PRUNER_H__
#define __FESAMPLING_PRUNER_H__
#include "Pruner.hpp"
#include "util/CommandLine.hpp"
///
/// FESamplingPruner: implements sampling with Fault Expansion
///
/// The FESamplingPruner implements the fault-expansion variance reduction
/// technique (FE-VRT) as described in: Smith, D. Todd and Johnson, Barry W.
/// and Andrianos, Nikos and Profeta, III, Joseph A., "A variance-reduction
/// technique via fault-expansion for fault-coverage estimation" (1997),
/// 366--374.
///
class FESamplingPruner : public Pruner {
fail::CommandLine::option_handle SAMPLESIZE;
fail::CommandLine::option_handle USE_KNOWN_RESULTS;
unsigned m_samplesize;
bool m_use_known_results;
public:
FESamplingPruner() : m_samplesize(0), m_use_known_results(false) { }
virtual std::string method_name() { return "FESampling"; }
virtual bool commandline_init();
virtual bool prune_all();
void getAliases(std::deque<std::string> *aliases) {
aliases->push_back("FESamplingPruner");
aliases->push_back("sampling");
}
private:
bool sampling_prune(const fail::Database::Variant& variant);
};
#endif