7#ifndef BACKENDS_P4TOOLS_MODULES_TESTGEN_CORE_SMALL_STEP_TABLE_STEPPER_H_
8#define BACKENDS_P4TOOLS_MODULES_TESTGEN_CORE_SMALL_STEP_TABLE_STEPPER_H_
14#include "backends/p4tools/common/lib/table_utils.h"
16#include "lib/cstring.h"
18#include "backends/p4tools/modules/testgen/core/program_info.h"
19#include "backends/p4tools/modules/testgen/core/small_step/expr_stepper.h"
20#include "backends/p4tools/modules/testgen/lib/execution_state.h"
21#include "backends/p4tools/modules/testgen/lib/test_spec.h"
23namespace P4::P4Tools::P4Testgen {
46 const IR::Type *type,
const IR::P4Table *
table,
cstring name,
47 std::optional<int> idx1_opt = std::nullopt, std::optional<int> idx2_opt = std::nullopt);
62 static const IR::StateVariable &getTableResultVar(
const IR::P4Table *
table);
78 void addDefaultAction(std::optional<const IR::Expression *> tableMissCondition);
86 const IR::MethodCallExpression *actionCall);
100 const IR::Expression *hitCondition);
106 const IR::Expression *
computeHit(TableMatchMap *matches);
111 const std::vector<const IR::ActionListElement *> &tableActionList);
146 virtual void evalTargetTable(
const std::vector<const IR::ActionListElement *> &tableActionList);
148 void setTableDefaultEntries(
const std::vector<const IR::ActionListElement *> &tableActionList);
160 virtual ~TableStepper() =
default;