P4C
The P4 Compiler
Loading...
Searching...
No Matches
targets/bmv2/test_backend.h
1#ifndef BACKENDS_P4TOOLS_MODULES_TESTGEN_TARGETS_BMV2_TEST_BACKEND_H_
2#define BACKENDS_P4TOOLS_MODULES_TESTGEN_TARGETS_BMV2_TEST_BACKEND_H_
3
4#include <functional>
5#include <set>
6#include <string>
7#include <vector>
8
9#include "backends/p4tools/common/lib/model.h"
10#include "backends/p4tools/common/lib/trace_event.h"
11#include "ir/ir.h"
12#include "lib/big_int_util.h"
13
14#include "backends/p4tools/modules/testgen/core/symbolic_executor/symbolic_executor.h"
15#include "backends/p4tools/modules/testgen/lib/execution_state.h"
16#include "backends/p4tools/modules/testgen/lib/test_backend.h"
17#include "backends/p4tools/modules/testgen/lib/test_spec.h"
18#include "backends/p4tools/modules/testgen/targets/bmv2/program_info.h"
19
21
23 private:
28 static const int ZERO_PKT_WIDTH = 32;
29 static const big_int ZERO_PKT_VAL;
30 static const big_int ZERO_PKT_MAX;
32 static const std::set<std::string> SUPPORTED_BACKENDS;
33
34 public:
35 explicit Bmv2TestBackend(const Bmv2V1ModelProgramInfo &programInfo,
36 const TestBackendConfiguration &testBackendConfiguration,
38
40 const ExecutionState *executionState, const Model *finalModel,
41 const IR::Expression *outputPacketExpr, const IR::Expression *outputPortExpr,
42 const std::vector<std::reference_wrapper<const TraceEvent>> *programTraces) override;
43
44 const TestSpec *createTestSpec(const ExecutionState *executionState, const Model *finalModel,
45 const TestInfo &testInfo) override;
46};
47
48} // namespace P4::P4Tools::P4Testgen::Bmv2
49
50#endif /* BACKENDS_P4TOOLS_MODULES_TESTGEN_TARGETS_BMV2_TEST_BACKEND_H_ */
Definition backends/p4tools/common/lib/model.h:19
Definition targets/bmv2/test_backend.h:22
TestBackEnd::TestInfo produceTestInfo(const ExecutionState *executionState, const Model *finalModel, const IR::Expression *outputPacketExpr, const IR::Expression *outputPortExpr, const std::vector< std::reference_wrapper< const TraceEvent > > *programTraces) override
Definition targets/bmv2/test_backend.cpp:70
const TestSpec * createTestSpec(const ExecutionState *executionState, const Model *finalModel, const TestInfo &testInfo) override
Definition targets/bmv2/test_backend.cpp:89
Definition targets/bmv2/program_info.h:15
Represents state of execution after having reached a program point.
Definition execution_state.h:34
Definition symbolic_executor.h:21
Definition lib/test_backend.h:23
SymbolicExecutor & symbex
Definition lib/test_backend.h:43
Definition lib/test_backend.h:71
Definition lib/test_spec.h:296
Inja.
Definition targets/bmv2/cmd_stepper.cpp:33
Definition test_backend_configuration.h:16