P4C
The P4 Compiler
Loading...
Searching...
No Matches
path_selection.h
1#ifndef BACKENDS_P4TOOLS_MODULES_TESTGEN_CORE_SYMBOLIC_EXECUTOR_PATH_SELECTION_H_
2#define BACKENDS_P4TOOLS_MODULES_TESTGEN_CORE_SYMBOLIC_EXECUTOR_PATH_SELECTION_H_
3
4#include <set>
5
6namespace P4::P4Tools::P4Testgen {
7
8enum class PathSelectionPolicy {
9 DepthFirst,
10 RandomBacktrack,
11 GreedyStmtCoverage,
12};
13
14inline bool requiresLookahead(PathSelectionPolicy &pathSelectionPolicy) {
15 static const std::set LOOKAHEAD_STRATEGYIES = {PathSelectionPolicy::GreedyStmtCoverage};
16 return LOOKAHEAD_STRATEGYIES.find(pathSelectionPolicy) != LOOKAHEAD_STRATEGYIES.end();
17}
18
19} // namespace P4::P4Tools::P4Testgen
20
21#endif /* BACKENDS_P4TOOLS_MODULES_TESTGEN_CORE_SYMBOLIC_EXECUTOR_PATH_SELECTION_H_ */