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

daisytuner / sdfglib / 15238257521

25 May 2025 01:14PM UTC coverage: 60.342% (-0.1%) from 60.473%
15238257521

push

github

web-flow
Merge pull request #31 from daisytuner/exception-handling

Exception handling

18 of 60 new or added lines in 17 files covered. (30.0%)

1 existing line in 1 file now uncovered.

8052 of 13344 relevant lines covered (60.34%)

102.27 hits per line

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

96.43
/src/structured_control_flow/for.cpp
1
#include "sdfg/structured_control_flow/for.h"
2

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

5
namespace sdfg {
6
namespace structured_control_flow {
7

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

18
const symbolic::Symbol& For::indvar() const { return this->indvar_; };
87✔
19

20
symbolic::Symbol& For::indvar() { return this->indvar_; };
656✔
21

22
const symbolic::Expression& For::init() const { return this->init_; };
2✔
23

24
symbolic::Expression& For::init() { return this->init_; };
320✔
25

26
const symbolic::Expression& For::update() const { return this->update_; };
85✔
27

28
symbolic::Expression& For::update() { return this->update_; };
391✔
29

30
const symbolic::Condition& For::condition() const { return this->condition_; };
4✔
31

32
symbolic::Condition& For::condition() { return this->condition_; };
320✔
33

34
Sequence& For::root() const { return *this->root_; };
722✔
35

36
void For::replace(const symbolic::Expression& old_expression,
7✔
37
                  const symbolic::Expression& new_expression) {
38
    if (symbolic::eq(this->indvar_, old_expression)) {
7✔
39
        if (!SymEngine::is_a<SymEngine::Symbol>(*new_expression)) {
1✔
NEW
40
            throw InvalidSDFGException("For: New Indvar must be a symbol");
×
41
        }
42
        this->indvar_ = SymEngine::rcp_static_cast<const SymEngine::Symbol>(new_expression);
1✔
43
    }
1✔
44
    this->init_ = symbolic::subs(this->init_, old_expression, new_expression);
7✔
45
    this->update_ = symbolic::subs(this->update_, old_expression, new_expression);
7✔
46
    this->condition_ = symbolic::subs(this->condition_, old_expression, new_expression);
7✔
47

48
    this->root_->replace(old_expression, new_expression);
7✔
49
};
7✔
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