P4C
The P4 Compiler
Loading...
Searching...
No Matches
depth_first.h
1#ifndef BACKENDS_P4TOOLS_MODULES_TESTGEN_CORE_SYMBOLIC_EXECUTOR_DEPTH_FIRST_H_
2#define BACKENDS_P4TOOLS_MODULES_TESTGEN_CORE_SYMBOLIC_EXECUTOR_DEPTH_FIRST_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_DEPTH_FIRST_H_ */
Provides a higher-level interface for an SMT solver.
Definition solver.h:24
Definition depth_first.h:17
DepthFirstSearch(AbstractSolver &solver, const ProgramInfo &programInfo)
Constructor for this strategy, considering inheritance.
Definition depth_first.cpp:19
void runImpl(const Callback &callBack, ExecutionStateReference executionState) override
Definition depth_first.cpp:41
Stores target-specific information about a P4 program.
Definition core/program_info.h:21
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