P4C
The P4 Compiler
Loading...
Searching...
No Matches
modules/testgen/core/compiler_result.h
1#ifndef BACKENDS_P4TOOLS_MODULES_TESTGEN_CORE_COMPILER_RESULT_H_
2#define BACKENDS_P4TOOLS_MODULES_TESTGEN_CORE_COMPILER_RESULT_H_
3
4#include "backends/p4tools/common/compiler/compiler_result.h"
5#include "backends/p4tools/common/compiler/reachability.h"
6#include "midend/coverage.h"
7
8namespace P4::P4Tools::P4Testgen {
9
12 private:
14 P4::Coverage::CoverageSet coverableNodes;
15
17 const NodesCallGraph *callGraph;
18
19 public:
20 explicit TestgenCompilerResult(CompilerResult compilerResult,
21 P4::Coverage::CoverageSet coverableNodes,
22 const NodesCallGraph *callGraph = nullptr);
23
27 [[nodiscard]] const NodesCallGraph &getCallGraph() const;
28
30 [[nodiscard]] const P4::Coverage::CoverageSet &getCoverableNodes() const;
31
32 DECLARE_TYPEINFO(TestgenCompilerResult, CompilerResult);
33};
34
35} // namespace P4::P4Tools::P4Testgen
36
37#endif /* BACKENDS_P4TOOLS_MODULES_TESTGEN_CORE_COMPILER_RESULT_H_ */
Definition common/compiler/compiler_result.h:14
Definition reachability.h:27
Extends the CompilerResult with the associated P4RuntimeApi.
Definition modules/testgen/core/compiler_result.h:11
const P4::Coverage::CoverageSet & getCoverableNodes() const
Definition modules/testgen/core/compiler_result.cpp:22
const NodesCallGraph & getCallGraph() const
Definition modules/testgen/core/compiler_result.cpp:17
std::set< const IR::Node *, SourceIdCmp > CoverageSet
Definition coverage.h:39