GCC Code Coverage Report
Directory: . Exec Total Coverage
File: build-coverage/src/options/main_options.h Lines: 11 11 100.0 %
Date: 2021-08-06 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_public.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
27401
struct HolderDRIVER
44
{
45
// clang-format off
46
  bool dumpInstantiations = false;
47
  bool dumpInstantiationsWasSetByUser = false;
48
  bool dumpInstantiationsDebug = false;
49
  bool dumpInstantiationsDebugWasSetByUser = false;
50
  bool dumpModels = false;
51
  bool dumpModelsWasSetByUser = false;
52
  bool dumpProofs = false;
53
  bool dumpProofsWasSetByUser = false;
54
  bool dumpUnsatCores = false;
55
  bool dumpUnsatCoresWasSetByUser = false;
56
  bool dumpUnsatCoresFull = false;
57
  bool dumpUnsatCoresFullWasSetByUser = false;
58
  bool earlyExit = true;
59
  bool earlyExitWasSetByUser = false;
60
  bool forceNoLimitCpuWhileDump = false;
61
  bool forceNoLimitCpuWhileDumpWasSetByUser = false;
62
  bool help;
63
  bool helpWasSetByUser = false;
64
  bool interactive;
65
  bool interactiveWasSetByUser = false;
66
  bool interactivePrompt = true;
67
  bool interactivePromptWasSetByUser = false;
68
  uint64_t seed = 0;
69
  bool seedWasSetByUser = false;
70
  bool segvSpin = false;
71
  bool segvSpinWasSetByUser = false;
72
  bool version;
73
  bool versionWasSetByUser = false;
74
// clang-format on
75
};
76
77
#undef DO_SEMANTIC_CHECKS_BY_DEFAULT
78
79
// clang-format off
80
extern struct dumpInstantiations__option_t
81
{
82
  typedef bool type;
83
  type operator()() const;
84
} thread_local dumpInstantiations;
85
extern struct dumpInstantiationsDebug__option_t
86
{
87
  typedef bool type;
88
  type operator()() const;
89
} thread_local dumpInstantiationsDebug;
90
extern struct dumpModels__option_t
91
{
92
  typedef bool type;
93
  type operator()() const;
94
} thread_local dumpModels;
95
extern struct dumpProofs__option_t
96
{
97
  typedef bool type;
98
  type operator()() const;
99
} thread_local dumpProofs;
100
extern struct dumpUnsatCores__option_t
101
{
102
  typedef bool type;
103
  type operator()() const;
104
} thread_local dumpUnsatCores;
105
extern struct dumpUnsatCoresFull__option_t
106
{
107
  typedef bool type;
108
  type operator()() const;
109
} thread_local dumpUnsatCoresFull;
110
extern struct earlyExit__option_t
111
{
112
  typedef bool type;
113
  type operator()() const;
114
} thread_local earlyExit;
115
extern struct forceNoLimitCpuWhileDump__option_t
116
{
117
  typedef bool type;
118
  type operator()() const;
119
} thread_local forceNoLimitCpuWhileDump;
120
extern struct help__option_t
121
{
122
  typedef bool type;
123
  type operator()() const;
124
} thread_local help;
125
extern struct interactive__option_t
126
{
127
  typedef bool type;
128
  type operator()() const;
129
} thread_local interactive;
130
extern struct interactivePrompt__option_t
131
{
132
  typedef bool type;
133
  type operator()() const;
134
} thread_local interactivePrompt;
135
extern struct seed__option_t
136
{
137
  typedef uint64_t type;
138
  type operator()() const;
139
} thread_local seed;
140
extern struct segvSpin__option_t
141
{
142
  typedef bool type;
143
  type operator()() const;
144
} thread_local segvSpin;
145
extern struct version__option_t
146
{
147
  typedef bool type;
148
  type operator()() const;
149
} thread_local version;
150
// clang-format on
151
152
namespace driver
153
{
154
// clang-format off
155
static constexpr const char* dumpInstantiations__name = "dump-instantiations";
156
static constexpr const char* dumpInstantiationsDebug__name = "dump-instantiations-debug";
157
static constexpr const char* dumpModels__name = "dump-models";
158
static constexpr const char* dumpProofs__name = "dump-proofs";
159
static constexpr const char* dumpUnsatCores__name = "dump-unsat-cores";
160
static constexpr const char* dumpUnsatCoresFull__name = "dump-unsat-cores-full";
161
static constexpr const char* earlyExit__name = "early-exit";
162
static constexpr const char* forceNoLimitCpuWhileDump__name = "force-no-limit-cpu-while-dump";
163
static constexpr const char* help__name = "help";
164
static constexpr const char* interactive__name = "interactive";
165
static constexpr const char* interactivePrompt__name = "interactive-prompt";
166
static constexpr const char* seed__name = "seed";
167
static constexpr const char* segvSpin__name = "segv-spin";
168
static constexpr const char* version__name = "version";
169
// clang-format on
170
}
171
172
}  // namespace options
173
174
// clang-format off
175
176
// clang-format on
177
178
namespace options {
179
// clang-format off
180
inline bool dumpInstantiations__option_t::operator()() const
181
{ return Options::current().driver.dumpInstantiations; }
182
7
inline bool dumpInstantiationsDebug__option_t::operator()() const
183
7
{ return Options::current().driver.dumpInstantiationsDebug; }
184
8555
inline bool dumpModels__option_t::operator()() const
185
8555
{ return Options::current().driver.dumpModels; }
186
8695
inline bool dumpProofs__option_t::operator()() const
187
8695
{ return Options::current().driver.dumpProofs; }
188
8697
inline bool dumpUnsatCores__option_t::operator()() const
189
8697
{ return Options::current().driver.dumpUnsatCores; }
190
9866
inline bool dumpUnsatCoresFull__option_t::operator()() const
191
9866
{ return Options::current().driver.dumpUnsatCoresFull; }
192
inline bool earlyExit__option_t::operator()() const
193
{ return Options::current().driver.earlyExit; }
194
inline bool forceNoLimitCpuWhileDump__option_t::operator()() const
195
{ return Options::current().driver.forceNoLimitCpuWhileDump; }
196
inline bool help__option_t::operator()() const
197
{ return Options::current().driver.help; }
198
inline bool interactive__option_t::operator()() const
199
{ return Options::current().driver.interactive; }
200
inline bool interactivePrompt__option_t::operator()() const
201
{ return Options::current().driver.interactivePrompt; }
202
inline uint64_t seed__option_t::operator()() const
203
{ return Options::current().driver.seed; }
204
inline bool segvSpin__option_t::operator()() const
205
{ return Options::current().driver.segvSpin; }
206
inline bool version__option_t::operator()() const
207
{ return Options::current().driver.version; }
208
// clang-format on
209
210
namespace driver
211
{
212
// clang-format off
213
void setDefaultDumpInstantiations(Options& opts, bool value);
214
void setDefaultDumpInstantiationsDebug(Options& opts, bool value);
215
void setDefaultDumpModels(Options& opts, bool value);
216
void setDefaultDumpProofs(Options& opts, bool value);
217
void setDefaultDumpUnsatCores(Options& opts, bool value);
218
void setDefaultDumpUnsatCoresFull(Options& opts, bool value);
219
void setDefaultEarlyExit(Options& opts, bool value);
220
void setDefaultForceNoLimitCpuWhileDump(Options& opts, bool value);
221
void setDefaultHelp(Options& opts, bool value);
222
void setDefaultInteractive(Options& opts, bool value);
223
void setDefaultInteractivePrompt(Options& opts, bool value);
224
void setDefaultSeed(Options& opts, uint64_t value);
225
void setDefaultSegvSpin(Options& opts, bool value);
226
void setDefaultVersion(Options& opts, bool value);
227
// clang-format on
228
}
229
230
}  // namespace options
231
}  // namespace cvc5
232
233
#endif /* CVC5__OPTIONS__DRIVER_H */