GCC Code Coverage Report
Directory: . Exec Total Coverage
File: build-coverage/src/options/resource_manager_options.h Lines: 1 1 100.0 %
Date: 2021-05-22 Branches: 0 0 0.0 %

Line Exec Source
1
/******************************************************************************
2
 * Top contributors (to current version):
3
 *   Mathias Preiner, Aina Niemetz
4
 *
5
 * This file is part of the cvc5 project.
6
 *
7
 * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
8
 * in the top-level source directory and their institutional affiliations.
9
 * All rights reserved.  See the file COPYING in the top-level source
10
 * directory for licensing information.
11
 * ****************************************************************************
12
 *
13
 * Contains code for handling command-line options.
14
 *
15
 * For each <module>_options.toml configuration file, mkoptions.py
16
 * expands this template and generates a <module>_options.h file.
17
 */
18
19
#include "cvc5_private.h"
20
21
#ifndef CVC5__OPTIONS__RESMAN_H
22
#define CVC5__OPTIONS__RESMAN_H
23
24
#include "options/options.h"
25
26
// clang-format off
27
28
// clang-format on
29
30
namespace cvc5 {
31
namespace options {
32
33
// clang-format off
34
35
// clang-format on
36
37
#if defined(CVC5_MUZZLED) || defined(CVC5_COMPETITION_MODE)
38
#  define DO_SEMANTIC_CHECKS_BY_DEFAULT false
39
#else /* CVC5_MUZZLED || CVC5_COMPETITION_MODE */
40
#  define DO_SEMANTIC_CHECKS_BY_DEFAULT true
41
#endif /* CVC5_MUZZLED || CVC5_COMPETITION_MODE */
42
43
63271
struct HolderRESMAN
44
{
45
// clang-format off
46
  std::vector<std::string> resourceWeightHolder;\
47
  bool resourceWeightHolder__setByUser__ = false;
48
  uint64_t perCallResourceLimit;\
49
  bool perCallResourceLimit__setByUser__ = false;
50
  uint64_t cumulativeResourceLimit;\
51
  bool cumulativeResourceLimit__setByUser__ = false;
52
  uint64_t perCallMillisecondLimit;\
53
  bool perCallMillisecondLimit__setByUser__ = false;
54
  uint64_t cumulativeMillisecondLimit;\
55
  bool cumulativeMillisecondLimit__setByUser__ = false;
56
// clang-format on
57
};
58
59
#undef DO_SEMANTIC_CHECKS_BY_DEFAULT
60
61
// clang-format off
62
extern struct resourceWeightHolder__option_t
63
{
64
  typedef std::vector<std::string> type;
65
  type operator()() const;
66
} thread_local resourceWeightHolder;
67
extern struct perCallResourceLimit__option_t
68
{
69
  typedef uint64_t type;
70
  type operator()() const;
71
} thread_local perCallResourceLimit;
72
extern struct cumulativeResourceLimit__option_t
73
{
74
  typedef uint64_t type;
75
  type operator()() const;
76
} thread_local cumulativeResourceLimit;
77
extern struct perCallMillisecondLimit__option_t
78
{
79
  typedef uint64_t type;
80
  type operator()() const;
81
} thread_local perCallMillisecondLimit;
82
extern struct cumulativeMillisecondLimit__option_t
83
{
84
  typedef uint64_t type;
85
  type operator()() const;
86
} thread_local cumulativeMillisecondLimit;
87
// clang-format on
88
89
namespace resman
90
{
91
// clang-format off
92
static constexpr const char* resourceWeightHolder__name = "";
93
static constexpr const char* perCallResourceLimit__name = "rlimit-per";
94
static constexpr const char* cumulativeResourceLimit__name = "rlimit";
95
static constexpr const char* perCallMillisecondLimit__name = "tlimit-per";
96
static constexpr const char* cumulativeMillisecondLimit__name = "tlimit";
97
// clang-format on
98
}
99
100
}  // namespace options
101
102
// clang-format off
103
template <> options::resourceWeightHolder__option_t::type& Options::ref(
104
    options::resourceWeightHolder__option_t);
105
template <> const options::resourceWeightHolder__option_t::type& Options::operator[](
106
    options::resourceWeightHolder__option_t) const;
107
template <> bool Options::wasSetByUser(options::resourceWeightHolder__option_t) const;
108
template <> options::perCallResourceLimit__option_t::type& Options::ref(
109
    options::perCallResourceLimit__option_t);
110
template <> const options::perCallResourceLimit__option_t::type& Options::operator[](
111
    options::perCallResourceLimit__option_t) const;
112
template <> bool Options::wasSetByUser(options::perCallResourceLimit__option_t) const;
113
template <> options::cumulativeResourceLimit__option_t::type& Options::ref(
114
    options::cumulativeResourceLimit__option_t);
115
template <> const options::cumulativeResourceLimit__option_t::type& Options::operator[](
116
    options::cumulativeResourceLimit__option_t) const;
117
template <> bool Options::wasSetByUser(options::cumulativeResourceLimit__option_t) const;
118
template <> options::perCallMillisecondLimit__option_t::type& Options::ref(
119
    options::perCallMillisecondLimit__option_t);
120
template <> const options::perCallMillisecondLimit__option_t::type& Options::operator[](
121
    options::perCallMillisecondLimit__option_t) const;
122
template <> bool Options::wasSetByUser(options::perCallMillisecondLimit__option_t) const;
123
template <> options::cumulativeMillisecondLimit__option_t::type& Options::ref(
124
    options::cumulativeMillisecondLimit__option_t);
125
template <> const options::cumulativeMillisecondLimit__option_t::type& Options::operator[](
126
    options::cumulativeMillisecondLimit__option_t) const;
127
template <> bool Options::wasSetByUser(options::cumulativeMillisecondLimit__option_t) const;
128
// clang-format on
129
130
namespace options {
131
// clang-format off
132
inline resourceWeightHolder__option_t::type resourceWeightHolder__option_t::operator()() const
133
{
134
  return Options::current()[*this];
135
}
136
inline perCallResourceLimit__option_t::type perCallResourceLimit__option_t::operator()() const
137
{
138
  return Options::current()[*this];
139
}
140
inline cumulativeResourceLimit__option_t::type cumulativeResourceLimit__option_t::operator()() const
141
{
142
  return Options::current()[*this];
143
}
144
inline perCallMillisecondLimit__option_t::type perCallMillisecondLimit__option_t::operator()() const
145
{
146
  return Options::current()[*this];
147
}
148
inline cumulativeMillisecondLimit__option_t::type cumulativeMillisecondLimit__option_t::operator()() const
149
{
150
  return Options::current()[*this];
151
}
152
// clang-format on
153
154
}  // namespace options
155
}  // namespace cvc5
156
157
#endif /* CVC5__OPTIONS__RESMAN_H */