• 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

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

3
#include "sdfg/structured_control_flow/structured_loop.h"
4
#include "sdfg/symbolic/symbolic.h"
5

6
namespace sdfg {
7
namespace structured_control_flow {
8

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

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

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

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

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

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

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

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

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

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

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

UNCOV
49
    this->root_->replace(old_expression, new_expression);
×
UNCOV
50
};
×
51

52
}  // namespace structured_control_flow
53
}  // 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