P4C
The P4 Compiler
Loading...
Searching...
No Matches
modules/testgen/core/compiler_result.h
1/*
2 * SPDX-FileCopyrightText: 2024 The P4 Language Consortium
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef BACKENDS_P4TOOLS_MODULES_TESTGEN_CORE_COMPILER_RESULT_H_
8#define BACKENDS_P4TOOLS_MODULES_TESTGEN_CORE_COMPILER_RESULT_H_
9
10#include "backends/p4tools/common/compiler/compiler_result.h"
11#include "backends/p4tools/common/compiler/reachability.h"
12#include "midend/coverage.h"
13
14namespace P4::P4Tools::P4Testgen {
15
17class TestgenCompilerResult : public CompilerResult {
18 private:
20 P4::Coverage::CoverageSet coverableNodes;
21
23 const NodesCallGraph *callGraph;
24
25 public:
26 explicit TestgenCompilerResult(CompilerResult compilerResult,
27 P4::Coverage::CoverageSet coverableNodes,
28 const NodesCallGraph *callGraph = nullptr);
29
33 [[nodiscard]] const NodesCallGraph &getCallGraph() const;
34
36 [[nodiscard]] const P4::Coverage::CoverageSet &getCoverableNodes() const;
37
38 DECLARE_TYPEINFO(TestgenCompilerResult, CompilerResult);
39};
40
41} // namespace P4::P4Tools::P4Testgen
42
43#endif /* BACKENDS_P4TOOLS_MODULES_TESTGEN_CORE_COMPILER_RESULT_H_ */
const P4::Coverage::CoverageSet & getCoverableNodes() const
Definition modules/testgen/core/compiler_result.cpp:26
const NodesCallGraph & getCallGraph() const
Definition modules/testgen/core/compiler_result.cpp:21
std::set< const IR::Node *, SourceIdCmp > CoverageSet
Definition coverage.h:47