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

daisytuner / sdfglib / 16371692169

18 Jul 2025 01:24PM UTC coverage: 65.106% (+0.1%) from 65.002%
16371692169

Pull #152

github

web-flow
Merge 55d25a916 into f93fe77be
Pull Request #152: adds validate method to all elements

87 of 97 new or added lines in 24 files covered. (89.69%)

10 existing lines in 7 files now uncovered.

8790 of 13501 relevant lines covered (65.11%)

176.82 hits per line

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

83.33
/src/structured_control_flow/structured_loop.cpp
1
#include "sdfg/structured_control_flow/structured_loop.h"
2

3
namespace sdfg {
4
namespace structured_control_flow {
5

6
StructuredLoop::StructuredLoop(
410✔
7
    size_t element_id,
8
    const DebugInfo& debug_info,
9
    symbolic::Symbol indvar,
10
    symbolic::Expression init,
11
    symbolic::Expression update,
12
    symbolic::Condition condition
13
)
14
    : ControlFlowNode(element_id, debug_info), indvar_(indvar), init_(init), update_(update), condition_(condition) {
205✔
15
    this->root_ = std::unique_ptr<Sequence>(new Sequence(++element_id, debug_info));
205✔
16
}
205✔
17

NEW
18
void StructuredLoop::validate() const {
×
19
    // TODO: Implement validation
NEW
20
};
×
21

22
const symbolic::Symbol& StructuredLoop::indvar() const { return this->indvar_; };
30✔
23

24
symbolic::Symbol& StructuredLoop::indvar() { return this->indvar_; };
941✔
25

26
const symbolic::Expression& StructuredLoop::init() const { return this->init_; };
14✔
27

28
symbolic::Expression& StructuredLoop::init() { return this->init_; };
506✔
29

30
const symbolic::Expression& StructuredLoop::update() const { return this->update_; };
14✔
31

32
symbolic::Expression& StructuredLoop::update() { return this->update_; };
490✔
33

34
const symbolic::Condition& StructuredLoop::condition() const { return this->condition_; };
22✔
35

36
symbolic::Condition& StructuredLoop::condition() { return this->condition_; };
534✔
37

38
Sequence& StructuredLoop::root() const { return *this->root_; };
3,168✔
39

40
void StructuredLoop::replace(const symbolic::Expression& old_expression, const symbolic::Expression& new_expression) {
2✔
41
    if (symbolic::eq(this->indvar_, old_expression) && SymEngine::is_a<SymEngine::Symbol>(*new_expression)) {
2✔
42
        this->indvar_ = SymEngine::rcp_static_cast<const SymEngine::Symbol>(new_expression);
×
43
    }
×
44
    this->init_ = symbolic::subs(this->init_, old_expression, new_expression);
2✔
45
    this->update_ = symbolic::subs(this->update_, old_expression, new_expression);
2✔
46
    this->condition_ = symbolic::subs(this->condition_, old_expression, new_expression);
2✔
47

48
    this->root_->replace(old_expression, new_expression);
2✔
49
};
2✔
50

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