P4C
The P4 Compiler
Loading...
Searching...
No Matches
targets/ebpf/table_stepper.h
1#ifndef TESTGEN_TARGETS_EBPF_TABLE_STEPPER_H_
2#define TESTGEN_TARGETS_EBPF_TABLE_STEPPER_H_
3
4#include <vector>
5
6#include "ir/ir.h"
7
8#include "backends/p4tools/modules/testgen/core/small_step/table_stepper.h"
9#include "backends/p4tools/modules/testgen/lib/execution_state.h"
10#include "backends/p4tools/modules/testgen/lib/test_spec.h"
11#include "backends/p4tools/modules/testgen/targets/ebpf/expr_stepper.h"
12
13namespace P4::P4Tools::P4Testgen::EBPF {
14
16 private:
22 enum class TableImplementation { standard, constant, skip };
23
25 struct EBPFProperties {
27 TableImplementation implementaton = TableImplementation::standard;
28 } EBPFProperties;
29
30 protected:
32 const std::vector<const IR::ActionListElement *> &tableActionList) override;
33
34 void evalTargetTable(
35 const std::vector<const IR::ActionListElement *> &tableActionList) override;
36
37 public:
38 explicit EBPFTableStepper(EBPFExprStepper *stepper, const IR::P4Table *table);
39};
40
41} // namespace P4::P4Tools::P4Testgen::EBPF
42
43#endif /* TESTGEN_TARGETS_EBPF_TABLE_STEPPER_H_ */
Definition targets/ebpf/expr_stepper.h:15
Definition targets/ebpf/table_stepper.h:15
void checkTargetProperties(const std::vector< const IR::ActionListElement * > &tableActionList) override
Definition targets/ebpf/table_stepper.cpp:16
void evalTargetTable(const std::vector< const IR::ActionListElement * > &tableActionList) override
Definition targets/ebpf/table_stepper.cpp:33
Implements small-step operational semantics for tables.
Definition core/small_step/table_stepper.h:20
const IR::P4Table * table
The table for this particular stepper.
Definition core/small_step/table_stepper.h:26
ExprStepper * stepper
Reference to the calling expression stepper.
Definition core/small_step/table_stepper.h:23