P4C
The P4 Compiler
 
Loading...
Searching...
No Matches
expr_stepper.h
1#ifndef TESTGEN_TARGETS_EBPF_EXPR_STEPPER_H_
2#define TESTGEN_TARGETS_EBPF_EXPR_STEPPER_H_
3
4#include <string>
5
6#include "ir/id.h"
7#include "ir/ir.h"
8#include "ir/solver.h"
9#include "ir/vector.h"
10
11#include "backends/p4tools/modules/testgen/core/program_info.h"
12#include "backends/p4tools/modules/testgen/core/small_step/expr_stepper.h"
13#include "backends/p4tools/modules/testgen/lib/execution_state.h"
14
15namespace P4Tools::P4Testgen::EBPF {
16
18 protected:
19 std::string getClassName() override { return "EBPFExprStepper"; }
20
21 public:
23
24 void evalExternMethodCall(const IR::MethodCallExpression *call, const IR::Expression *receiver,
25 IR::ID name, const IR::Vector<IR::Argument> *args,
26 ExecutionState &state) override;
27
28 bool preorder(const IR::P4Table * /*table*/) override;
29
31 static const IR::MethodCallStatement *produceEmitCall(const IR::Member *fieldLabel);
32};
33} // namespace P4Tools::P4Testgen::EBPF
34
35#endif /* TESTGEN_TARGETS_EBPF_EXPR_STEPPER_H_ */
Definition externInstance.h:33
ExecutionState & state
The state being evaluated.
Definition abstract_stepper.h:49
const ProgramInfo & programInfo
Target-specific information about the P4 program being evaluated.
Definition abstract_stepper.h:46
AbstractSolver & solver
The solver backing the state being executed.
Definition abstract_stepper.h:52
Definition expr_stepper.h:17
void evalExternMethodCall(const IR::MethodCallExpression *call, const IR::Expression *receiver, IR::ID name, const IR::Vector< IR::Argument > *args, ExecutionState &state) override
Definition expr_stepper.cpp:31
static const IR::MethodCallStatement * produceEmitCall(const IR::Member *fieldLabel)
std::string getClassName() override
Definition expr_stepper.h:19
Represents state of execution after having reached a program point.
Definition execution_state.h:34
Implements small-step operational semantics for expressions.
Definition expr_stepper.h:20
Stores target-specific information about a P4 program.
Definition program_info.h:22