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

daisytuner / sdfglib / 15049122732

15 May 2025 03:33PM UTC coverage: 62.241% (+4.7%) from 57.525%
15049122732

Pull #9

github

web-flow
Merge b96e33e0e into 9d3b1a2b3
Pull Request #9: Graphviz DOT Visualizer for SDFGs

520 of 542 new or added lines in 3 files covered. (95.94%)

782 existing lines in 68 files now uncovered.

8049 of 12932 relevant lines covered (62.24%)

504.09 hits per line

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

77.78
/src/structured_control_flow/sequence.cpp
1
#include "sdfg/structured_control_flow/sequence.h"
2

3
namespace sdfg {
4
namespace structured_control_flow {
5

6
Transition::Transition(size_t element_id, const DebugInfo& debug_info)
182✔
7
    : Element(element_id, debug_info) {
91✔
8

9
      };
91✔
10

11
Transition::Transition(size_t element_id, const DebugInfo& debug_info,
1,113✔
12
                       const symbolic::Assignments& assignments)
13
    : Element(element_id, debug_info), assignments_(assignments) {
1,113✔
14

15
      };
1,113✔
16

17
const symbolic::Assignments& Transition::assignments() const { return this->assignments_; };
10✔
18

19
symbolic::Assignments& Transition::assignments() { return this->assignments_; };
6,999✔
20

21
bool Transition::empty() const { return this->assignments_.empty(); };
53✔
22

23
size_t Transition::size() const { return this->assignments_.size(); };
44✔
24

UNCOV
25
void Transition::replace(const symbolic::Expression& old_expression,
×
26
                         const symbolic::Expression& new_expression) {
27

UNCOV
28
};
×
29

30
Sequence::Sequence(size_t element_id, const DebugInfo& debug_info)
1,878✔
31
    : ControlFlowNode(element_id, debug_info) {
939✔
32

33
      };
939✔
34

35
size_t Sequence::size() const { return this->children_.size(); };
11,944✔
36

37
std::pair<const ControlFlowNode&, const Transition&> Sequence::at(size_t i) const {
889✔
38
    return {*this->children_.at(i), *this->transitions_.at(i)};
889✔
39
};
40

41
std::pair<ControlFlowNode&, Transition&> Sequence::at(size_t i) {
6,881✔
42
    return {*this->children_.at(i), *this->transitions_.at(i)};
6,881✔
43
};
44

45
void Sequence::replace(const symbolic::Expression& old_expression,
198✔
46
                       const symbolic::Expression& new_expression) {
47
    for (auto& child : this->children_) {
338✔
48
        child->replace(old_expression, new_expression);
140✔
49
    }
50

51
    if (SymEngine::is_a<SymEngine::Symbol>(*old_expression)) {
198✔
52
        auto old_symbol = SymEngine::rcp_static_cast<const SymEngine::Symbol>(old_expression);
198✔
53

54
        for (auto& trans : this->transitions_) {
338✔
55
            if (trans->assignments().find(old_symbol) != trans->assignments().end()) {
140✔
UNCOV
56
                assert(SymEngine::is_a<SymEngine::Symbol>(*new_expression) &&
×
57
                       "Assigments do not support complex expressions on LHS");
58
                auto new_symbol =
UNCOV
59
                    SymEngine::rcp_static_cast<const SymEngine::Symbol>(new_expression);
×
60
                trans->assignments()[new_symbol] = trans->assignments()[old_symbol];
×
61
                trans->assignments().erase(old_symbol);
×
62
            }
×
63

64
            for (auto& entry : trans->assignments()) {
140✔
UNCOV
65
                entry.second = symbolic::subs(entry.second, old_expression, new_expression);
×
66
            }
67
        }
68
    }
198✔
69
};
198✔
70

71
}  // namespace structured_control_flow
72
}  // 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