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

daisytuner / sdfglib / 17576881200

09 Sep 2025 08:38AM UTC coverage: 61.126% (+2.0%) from 59.145%
17576881200

Pull #219

github

web-flow
Merge 51d6d85aa into b8fdeb232
Pull Request #219: stdlib Library Nodes and ConstantNodes

424 of 1350 new or added lines in 74 files covered. (31.41%)

90 existing lines in 32 files now uncovered.

9307 of 15226 relevant lines covered (61.13%)

109.07 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 DebugInfo& debug_info, const graph::Vertex vertex)
128✔
9
    : Element(element_id, debug_info), 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, const DebugInfo& debug_info, const graph::Vertex vertex, const std::string& data, bool unreachable
27
)
28
    : State(element_id, debug_info, vertex), data_(data), unreachable_(unreachable) {};
4✔
29

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

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

34
void ReturnState::validate(const Function& function) const {
4✔
35
    State::validate(function);
4✔
36

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

NEW
43
void ReturnState::replace(const symbolic::Expression& old_expression, const symbolic::Expression& new_expression) {
×
NEW
44
    State::replace(old_expression, new_expression);
×
45

NEW
46
    if (this->data_ == old_expression->__str__()) {
×
NEW
47
        this->data_ = new_expression->__str__();
×
NEW
48
    }
×
NEW
49
};
×
50

51
} // namespace control_flow
52
} // 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