P4C
The P4 Compiler
Loading...
Searching...
No Matches
P4::P4Tools::P4Testgen::Pna::SharedPnaProgramInfo Class Reference
Inheritance diagram for P4::P4Tools::P4Testgen::Pna::SharedPnaProgramInfo:
[legend]

Public Member Functions

 SharedPnaProgramInfo (const TestgenCompilerResult &compilerResult, ordered_map< cstring, const IR::Type_Declaration * > inputBlocks)
 
 DECLARE_TYPEINFO (SharedPnaProgramInfo, ProgramInfo)
 
const IR::Expression * dropIsActive () const override
 
const IR::PathExpression * getBlockParam (cstring blockLabel, size_t paramIndex) const
 
const IR::Type_Bits * getParserErrorType () const override
 
const ordered_map< cstring, const IR::Type_Declaration * > * getProgrammableBlocks () const
 
const IR::StateVariable & getTargetInputPortVar () const override
 
const IR::StateVariable & getTargetOutputPortVar () const override
 
- Public Member Functions inherited from P4::P4Tools::P4Testgen::ProgramInfo
 ProgramInfo (const ProgramInfo &)=default
 
 ProgramInfo (ProgramInfo &&)=default
 
virtual const IR::Expression * createTargetUninitialized (const IR::Type *type, bool forceTaint) const
 
 DECLARE_TYPEINFO (ProgramInfo)
 
virtual const ArchSpecgetArchSpec () const =0
 
const NodesCallGraphgetCallGraph () const
 
cstring getCanonicalBlockName (cstring programBlockName) const
 
virtual const TestgenCompilerResultgetCompilerResult () const
 
const ConcolicMethodImplsgetConcolicMethodImpls () const
 
const P4::Coverage::CoverageSetgetCoverableNodes () const
 Getter to access coverableNodes.
 
const IR::P4Program & getP4Program () const
 
const std::vector< Continuation::Command > * getPipelineSequence () const
 
std::optional< const IR::Expression * > getTargetConstraints () const
 
ProgramInfooperator= (const ProgramInfo &)=default
 
ProgramInfooperator= (ProgramInfo &&)=default
 
void produceCopyInOutCall (const IR::Parameter *param, size_t paramIdx, const ArchSpec::ArchMember *archMember, std::vector< Continuation::Command > *copyIns, std::vector< Continuation::Command > *copyOuts) const
 
- Public Member Functions inherited from P4::ICastable
template<typename T >
T & as ()
 Tries to convert the class to type T. A BUG occurs if the cast fails.
 
template<typename T >
const T & as () const
 Tries to convert the class to type T. A BUG occurs if the cast fails.
 
template<typename T >
T * checkedTo ()
 Performs a checked cast. A BUG occurs if the cast fails.
 
template<typename T >
const T * checkedTo () const
 Performs a checked cast. A BUG occurs if the cast fails.
 
- Public Member Functions inherited from P4::RTTI::Base
template<typename T >
bool is () const noexcept
 
virtual bool isA (TypeId typeId) const noexcept=0
 
template<typename T >
const T * to () const noexcept
 Same as to, but returns const pointer to T.
 
template<typename T >
T * to () noexcept
 
virtual TypeId typeId () const noexcept=0
 

Additional Inherited Members

- Protected Member Functions inherited from P4::P4Tools::P4Testgen::ProgramInfo
 ProgramInfo (const TestgenCompilerResult &compilerResult)
 
- Protected Member Functions inherited from P4::RTTI::Base
virtual const void * toImpl (TypeId typeId) const noexcept=0
 
- Protected Attributes inherited from P4::P4Tools::P4Testgen::ProgramInfo
ordered_map< cstring, cstringblockMap
 Maps the programmable blocks in the P4 program to their canonical counterpart.
 
ConcolicMethodImpls concolicMethodImpls
 
std::vector< Continuation::Command > pipelineSequence
 The execution sequence of the P4 program.
 
std::optional< const IR::Expression * > targetConstraints = std::nullopt
 The constraints imposed by the target.
 

Member Function Documentation

◆ dropIsActive()

const IR::Expression * P4::P4Tools::P4Testgen::Pna::SharedPnaProgramInfo::dropIsActive ( ) const
nodiscardoverridevirtual
Returns
an expression that checks whether the packet is to be dropped. The computation is target specific.

Implements P4::P4Tools::P4Testgen::ProgramInfo.

◆ getBlockParam()

const IR::PathExpression * P4::P4Tools::P4Testgen::Pna::SharedPnaProgramInfo::getBlockParam ( cstring blockLabel,
size_t paramIndex ) const
nodiscard
Returns
the name of the parameter for a given programmable-block label and the parameter index. This is the name of the parameter that is used in the P4 program.

◆ getParserErrorType()

const IR::Type_Bits * P4::P4Tools::P4Testgen::Pna::SharedPnaProgramInfo::getParserErrorType ( ) const
nodiscardoverridevirtual

◆ getProgrammableBlocks()

const ordered_map< cstring, const IR::Type_Declaration * > * P4::P4Tools::P4Testgen::Pna::SharedPnaProgramInfo::getProgrammableBlocks ( ) const
nodiscard
Returns
the programmable blocks of the program.

◆ getTargetInputPortVar()

const IR::StateVariable & P4::P4Tools::P4Testgen::Pna::SharedPnaProgramInfo::getTargetInputPortVar ( ) const
nodiscardoverridevirtual
Returns
the metadata member corresponding to the ingress port

Implements P4::P4Tools::P4Testgen::ProgramInfo.

◆ getTargetOutputPortVar()

const IR::StateVariable & P4::P4Tools::P4Testgen::Pna::SharedPnaProgramInfo::getTargetOutputPortVar ( ) const
nodiscardoverridevirtual
Returns
the metadata member corresponding to the final output port

Implements P4::P4Tools::P4Testgen::ProgramInfo.