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

daisytuner / sdfglib / 15612270835

12 Jun 2025 01:44PM UTC coverage: 60.871% (-0.8%) from 61.71%
15612270835

push

github

web-flow
Merge pull request #68 from daisytuner/loop-types

refactors symbolic analysis into polynomials, extreme values and cnf

638 of 862 new or added lines in 24 files covered. (74.01%)

334 existing lines in 20 files now uncovered.

6571 of 10795 relevant lines covered (60.87%)

100.35 hits per line

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

47.37
/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(const DebugInfo& debug_info)
26✔
7
    : Element(debug_info) {
13✔
8

9
      };
13✔
10

11
Transition::Transition(const DebugInfo& debug_info, const control_flow::Assignments& assignments)
644✔
12
    : Element(debug_info), assignments_(assignments) {
644✔
13

14
      };
644✔
15

16
const control_flow::Assignments& Transition::assignments() const { return this->assignments_; };
22✔
17

18
control_flow::Assignments& Transition::assignments() { return this->assignments_; };
1,175✔
19

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

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

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

27
};
×
28

29
Sequence::Sequence(const DebugInfo& debug_info)
1,246✔
30
    : ControlFlowNode(debug_info) {
623✔
31

32
      };
623✔
33

34
size_t Sequence::size() const { return this->children_.size(); };
3,482✔
35

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

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

UNCOV
44
void Sequence::replace(const symbolic::Expression& old_expression,
×
45
                       const symbolic::Expression& new_expression) {
UNCOV
46
    for (auto& child : this->children_) {
×
UNCOV
47
        child->replace(old_expression, new_expression);
×
48
    }
49

UNCOV
50
    if (SymEngine::is_a<SymEngine::Symbol>(*old_expression)) {
×
UNCOV
51
        auto old_symbol = SymEngine::rcp_static_cast<const SymEngine::Symbol>(old_expression);
×
52

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

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

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