1#ifndef BACKENDS_P4TOOLS_COMMON_LIB_TRACE_EVENT_TYPES_H_
2#define BACKENDS_P4TOOLS_COMMON_LIB_TRACE_EVENT_TYPES_H_
8#include "backends/p4tools/common/lib/model.h"
9#include "backends/p4tools/common/lib/symbolic_env.h"
10#include "backends/p4tools/common/lib/trace_event.h"
12#include "ir/visitor.h"
13#include "lib/cstring.h"
28 void print(std::ostream &os)
const override;
51 void print(std::ostream &os)
const override;
66 const IR::Expression *value;
81 void print(std::ostream &os)
const override;
93 const IR::MethodCallExpression *call;
96 explicit MethodCall(
const IR::MethodCallExpression *call);
104 void print(std::ostream &os)
const override;
116 const IR::Expression *preEvalCond =
nullptr;
117 const IR::Expression *postEvalCond;
119 void setPreEvalCond(
const IR::Expression *cond);
125 bool doComplete)
const override;
130 void print(std::ostream &os)
const override;
142 const IR::AssignmentStatement &stmt;
148 bool doComplete)
const override;
153 void print(std::ostream &os)
const override;
168 const IR::Expression *extractedHeader;
174 const IR::Expression *condition;
177 std::vector<std::pair<IR::StateVariable, const IR::Expression *>> fields;
183 bool doComplete)
const override;
192 const IR::Expression *condition,
193 std::vector<std::pair<IR::StateVariable, const IR::Expression *>> fields);
201 void print(std::ostream &os)
const override;
216 const IR::Expression *extractedHeader;
222 const IR::Expression *condition;
226 const IR::Expression *condition);
235 void print(std::ostream &os)
const override;
248 const IR::HeaderExpression *emitHeader;
253 [[nodiscard]]
const Emit *
evaluate(
const Model &model,
bool doComplete)
const override;
255 explicit Emit(
const IR::HeaderExpression *emitHeader);
256 ~Emit()
override =
default;
259 Emit &operator=(
const Emit &) =
default;
263 void print(std::ostream &os)
const override;
298 const IR::Expression *packetValue;
301 void print(std::ostream &os)
const override;
315 const IR::P4Parser *parser;
326 void print(std::ostream &os)
const override;
338 const IR::ParserState *state;
341 explicit ParserState(
const IR::ParserState *state);
352 void print(std::ostream &os)
const override;