GCC Code Coverage Report
Directory: . Exec Total Coverage
File: build-coverage/src/options/main_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__DRIVER_H
22
#define CVC5__OPTIONS__DRIVER_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
25268
struct HolderDRIVER
44
{
45
// clang-format off
46
  bool earlyExit = true;\
47
  bool earlyExit__setByUser__ = false;
48
  bool help;\
49
  bool help__setByUser__ = false;
50
  bool interactive;\
51
  bool interactive__setByUser__ = false;
52
  bool interactivePrompt = true;\
53
  bool interactivePrompt__setByUser__ = false;
54
  uint64_t seed = 0;\
55
  bool seed__setByUser__ = false;
56
  bool segvSpin = false;\
57
  bool segvSpin__setByUser__ = false;
58
  int tearDownIncremental = 0;\
59
  bool tearDownIncremental__setByUser__ = false;
60
  bool version;\
61
  bool version__setByUser__ = false;
62
// clang-format on
63
};
64
65
#undef DO_SEMANTIC_CHECKS_BY_DEFAULT
66
67
// clang-format off
68
extern struct earlyExit__option_t
69
{
70
  typedef bool type;
71
  type operator()() const;
72
} thread_local earlyExit;
73
extern struct help__option_t
74
{
75
  typedef bool type;
76
  type operator()() const;
77
} thread_local help;
78
extern struct interactive__option_t
79
{
80
  typedef bool type;
81
  type operator()() const;
82
} thread_local interactive;
83
extern struct interactivePrompt__option_t
84
{
85
  typedef bool type;
86
  type operator()() const;
87
} thread_local interactivePrompt;
88
extern struct seed__option_t
89
{
90
  typedef uint64_t type;
91
  type operator()() const;
92
} thread_local seed;
93
extern struct segvSpin__option_t
94
{
95
  typedef bool type;
96
  type operator()() const;
97
} thread_local segvSpin;
98
extern struct tearDownIncremental__option_t
99
{
100
  typedef int type;
101
  type operator()() const;
102
} thread_local tearDownIncremental;
103
extern struct version__option_t
104
{
105
  typedef bool type;
106
  type operator()() const;
107
} thread_local version;
108
// clang-format on
109
110
namespace driver
111
{
112
// clang-format off
113
static constexpr const char* earlyExit__name = "early-exit";
114
static constexpr const char* help__name = "help";
115
static constexpr const char* interactive__name = "interactive";
116
static constexpr const char* interactivePrompt__name = "interactive-prompt";
117
static constexpr const char* seed__name = "seed";
118
static constexpr const char* segvSpin__name = "segv-spin";
119
static constexpr const char* tearDownIncremental__name = "tear-down-incremental";
120
static constexpr const char* version__name = "version";
121
// clang-format on
122
}
123
124
}  // namespace options
125
126
// clang-format off
127
template <> options::earlyExit__option_t::type& Options::ref(
128
    options::earlyExit__option_t);
129
template <> const options::earlyExit__option_t::type& Options::operator[](
130
    options::earlyExit__option_t) const;
131
template <> bool Options::wasSetByUser(options::earlyExit__option_t) const;
132
template <> options::help__option_t::type& Options::ref(
133
    options::help__option_t);
134
template <> const options::help__option_t::type& Options::operator[](
135
    options::help__option_t) const;
136
template <> bool Options::wasSetByUser(options::help__option_t) const;
137
template <> options::interactive__option_t::type& Options::ref(
138
    options::interactive__option_t);
139
template <> const options::interactive__option_t::type& Options::operator[](
140
    options::interactive__option_t) const;
141
template <> bool Options::wasSetByUser(options::interactive__option_t) const;
142
template <> options::interactivePrompt__option_t::type& Options::ref(
143
    options::interactivePrompt__option_t);
144
template <> const options::interactivePrompt__option_t::type& Options::operator[](
145
    options::interactivePrompt__option_t) const;
146
template <> bool Options::wasSetByUser(options::interactivePrompt__option_t) const;
147
template <> options::seed__option_t::type& Options::ref(
148
    options::seed__option_t);
149
template <> const options::seed__option_t::type& Options::operator[](
150
    options::seed__option_t) const;
151
template <> bool Options::wasSetByUser(options::seed__option_t) const;
152
template <> options::segvSpin__option_t::type& Options::ref(
153
    options::segvSpin__option_t);
154
template <> const options::segvSpin__option_t::type& Options::operator[](
155
    options::segvSpin__option_t) const;
156
template <> bool Options::wasSetByUser(options::segvSpin__option_t) const;
157
template <> options::tearDownIncremental__option_t::type& Options::ref(
158
    options::tearDownIncremental__option_t);
159
template <> const options::tearDownIncremental__option_t::type& Options::operator[](
160
    options::tearDownIncremental__option_t) const;
161
template <> bool Options::wasSetByUser(options::tearDownIncremental__option_t) const;
162
template <> options::version__option_t::type& Options::ref(
163
    options::version__option_t);
164
template <> const options::version__option_t::type& Options::operator[](
165
    options::version__option_t) const;
166
template <> bool Options::wasSetByUser(options::version__option_t) const;
167
// clang-format on
168
169
namespace options {
170
// clang-format off
171
inline earlyExit__option_t::type earlyExit__option_t::operator()() const
172
{
173
  return Options::current()[*this];
174
}
175
inline help__option_t::type help__option_t::operator()() const
176
{
177
  return Options::current()[*this];
178
}
179
inline interactive__option_t::type interactive__option_t::operator()() const
180
{
181
  return Options::current()[*this];
182
}
183
inline interactivePrompt__option_t::type interactivePrompt__option_t::operator()() const
184
{
185
  return Options::current()[*this];
186
}
187
inline seed__option_t::type seed__option_t::operator()() const
188
{
189
  return Options::current()[*this];
190
}
191
inline segvSpin__option_t::type segvSpin__option_t::operator()() const
192
{
193
  return Options::current()[*this];
194
}
195
inline tearDownIncremental__option_t::type tearDownIncremental__option_t::operator()() const
196
{
197
  return Options::current()[*this];
198
}
199
inline version__option_t::type version__option_t::operator()() const
200
{
201
  return Options::current()[*this];
202
}
203
// clang-format on
204
205
}  // namespace options
206
}  // namespace cvc5
207
208
#endif /* CVC5__OPTIONS__DRIVER_H */