P4C
The P4 Compiler
Loading...
Searching...
No Matches
P4::P4Tools::P4Testgen::TestgenTarget Class Referenceabstract
Inheritance diagram for P4::P4Tools::P4Testgen::TestgenTarget:
[legend]

Static Public Member Functions

static const TestgenTargetget ()
 
static CmdSteppergetCmdStepper (ExecutionState &state, AbstractSolver &solver, const ProgramInfo &programInfo)
 Provides a CmdStepper implementation for this target.
 
static ExprSteppergetExprStepper (ExecutionState &state, AbstractSolver &solver, const ProgramInfo &programInfo)
 Provides a ExprStepper implementation for this target.
 
static TestBackEndgetTestBackend (const ProgramInfo &programInfo, const TestBackendConfiguration &testBackendConfiguration, SymbolicExecutor &symbex)
 Returns the test back end associated with this P4Testgen target.
 
static const ProgramInfoproduceProgramInfo (const CompilerResult &compilerResult)
 
- Static Public Member Functions inherited from P4::P4Tools::CompilerTarget
static std::vector< const char * > * initCompiler (std::string_view toolName, int argc, char **argv)
 
static ICompileContextmakeContext (std::string_view toolName)
 
static CompilerResultOrError runCompiler (const CompilerOptions &options, std::string_view toolName)
 
static CompilerResultOrError runCompiler (const CompilerOptions &options, std::string_view toolName, const std::string &source)
 
- Static Public Member Functions inherited from P4::P4Tools::Target
static bool init (std::string deviceName, std::string archName)
 
static bool setArch (std::string archName)
 
static bool setDevice (std::string deviceName)
 

Protected Member Functions

 TestgenTarget (const std::string &deviceName, const std::string &archName)
 
virtual CmdSteppergetCmdStepperImpl (ExecutionState &state, AbstractSolver &solver, const ProgramInfo &programInfo) const =0
 
virtual ExprSteppergetExprStepperImpl (ExecutionState &state, AbstractSolver &solver, const ProgramInfo &programInfo) const =0
 
virtual TestBackEndgetTestBackendImpl (const ProgramInfo &programInfo, const TestBackendConfiguration &testBackendConfiguration, SymbolicExecutor &symbex) const =0
 
const ProgramInfoproduceProgramInfoImpl (const CompilerResult &compilerResult) const
 
virtual const ProgramInfoproduceProgramInfoImpl (const CompilerResult &compilerResult, const IR::Declaration_Instance *mainDecl) const =0
 
CompilerResultOrError runCompilerImpl (const CompilerOptions &options, const IR::P4Program *program) const override
 
- Protected Member Functions inherited from P4::P4Tools::CompilerTarget
 CompilerTarget (std::string_view toolName, const std::string &deviceName, const std::string &archName)
 
virtual std::vector< const char * > * initCompilerImpl (int argc, char **argv) const
 
virtual ICompileContextmakeContextImpl () const
 
virtual P4::FrontEnd mkFrontEnd () const
 A factory method for providing a target-specific front end implementation.
 
virtual MidEnd mkMidEnd (const CompilerOptions &options) const
 A factory method for providing a target-specific mid end implementation.
 
const IR::P4Program * runFrontend (const CompilerOptions &options, const IR::P4Program *program) const
 
const IR::P4Program * runMidEnd (const CompilerOptions &options, const IR::P4Program *program) const
 
- Protected Member Functions inherited from P4::P4Tools::Target
 Target (std::string_view toolName, const std::string &deviceName, const std::string &archName)
 

Additional Inherited Members

- Public Member Functions inherited from P4::P4Tools::Target
virtual const IR::Expression * createTargetUninitialized (const IR::Type *type, bool forceTaint) const
 
- Public Attributes inherited from P4::P4Tools::Target
Spec spec
 The device and architecture supported by this instance.
 
std::string toolName
 The name of the tool supported by this instance.
 
- Static Protected Member Functions inherited from P4::P4Tools::CompilerTarget
static const IR::P4Program * runParser (const ParserOptions &options)
 
- Static Protected Member Functions inherited from P4::P4Tools::Target
template<class TargetImpl >
static const TargetImpl & get (std::string_view toolName)
 

Member Function Documentation

◆ get()

const TestgenTarget & P4::P4Tools::P4Testgen::TestgenTarget::get ( )
static
Returns
the singleton instance for the current target.

◆ getCmdStepperImpl()

virtual CmdStepper * P4::P4Tools::P4Testgen::TestgenTarget::getCmdStepperImpl ( ExecutionState & state,
AbstractSolver & solver,
const ProgramInfo & programInfo ) const
protectedpure virtual

◆ getExprStepperImpl()

virtual ExprStepper * P4::P4Tools::P4Testgen::TestgenTarget::getExprStepperImpl ( ExecutionState & state,
AbstractSolver & solver,
const ProgramInfo & programInfo ) const
protectedpure virtual

◆ getTestBackendImpl()

virtual TestBackEnd * P4::P4Tools::P4Testgen::TestgenTarget::getTestBackendImpl ( const ProgramInfo & programInfo,
const TestBackendConfiguration & testBackendConfiguration,
SymbolicExecutor & symbex ) const
protectedpure virtual

◆ produceProgramInfo()

const ProgramInfo * P4::P4Tools::P4Testgen::TestgenTarget::produceProgramInfo ( const CompilerResult & compilerResult)
static

Produces a @ProgramInfo for the given P4 program.

Returns
nullptr if the program is not supported by this target.

◆ produceProgramInfoImpl() [1/2]

const ProgramInfo * P4::P4Tools::P4Testgen::TestgenTarget::produceProgramInfoImpl ( const CompilerResult & compilerResult) const
nodiscardprotected
See also
@produceProgramInfo.

◆ produceProgramInfoImpl() [2/2]

virtual const ProgramInfo * P4::P4Tools::P4Testgen::TestgenTarget::produceProgramInfoImpl ( const CompilerResult & compilerResult,
const IR::Declaration_Instance * mainDecl ) const
protectedpure virtual

◆ runCompilerImpl()

CompilerResultOrError P4::P4Tools::P4Testgen::TestgenTarget::runCompilerImpl ( const CompilerOptions & options,
const IR::P4Program * program ) const
overrideprotectedvirtual
See also
runCompiler.

Collect coverage information about the program.

Reimplemented from P4::P4Tools::CompilerTarget.