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

daisytuner / sdfglib / 15049122732

15 May 2025 03:33PM UTC coverage: 62.241% (+4.7%) from 57.525%
15049122732

Pull #9

github

web-flow
Merge b96e33e0e into 9d3b1a2b3
Pull Request #9: Graphviz DOT Visualizer for SDFGs

520 of 542 new or added lines in 3 files covered. (95.94%)

782 existing lines in 68 files now uncovered.

8049 of 12932 relevant lines covered (62.24%)

504.09 hits per line

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

82.93
/src/function.cpp
1
#include "sdfg/function.h"
2

3
using json = nlohmann::json;
4

5
namespace sdfg {
6

7
Function::Function(const std::string& name)
1,004✔
8
    : name_(name){
502✔
9

10
      };
502✔
11

12
std::string Function::name() const { return this->name_; };
721✔
13

14
bool Function::exists(const std::string& name) const {
83✔
15
    return this->containers_.find(name) != this->containers_.end() ||
136✔
16
           symbolic::is_pointer(symbolic::symbol(name));
53✔
UNCOV
17
};
×
18

19
const types::IType& Function::type(const std::string& name) const {
2,137✔
20
    auto entry = this->containers_.find(name);
2,137✔
21
    assert((entry != this->containers_.end()) && "Container does not exist in SDFG");
4,274✔
22
    return *entry->second;
2,137✔
23
};
24

25
const types::StructureDefinition& Function::structure(const std::string& name) const {
25✔
26
    auto entry = this->structures_.find(name);
25✔
27
    assert((entry != this->structures_.end()) && "Structure does not exist in SDFG");
50✔
28
    return *entry->second;
25✔
29
};
30

31
const std::vector<std::string>& Function::arguments() const { return this->arguments_; };
10✔
32

33
const std::vector<std::string>& Function::externals() const { return this->externals_; };
22✔
34

35
bool Function::is_argument(const std::string& name) const {
13,250✔
36
    return std::find(this->arguments_.begin(), this->arguments_.end(), name) !=
26,500✔
37
           this->arguments_.end();
13,250✔
38
};
39

40
bool Function::is_external(const std::string& name) const {
9,719✔
41
    return std::find(this->externals_.begin(), this->externals_.end(), name) !=
19,438✔
42
           this->externals_.end();
9,719✔
43
};
44

45
bool Function::is_internal(const std::string& name) const {
9,897✔
46
    return helpers::endswith(name, external_suffix) &&
9,897✔
UNCOV
47
           is_external(name.substr(0, name.length() - external_suffix.length()));
×
UNCOV
48
};
×
49

50
bool Function::is_transient(const std::string& name) const {
13,247✔
51
    return !this->is_argument(name) && !this->is_external(name) && !this->is_internal(name);
13,247✔
52
};
53

54
bool Function::has_assumption(const symbolic::Symbol& symbol) const {
1✔
55
    return this->assumptions_.find(symbol) != this->assumptions_.end();
1✔
56
};
57

58
const symbolic::Assumption& Function::assumption(const symbolic::Symbol& symbol) const {
×
59
    auto entry = this->assumptions_.find(symbol);
×
60
    assert((entry != this->assumptions_.end()) && "Assumptions do not exist in SDFG");
×
61
    return entry->second;
×
62
};
63

64
symbolic::Assumption& Function::assumption(const symbolic::Symbol& symbol) {
1✔
65
    auto entry = this->assumptions_.find(symbol);
1✔
66
    assert((entry != this->assumptions_.end()) && "Assumptions do not exist in SDFG");
2✔
67
    return entry->second;
1✔
68
};
69

70
const symbolic::Assumptions& Function::assumptions() const { return this->assumptions_; };
134✔
71

72
}  // 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