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

daisytuner / sdfglib / 15656007340

14 Jun 2025 08:51PM UTC coverage: 13.234% (-49.9%) from 63.144%
15656007340

Pull #76

github

web-flow
Merge 9586c8161 into 413c53212
Pull Request #76: New Loop Dependency Analysis

361 of 465 new or added lines in 7 files covered. (77.63%)

6215 existing lines in 110 files now uncovered.

1612 of 12181 relevant lines covered (13.23%)

13.64 hits per line

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

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

3
namespace sdfg {
4
namespace structured_control_flow {
5

NEW
6
Transition::Transition(const DebugInfo& debug_info, Sequence& parent)
×
NEW
7
    : Element(debug_info), parent_(parent) {
×
8

UNCOV
9
      };
×
10

11
Transition::Transition(const DebugInfo& debug_info, Sequence& parent,
42✔
12
                       const control_flow::Assignments& assignments)
13
    : Element(debug_info), parent_(parent), assignments_(assignments) {
42✔
14

15
      };
42✔
16

UNCOV
17
const control_flow::Assignments& Transition::assignments() const { return this->assignments_; };
×
18

19
control_flow::Assignments& Transition::assignments() { return this->assignments_; };
84✔
20

NEW
21
Sequence& Transition::parent() { return this->parent_; };
×
22

NEW
23
const Sequence& Transition::parent() const { return this->parent_; };
×
24

UNCOV
25
bool Transition::empty() const { return this->assignments_.empty(); };
×
26

UNCOV
27
size_t Transition::size() const { return this->assignments_.size(); };
×
28

29
void Transition::replace(const symbolic::Expression& old_expression,
×
30
                         const symbolic::Expression& new_expression) {
31

32
};
×
33

34
Sequence::Sequence(const DebugInfo& debug_info)
78✔
35
    : ControlFlowNode(debug_info) {
39✔
36

37
      };
39✔
38

39
size_t Sequence::size() const { return this->children_.size(); };
1,060✔
40

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

45
std::pair<ControlFlowNode&, Transition&> Sequence::at(size_t i) {
545✔
46
    return {*this->children_.at(i), *this->transitions_.at(i)};
545✔
47
};
48

UNCOV
49
void Sequence::replace(const symbolic::Expression& old_expression,
×
50
                       const symbolic::Expression& new_expression) {
UNCOV
51
    for (auto& child : this->children_) {
×
UNCOV
52
        child->replace(old_expression, new_expression);
×
53
    }
54

UNCOV
55
    if (SymEngine::is_a<SymEngine::Symbol>(*old_expression)) {
×
UNCOV
56
        auto old_symbol = SymEngine::rcp_static_cast<const SymEngine::Symbol>(old_expression);
×
57

UNCOV
58
        for (auto& trans : this->transitions_) {
×
UNCOV
59
            if (trans->assignments().find(old_symbol) != trans->assignments().end()) {
×
60
                if (!SymEngine::is_a<SymEngine::Symbol>(*new_expression)) {
×
61
                    throw InvalidSDFGException(
×
62
                        "Sequence: Assigments do not support complex expressions on LHS");
×
63
                }
64
                auto new_symbol =
65
                    SymEngine::rcp_static_cast<const SymEngine::Symbol>(new_expression);
×
66
                trans->assignments()[new_symbol] = trans->assignments()[old_symbol];
×
67
                trans->assignments().erase(old_symbol);
×
68
            }
×
69

UNCOV
70
            for (auto& entry : trans->assignments()) {
×
71
                entry.second = symbolic::subs(entry.second, old_expression, new_expression);
×
72
            }
73
        }
UNCOV
74
    }
×
UNCOV
75
};
×
76

77
}  // namespace structured_control_flow
78
}  // 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