
Classes | |
| struct | TestInfo |
Public Member Functions | |
| TestBackEnd (const TestBackEnd &)=default | |
| TestBackEnd (TestBackEnd &&)=default | |
| std::optional< std::reference_wrapper< const FinalState > > | computeConcolicVariables (const FinalState &state) const |
| virtual const TestSpec * | createTestSpec (const ExecutionState *executionState, const Model *finalModel, const TestInfo &testInfo)=0 |
| float | getCoverage () const |
| Returns coverage achieved by all the processed tests. | |
| const ProgramInfo & | getProgramInfo () const |
| Returns the program info. | |
| const TestBackendConfiguration & | getTestBackendConfiguration () const |
| Returns the configuration options for the test back end. | |
| int64_t | getTestCount () const |
| Returns test count. | |
| const AbstractTestList & | getTests () const |
| TestBackEnd & | operator= (const TestBackEnd &)=delete |
| TestBackEnd & | operator= (TestBackEnd &&)=delete |
| virtual bool | printTestInfo (const ExecutionState *executionState, const TestInfo &testInfo, const IR::Expression *outputPortExpr) |
| virtual TestInfo | produceTestInfo (const ExecutionState *executionState, const Model *finalModel, const IR::Expression *outputPacketExpr, const IR::Expression *outputPortExpr, const std::vector< std::reference_wrapper< const TraceEvent > > *programTraces) |
| virtual bool | run (const FinalState &state) |
| The callback that is executed by the symbolic executor. | |
Protected Member Functions | |
| TestBackEnd (const ProgramInfo &programInfo, const TestBackendConfiguration &testBackendConfiguration, SymbolicExecutor &symbex) | |
| bool | needsToTerminate (int64_t testCount) const |
Protected Attributes | |
| float | coverage = 0 |
| The accumulated coverage of all finished test cases. Number in range [0, 1]. | |
| int64_t | maxTests |
| Test maximum number of tests that are to be produced. | |
| SymbolicExecutor & | symbex |
| AbstractTestList | tests |
| The list of tests accumulated in the test back end. | |
| TestFramework * | testWriter = nullptr |
| Writes the tests out to a file. | |
| struct P4Tools::P4Testgen::TestBackEnd::TestInfo |
| Class Members | ||
|---|---|---|
| const Constant * | inputPacket |
The concrete value of the input packet. This is a slice of the program packet according to packetSizeInInt. |
| int | inputPort | The input port of the packet. |
| const Constant * | outputPacket | The concrete value of the output packet as modified by the packet. |
| int | outputPort | The output port of the packet. |
| bool | packetIsDropped = false | Indicates whether the packet is dropped. |
| const Constant * | packetTaintMask | The taint mask. |
| const vector< reference_wrapper< const TraceEvent > > | programTraces | The traces that have been collected during execution of this particular test path. |
| std::optional< std::reference_wrapper< const FinalState > > P4Tools::P4Testgen::TestBackEnd::computeConcolicVariables | ( | const FinalState & | state | ) | const |
|
pure virtual |
Implemented in P4Tools::P4Testgen::Bmv2::Bmv2TestBackend, P4Tools::P4Testgen::EBPF::EBPFTestBackend, and P4Tools::P4Testgen::Pna::PnaTestBackend.
|
inline |
Returns the list of tests accumulated in the test back end. If the test write is in file mode this list will be empty.
|
virtual |
Prints information about this particular test path.
|
virtual |
Reimplemented in P4Tools::P4Testgen::Bmv2::Bmv2TestBackend, P4Tools::P4Testgen::EBPF::EBPFTestBackend, and P4Tools::P4Testgen::Pna::PnaTestBackend.
|
protected |
Pointer to the symbolic executor. TODO: Remove this. We only need to update coverage tracking.