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