P4C
The P4 Compiler
Loading...
Searching...
No Matches
targets/ebpf/expr_stepper.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_EBPF_EXPR_STEPPER_H_
8#define BACKENDS_P4TOOLS_MODULES_TESTGEN_TARGETS_EBPF_EXPR_STEPPER_H_
9
10#include <string>
11
12#include "ir/ir.h"
13#include "ir/solver.h"
14
15#include "backends/p4tools/modules/testgen/core/program_info.h"
16#include "backends/p4tools/modules/testgen/core/small_step/expr_stepper.h"
17#include "backends/p4tools/modules/testgen/lib/execution_state.h"
18
19namespace P4::P4Tools::P4Testgen::EBPF {
20
21class EBPFExprStepper : public ExprStepper {
22 private:
24 static const ExternMethodImpls<EBPFExprStepper> EBPF_EXTERN_METHOD_IMPLS;
25
26 protected:
27 std::string getClassName() override { return "EBPFExprStepper"; }
28
29 public:
31
32 void evalExternMethodCall(const ExternInfo &externInfo) override;
33
34 bool preorder(const IR::P4Table * /*table*/) override;
35
37 static const IR::MethodCallStatement *produceEmitCall(const IR::Member *fieldLabel);
38};
39} // namespace P4::P4Tools::P4Testgen::EBPF
40
41#endif /* BACKENDS_P4TOOLS_MODULES_TESTGEN_TARGETS_EBPF_EXPR_STEPPER_H_ */
Provides a higher-level interface for an SMT solver.
Definition solver.h:30
ExecutionState & state
The state being evaluated.
Definition abstract_stepper.h:55
const ProgramInfo & programInfo
Target-specific information about the P4 program being evaluated.
Definition abstract_stepper.h:52
Definition targets/ebpf/expr_stepper.h:21
std::string getClassName() override
Definition targets/ebpf/expr_stepper.h:27
void evalExternMethodCall(const ExternInfo &externInfo) override
Definition targets/ebpf/expr_stepper.cpp:185
static const IR::MethodCallStatement * produceEmitCall(const IR::Member *fieldLabel)
Represents state of execution after having reached a program point.
Definition execution_state.h:40
Encapsulates a set of extern method implementations.
Definition core/small_step/expr_stepper.h:33
Definition extern_info.h:20
Stores target-specific information about a P4 program.
Definition core/program_info.h:27
Definition phv/solver/action_constraint_solver.cpp:33