P4C
The P4 Compiler
Loading...
Searching...
No Matches
targets/pna/test_backend.h
1#ifndef BACKENDS_P4TOOLS_MODULES_TESTGEN_TARGETS_PNA_TEST_BACKEND_H_
2#define BACKENDS_P4TOOLS_MODULES_TESTGEN_TARGETS_PNA_TEST_BACKEND_H_
3
4#include <cstdint>
5#include <filesystem>
6#include <functional>
7#include <optional>
8#include <set>
9#include <string>
10#include <vector>
11
12#include "backends/p4tools/common/lib/model.h"
13#include "backends/p4tools/common/lib/trace_event.h"
14#include "ir/ir.h"
15
16#include "backends/p4tools/modules/testgen/core/program_info.h"
17#include "backends/p4tools/modules/testgen/core/symbolic_executor/symbolic_executor.h"
18#include "backends/p4tools/modules/testgen/core/target.h"
19#include "backends/p4tools/modules/testgen/lib/execution_state.h"
20#include "backends/p4tools/modules/testgen/lib/test_backend.h"
21#include "backends/p4tools/modules/testgen/lib/test_spec.h"
22
24
26 private:
28 static const std::set<std::string> SUPPORTED_BACKENDS;
29
30 public:
31 explicit PnaTestBackend(const ProgramInfo &programInfo,
32 const TestBackendConfiguration &testBackendConfiguration,
34
36 const ExecutionState *executionState, const Model *finalModel,
37 const IR::Expression *outputPacketExpr, const IR::Expression *outputPortExpr,
38 const std::vector<std::reference_wrapper<const TraceEvent>> *programTraces) override;
39
40 const TestSpec *createTestSpec(const ExecutionState *executionState, const Model *finalModel,
41 const TestInfo &testInfo) override;
42};
43
44} // namespace P4::P4Tools::P4Testgen::Pna
45
46#endif /* BACKENDS_P4TOOLS_MODULES_TESTGEN_TARGETS_PNA_TEST_BACKEND_H_ */
Definition backends/p4tools/common/lib/model.h:19
Represents state of execution after having reached a program point.
Definition execution_state.h:34
Definition targets/pna/test_backend.h:25
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/pna/test_backend.cpp:58
const TestSpec * createTestSpec(const ExecutionState *executionState, const Model *finalModel, const TestInfo &testInfo) override
Definition targets/pna/test_backend.cpp:67
Stores target-specific information about a P4 program.
Definition core/program_info.h:21
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 pna/backend/metadata/metadata.cpp:24
Definition test_backend_configuration.h:16