P4C
The P4 Compiler
Loading...
Searching...
No Matches
variables.h
1/*
2 * SPDX-FileCopyrightText: 2023 The P4 Language Consortium
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef BACKENDS_P4TOOLS_COMMON_LIB_VARIABLES_H_
8#define BACKENDS_P4TOOLS_COMMON_LIB_VARIABLES_H_
9
10#include "ir/ir.h"
11#include "lib/cstring.h"
12
16namespace P4::P4Tools {
17
18using namespace P4::literals;
19
23using ConstraintsVector = std::vector<const IR::Expression *>;
24
25namespace ToolsVariables {
26
30static const cstring VALID = "*valid"_cs;
31
36const IR::StateVariable &getStateVariable(const IR::Type *type, cstring name);
37
42const IR::SymbolicVariable *getSymbolicVariable(const IR::Type *type, cstring name);
43
47const IR::TaintExpression *getTaintExpression(const IR::Type *type);
48
53IR::StateVariable getHeaderValidity(const IR::Expression *headerRef);
54
57IR::StateVariable convertReference(const IR::Expression *ref);
58
59} // namespace ToolsVariables
60
61} // namespace P4::P4Tools
62
63#endif /* BACKENDS_P4TOOLS_COMMON_LIB_VARIABLES_H_ */
Definition cstring.h:85
Definition common/compiler/compiler_result.cpp:7
std::vector< const IR::Expression * > ConstraintsVector
Definition variables.h:23