P4C
The P4 Compiler
Loading...
Searching...
No Matches
targets/bmv2/test_backend.h
1/*
2 * SPDX-FileCopyrightText: 2022 The P4 Language Consortium
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef BACKENDS_P4TOOLS_MODULES_TESTGEN_TARGETS_BMV2_TEST_BACKEND_H_
8#define BACKENDS_P4TOOLS_MODULES_TESTGEN_TARGETS_BMV2_TEST_BACKEND_H_
9
10#include <functional>
11#include <set>
12#include <string>
13#include <vector>
14
15#include "backends/p4tools/common/lib/model.h"
16#include "backends/p4tools/common/lib/trace_event.h"
17#include "ir/ir.h"
18#include "lib/big_int_util.h"
19
20#include "backends/p4tools/modules/testgen/core/symbolic_executor/symbolic_executor.h"
21#include "backends/p4tools/modules/testgen/lib/execution_state.h"
22#include "backends/p4tools/modules/testgen/lib/test_backend.h"
23#include "backends/p4tools/modules/testgen/lib/test_spec.h"
24#include "backends/p4tools/modules/testgen/targets/bmv2/program_info.h"
25
27
28class Bmv2TestBackend : public TestBackEnd {
29 private:
31 static const std::set<std::string> SUPPORTED_BACKENDS;
32
33 public:
34 explicit Bmv2TestBackend(const Bmv2V1ModelProgramInfo &programInfo,
35 const TestBackendConfiguration &testBackendConfiguration,
37
39 const ExecutionState *executionState, const Model *finalModel,
40 const IR::Expression *outputPacketExpr, const IR::Expression *outputPortExpr,
41 const std::vector<std::reference_wrapper<const TraceEvent>> *programTraces) override;
42
43 const TestSpec *createTestSpec(const ExecutionState *executionState, const Model *finalModel,
44 const TestInfo &testInfo) override;
45};
46
47} // namespace P4::P4Tools::P4Testgen::Bmv2
48
49#endif /* BACKENDS_P4TOOLS_MODULES_TESTGEN_TARGETS_BMV2_TEST_BACKEND_H_ */
Definition backends/p4tools/common/lib/model.h:24
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:72
const TestSpec * createTestSpec(const ExecutionState *executionState, const Model *finalModel, const TestInfo &testInfo) override
Definition targets/bmv2/test_backend.cpp:81
Definition targets/bmv2/program_info.h:21
Represents state of execution after having reached a program point.
Definition execution_state.h:40
Definition symbolic_executor.h:27
SymbolicExecutor & symbex
Definition lib/test_backend.h:49
Definition lib/test_backend.h:77
Definition lib/test_spec.h:303
Inja.
Definition targets/bmv2/cmd_stepper.cpp:37
Definition test_backend_configuration.h:22