P4C
The P4 Compiler
|
This is main implementation of the P4Testgen tool. More...
#include <testgen.h>
Static Public Member Functions | |
static std::optional< AbstractTestList > | generateTests (const TestgenOptions &testgenOptions) |
static std::optional< AbstractTestList > | generateTests (std::string_view program, const TestgenOptions &testgenOptions) |
static int | writeTests (const TestgenOptions &testgenOptions) |
static int | writeTests (std::string_view program, const TestgenOptions &testgenOptions) |
Protected Member Functions | |
int | mainImpl (const CompilerResult &compilerResult) override |
void | registerTarget () override |
Protected Member Functions inherited from P4::P4Tools::AbstractP4cTool< TestgenOptions > |
Additional Inherited Members | |
Public Member Functions inherited from P4::P4Tools::AbstractP4cTool< TestgenOptions > | |
int | main (std::string_view toolName, const std::vector< const char * > &args) |
This is main implementation of the P4Testgen tool.
|
static |
Invokes P4Testgen and returns a list of abstract tests which are generated based on the input TestgenOptions. The abstract tests can be further specialized depending on the select test back end. CompilerOptions is required to invoke the correct preprocessor and P4 compiler. It is assumed that .file
in the compiler options is set.
|
static |
Invokes P4Testgen and returns a list of abstract tests which are generated based on the input TestgenOptions. The abstract tests can be further specialized depending on the select test back end. CompilerOptions is required to invoke the correct P4 compiler. This function assumes that
program | is already preprocessed. P4Testgen will directly parse the input program. |
|
overrideprotectedvirtual |
Provides the implementation of the tool.
program | The P4 program after mid-end processing. |
Implements P4::P4Tools::AbstractP4cTool< TestgenOptions >.
|
overrideprotectedvirtual |
Implements P4::P4Tools::AbstractP4cTool< TestgenOptions >.
|
static |
Invokes P4Testgen and writes a list of abstract tests to a specified output directory which are generated based on the input TestgenOptions. The abstract tests can be further specialized depending on the select test back end. CompilerOptions is required to invoke the correct preprocessor and P4 compiler. It is assumed that .file
in the compiler options is set.
|
static |
Invokes P4Testgen and writes a list of abstract tests to a specified output directory which are generated based on the input TestgenOptions. CompilerOptions is required to invoke the correct P4 compiler. This function assumes that
program | is already preprocessed. P4Testgen will directly parse the input program. |