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

daisytuner / sdfglib / 15262928007

26 May 2025 10:36PM UTC coverage: 58.284% (-2.0%) from 60.304%
15262928007

push

github

web-flow
Merge pull request #36 from daisytuner/sdfg-validation

Introduces new definition of memlets plus sanity checks

104 of 266 new or added lines in 6 files covered. (39.1%)

241 existing lines in 15 files now uncovered.

7908 of 13568 relevant lines covered (58.28%)

96.1 hits per line

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

69.57
/src/structured_control_flow/if_else.cpp
1
#include "sdfg/structured_control_flow/if_else.h"
2

3
#include "sdfg/symbolic/symbolic.h"
4

5
namespace sdfg {
6
namespace structured_control_flow {
7

8
IfElse::IfElse(size_t element_id, const DebugInfo& debug_info)
72✔
9
    : ControlFlowNode(element_id, debug_info) {
36✔
10

11
      };
36✔
12

13
size_t IfElse::size() const { return this->cases_.size(); };
396✔
14

15
std::pair<const Sequence&, const symbolic::Condition&> IfElse::at(size_t i) const {
12✔
16
    return {*this->cases_.at(i), this->conditions_.at(i)};
12✔
17
};
18

19
std::pair<Sequence&, symbolic::Condition&> IfElse::at(size_t i) {
199✔
20
    return {*this->cases_.at(i), this->conditions_.at(i)};
199✔
21
};
22

23
bool IfElse::is_complete() {
37✔
24
    if (this->conditions_.size() == 2) {
37✔
25
        return symbolic::eq(this->conditions_.at(0), this->conditions_.at(1)->logical_not());
35✔
26
    }
27

28
    auto condition = symbolic::__false__();
2✔
29
    for (auto& entry : this->conditions_) {
4✔
30
        condition = symbolic::Or(condition, entry);
2✔
31
    }
32
    return symbolic::is_true(condition);
2✔
33
};
37✔
34

UNCOV
35
void IfElse::replace(const symbolic::Expression& old_expression,
×
36
                     const symbolic::Expression& new_expression) {
UNCOV
37
    for (size_t i = 0; i < this->cases_.size(); ++i) {
×
UNCOV
38
        this->cases_.at(i)->replace(old_expression, new_expression);
×
UNCOV
39
        this->conditions_.at(i) =
×
UNCOV
40
            symbolic::subs(this->conditions_.at(i), old_expression, new_expression);
×
UNCOV
41
    }
×
UNCOV
42
};
×
43

44
}  // namespace structured_control_flow
45
}  // 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