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

daisytuner / sdfglib / 15656007340

14 Jun 2025 08:51PM UTC coverage: 13.234% (-49.9%) from 63.144%
15656007340

Pull #76

github

web-flow
Merge 9586c8161 into 413c53212
Pull Request #76: New Loop Dependency Analysis

361 of 465 new or added lines in 7 files covered. (77.63%)

6215 existing lines in 110 files now uncovered.

1612 of 12181 relevant lines covered (13.23%)

13.64 hits per line

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

0.0
/src/visitor/structured_sdfg_visitor.cpp
1
#include "sdfg/visitor/structured_sdfg_visitor.h"
2

3
namespace sdfg {
4
namespace visitor {
5

UNCOV
6
StructuredSDFGVisitor::StructuredSDFGVisitor(builder::StructuredSDFGBuilder& builder,
×
7
                                             analysis::AnalysisManager& analysis_manager)
UNCOV
8
    : builder_(builder), analysis_manager_(analysis_manager) {}
×
9

UNCOV
10
bool StructuredSDFGVisitor::visit() {
×
UNCOV
11
    if (this->accept(builder_.subject().root(), builder_.subject().root())) {
×
UNCOV
12
        return true;
×
13
    }
UNCOV
14
    return this->visit(builder_.subject().root());
×
UNCOV
15
}
×
16

UNCOV
17
bool StructuredSDFGVisitor::visit(structured_control_flow::Sequence& parent) {
×
UNCOV
18
    std::list<structured_control_flow::ControlFlowNode*> queue;
×
UNCOV
19
    for (size_t i = 0; i < parent.size(); i++) {
×
UNCOV
20
        queue.push_back(&parent.at(i).first);
×
UNCOV
21
    }
×
UNCOV
22
    while (!queue.empty()) {
×
UNCOV
23
        auto current = queue.front();
×
UNCOV
24
        queue.pop_front();
×
25

UNCOV
26
        if (auto block_stmt = dynamic_cast<structured_control_flow::Block*>(current)) {
×
UNCOV
27
            if (this->accept(parent, *block_stmt)) {
×
UNCOV
28
                return true;
×
29
            }
UNCOV
30
        } else if (auto sequence_stmt = dynamic_cast<structured_control_flow::Sequence*>(current)) {
×
UNCOV
31
            if (this->accept(parent, *sequence_stmt)) {
×
32
                return true;
×
33
            }
34

UNCOV
35
            if (this->visit(*sequence_stmt)) {
×
36
                return true;
×
37
            }
UNCOV
38
        } else if (auto return_stmt = dynamic_cast<structured_control_flow::Return*>(current)) {
×
UNCOV
39
            if (this->accept(parent, *return_stmt)) {
×
UNCOV
40
                return true;
×
41
            }
UNCOV
42
        } else if (auto if_else_stmt = dynamic_cast<structured_control_flow::IfElse*>(current)) {
×
UNCOV
43
            if (this->accept(parent, *if_else_stmt)) {
×
UNCOV
44
                return true;
×
45
            }
46

UNCOV
47
            for (size_t i = 0; i < if_else_stmt->size(); i++) {
×
48
                if (this->visit(if_else_stmt->at(i).first)) {
×
49
                    return true;
×
50
                }
51
            }
×
UNCOV
52
        } else if (auto for_stmt = dynamic_cast<structured_control_flow::For*>(current)) {
×
UNCOV
53
            if (this->accept(parent, *for_stmt)) {
×
UNCOV
54
                return true;
×
55
            }
56

UNCOV
57
            if (this->visit(for_stmt->root())) {
×
58
                return true;
×
59
            }
UNCOV
60
        } else if (auto while_stmt = dynamic_cast<structured_control_flow::While*>(current)) {
×
UNCOV
61
            if (this->accept(parent, *while_stmt)) {
×
UNCOV
62
                return true;
×
63
            }
64

UNCOV
65
            if (this->visit(while_stmt->root())) {
×
UNCOV
66
                return true;
×
67
            }
UNCOV
68
        } else if (auto continue_stmt = dynamic_cast<structured_control_flow::Continue*>(current)) {
×
UNCOV
69
            if (this->accept(parent, *continue_stmt)) {
×
UNCOV
70
                return true;
×
71
            }
UNCOV
72
        } else if (auto break_stmt = dynamic_cast<structured_control_flow::Break*>(current)) {
×
UNCOV
73
            if (this->accept(parent, *break_stmt)) {
×
UNCOV
74
                return true;
×
75
            }
UNCOV
76
        } else if (auto map_stmt = dynamic_cast<structured_control_flow::Map*>(current)) {
×
UNCOV
77
            if (this->accept(parent, *map_stmt)) {
×
UNCOV
78
                return true;
×
79
            }
80

81
            if (this->visit(map_stmt->root())) {
×
82
                return true;
×
83
            }
84
        }
×
85
    }
86

UNCOV
87
    return false;
×
UNCOV
88
};
×
89

UNCOV
90
bool StructuredSDFGVisitor::accept(structured_control_flow::Sequence& parent,
×
91
                                   structured_control_flow::Block& node) {
UNCOV
92
    return false;
×
93
};
94

UNCOV
95
bool StructuredSDFGVisitor::accept(structured_control_flow::Sequence& parent,
×
96
                                   structured_control_flow::Sequence& node) {
UNCOV
97
    return false;
×
98
};
99

UNCOV
100
bool StructuredSDFGVisitor::accept(structured_control_flow::Sequence& parent,
×
101
                                   structured_control_flow::Return& node) {
UNCOV
102
    return false;
×
103
};
104

UNCOV
105
bool StructuredSDFGVisitor::accept(structured_control_flow::Sequence& parent,
×
106
                                   structured_control_flow::IfElse& node) {
UNCOV
107
    return false;
×
108
};
109

UNCOV
110
bool StructuredSDFGVisitor::accept(structured_control_flow::Sequence& parent,
×
111
                                   structured_control_flow::While& node) {
UNCOV
112
    return false;
×
113
};
114

UNCOV
115
bool StructuredSDFGVisitor::accept(structured_control_flow::Sequence& parent,
×
116
                                   structured_control_flow::Continue& node) {
UNCOV
117
    return false;
×
118
};
119

UNCOV
120
bool StructuredSDFGVisitor::accept(structured_control_flow::Sequence& parent,
×
121
                                   structured_control_flow::Break& node) {
UNCOV
122
    return false;
×
123
};
124

UNCOV
125
bool StructuredSDFGVisitor::accept(structured_control_flow::Sequence& parent,
×
126
                                   structured_control_flow::For& node) {
UNCOV
127
    return false;
×
128
};
129

130
bool StructuredSDFGVisitor::accept(structured_control_flow::Sequence& parent,
×
131
                                   structured_control_flow::Map& node) {
132
    return false;
×
133
};
134

135
}  // namespace visitor
136
}  // 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