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

vbpf / ebpf-verifier / 12845504567

18 Jan 2025 04:08PM UTC coverage: 88.169% (-1.5%) from 89.646%
12845504567

push

github

web-flow
Handle upgrade from LCOV 1.15 to LCOV 2.0 (#826)

* Testing code coverage with a comment only change
* Workaround for failing code coverage
* Testing code coverage fix

Signed-off-by: Alan Jowett <alanjo@microsoft.com>

8481 of 9619 relevant lines covered (88.17%)

7430805.79 hits per line

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

83.33
/src/string_constraints.hpp
1
// Copyright (c) Prevail Verifier contributors.
2
// SPDX-License-Identifier: MIT
3

4
#pragma once
5

6
#include <regex>
7
#include <set>
8
#include <string>
9
#include <vector>
10

11
#include "crab/interval.hpp"
12
#include "crab/linear_constraint.hpp"
13

14
struct string_invariant {
2,264✔
15
    std::optional<std::set<std::string>> maybe_inv{};
16

17
    string_invariant() = default;
198✔
18

19
    explicit string_invariant(std::set<std::string> inv) : maybe_inv(std::move(inv)){};
5,844✔
20

21
    string_invariant(const string_invariant& inv) = default;
7,941✔
22
    string_invariant& operator=(const string_invariant& inv) = default;
114✔
23

24
    [[nodiscard]]
25
    bool is_bottom() const {
5,388✔
26
        return !maybe_inv;
5,131✔
27
    }
28
    [[nodiscard]]
29
    bool empty() const {
×
30
        return maybe_inv && maybe_inv->empty();
×
31
    }
32

33
    static string_invariant top() { return string_invariant{{}}; }
1,682✔
34
    static string_invariant bottom() { return string_invariant{}; }
198✔
35

36
    [[nodiscard]]
37
    const std::set<std::string>& value() const {
3,068✔
38
        if (is_bottom()) {
3,068✔
39
            throw std::runtime_error("cannot iterate bottom");
×
40
        }
41
        return *maybe_inv;
3,068✔
42
    }
43

44
    string_invariant operator-(const string_invariant& b) const;
45
    string_invariant operator+(const string_invariant& b) const;
46

47
    bool operator==(const string_invariant& other) const { return maybe_inv == other.maybe_inv; }
1,384✔
48

49
    [[nodiscard]]
50
    bool contains(const std::string& item) const {
868✔
51
        return maybe_inv.value().contains(item);
868✔
52
    }
53

54
    friend std::ostream& operator<<(std::ostream&, const string_invariant& inv);
55
};
56

57
std::vector<crab::linear_constraint_t> parse_linear_constraints(const std::set<std::string>& constraints,
58
                                                                std::vector<crab::interval_t>& numeric_ranges);
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