• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

daisytuner / sdfglib / 17651658650

11 Sep 2025 04:58PM UTC coverage: 61.012% (+1.3%) from 59.755%
17651658650

Pull #219

github

web-flow
Merge 742a12367 into f744ac9f5
Pull Request #219: stdlib Library Nodes and ConstantNodes

499 of 1681 new or added lines in 81 files covered. (29.68%)

95 existing lines in 36 files now uncovered.

9718 of 15928 relevant lines covered (61.01%)

108.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

62.96
/src/control_flow/state.cpp
1
#include "sdfg/control_flow/state.h"
2

3
#include "sdfg/sdfg.h"
4

5
namespace sdfg {
6
namespace control_flow {
7

8
State::State(size_t element_id, const DebugInfoRegion& debug_info_region, const graph::Vertex vertex)
128✔
9
    : Element(element_id, debug_info_region), vertex_(vertex) {
64✔
10
    this->dataflow_ = std::make_unique<data_flow::DataFlowGraph>();
64✔
11
};
64✔
12

13
void State::validate(const Function& function) const { this->dataflow_->validate(function); };
17✔
14

15
graph::Vertex State::vertex() const { return this->vertex_; };
148✔
16

17
const data_flow::DataFlowGraph& State::dataflow() const { return *this->dataflow_; };
17✔
18

19
data_flow::DataFlowGraph& State::dataflow() { return *this->dataflow_; };
24✔
20

21
void State::replace(const symbolic::Expression& old_expression, const symbolic::Expression& new_expression) {
×
22
    this->dataflow_->replace(old_expression, new_expression);
×
23
};
×
24

25
ReturnState::ReturnState(
4✔
26
    size_t element_id,
27
    const DebugInfoRegion& debug_info,
28
    const graph::Vertex vertex,
29
    const std::string& data,
30
    bool unreachable
31
)
32
    : State(element_id, debug_info, vertex), data_(data), unreachable_(unreachable) {};
4✔
33

34
const std::string& ReturnState::data() const { return this->data_; };
4✔
35

36
bool ReturnState::unreachable() const { return this->unreachable_; };
4✔
37

38
void ReturnState::validate(const Function& function) const {
4✔
39
    State::validate(function);
4✔
40

41
    auto& sdfg = static_cast<const SDFG&>(function);
4✔
42
    if (sdfg.out_degree(*this) > 0) {
4✔
NEW
43
        throw InvalidSDFGException("ReturnState must not have outgoing transitions");
×
44
    }
45
}
4✔
46

NEW
47
void ReturnState::replace(const symbolic::Expression& old_expression, const symbolic::Expression& new_expression) {
×
NEW
48
    State::replace(old_expression, new_expression);
×
49

NEW
50
    if (this->data_ == old_expression->__str__()) {
×
NEW
51
        this->data_ = new_expression->__str__();
×
NEW
52
    }
×
NEW
53
};
×
54

55
} // namespace control_flow
56
} // namespace sdfg
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc