1#ifndef BACKENDS_P4TOOLS_MODULES_SMITH_TARGETS_GENERIC_TARGET_H_
2#define BACKENDS_P4TOOLS_MODULES_SMITH_TARGETS_GENERIC_TARGET_H_
7#include "backends/p4tools/modules/smith/common/declarations.h"
8#include "backends/p4tools/modules/smith/common/expressions.h"
9#include "backends/p4tools/modules/smith/common/parser.h"
10#include "backends/p4tools/modules/smith/common/statements.h"
11#include "backends/p4tools/modules/smith/common/table.h"
12#include "backends/p4tools/modules/smith/core/target.h"
15namespace P4::P4Tools::P4Smith::Generic {
30 [[nodiscard]] IR::P4Parser *generateParserBlock()
const;
31 [[nodiscard]] IR::P4Control *generateIngressBlock()
const;
32 [[nodiscard]]
static IR::Declaration_Instance *generateMainPackage();
34 [[nodiscard]] IR::Type_Parser *generateParserBlockType()
const;
35 [[nodiscard]] IR::Type_Control *generateIngressBlockType()
const;
36 [[nodiscard]] IR::Type_Package *generatePackageType()
const;
47 [[nodiscard]]
const IR::P4Program *generateP4Program()
const override;
50 return *_declarationGenerator;
54 return *_expressionGenerator;
58 return *_statementGenerator;
61 [[nodiscard]]
ParserGenerator &parserGenerator()
const override {
return *_parserGenerator; }
63 [[nodiscard]]
TableGenerator &tableGenerator()
const override {
return *_tableGenerator; }