P4C
The P4 Compiler
Loading...
Searching...
No Matches
random_backtrack.h
1#ifndef BACKENDS_P4TOOLS_MODULES_TESTGEN_CORE_SYMBOLIC_EXECUTOR_RANDOM_BACKTRACK_H_
2#define BACKENDS_P4TOOLS_MODULES_TESTGEN_CORE_SYMBOLIC_EXECUTOR_RANDOM_BACKTRACK_H_
3
4#include <vector>
5
6#include "ir/solver.h"
7
8#include "backends/p4tools/modules/testgen/core/program_info.h"
9#include "backends/p4tools/modules/testgen/core/symbolic_executor/symbolic_executor.h"
10
11namespace P4::P4Tools::P4Testgen {
12
18 public:
22 void runImpl(const Callback &callBack, ExecutionStateReference executionState) override;
23
26
27 private:
29 // Each element on this vector represents a set of alternative choices that could have been
37 std::vector<Branch> unexploredBranches;
38
45 [[nodiscard]] std::optional<ExecutionStateReference> pickSuccessor(StepResult successors);
46};
47
48} // namespace P4::P4Tools::P4Testgen
49
50#endif /* BACKENDS_P4TOOLS_MODULES_TESTGEN_CORE_SYMBOLIC_EXECUTOR_RANDOM_BACKTRACK_H_ */
Provides a higher-level interface for an SMT solver.
Definition solver.h:24
Stores target-specific information about a P4 program.
Definition core/program_info.h:21
Definition random_backtrack.h:17
void runImpl(const Callback &callBack, ExecutionStateReference executionState) override
Definition random_backtrack.cpp:36
Definition symbolic_executor.h:21
const ProgramInfo & programInfo
Target-specific information about the P4 program.
Definition symbolic_executor.h:62
AbstractSolver & solver
The SMT solver backing this executor.
Definition symbolic_executor.h:65
std::function< bool(const FinalState &)> Callback
Definition symbolic_executor.h:36