GCC Code Coverage Report
Directory: . Exec Total Coverage
File: build-coverage/src/options/base_options.h Lines: 27 43 62.8 %
Date: 2021-03-23 Branches: 0 0 0.0 %

Line Exec Source
1
/*********************                                                        */
2
/*! \file module_template.h
3
 ** \verbatim
4
 ** Top contributors (to current version):
5
 **   Mathias Preiner
6
 ** This file is part of the CVC4 project.
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.\endverbatim
11
 **
12
 ** \brief Contains code for handling command-line options.
13
 **
14
 ** For each <module>_options.toml configuration file, mkoptions.py
15
 ** expands this template and generates a <module>_options.h file.
16
 **/
17
18
#include "cvc4_private.h"
19
20
#ifndef CVC4__OPTIONS__BASE_H
21
#define CVC4__OPTIONS__BASE_H
22
23
#include "options/options.h"
24
25
#include "options/language.h"
26
#include <iosfwd>
27
28
29
#define CVC4_OPTIONS__BASE__FOR_OPTION_HOLDER \
30
  binary_name__option_t::type binary_name;\
31
  bool binary_name__setByUser__; \
32
  err__option_t::type err;\
33
  bool err__setByUser__; \
34
  in__option_t::type in;\
35
  bool in__setByUser__; \
36
  inputLanguage__option_t::type inputLanguage;\
37
  bool inputLanguage__setByUser__; \
38
  languageHelp__option_t::type languageHelp;\
39
  bool languageHelp__setByUser__; \
40
  out__option_t::type out;\
41
  bool out__setByUser__; \
42
  outputLanguage__option_t::type outputLanguage;\
43
  bool outputLanguage__setByUser__; \
44
  parseOnly__option_t::type parseOnly;\
45
  bool parseOnly__setByUser__; \
46
  preprocessOnly__option_t::type preprocessOnly;\
47
  bool preprocessOnly__setByUser__; \
48
  printSuccess__option_t::type printSuccess;\
49
  bool printSuccess__setByUser__; \
50
  statistics__option_t::type statistics;\
51
  bool statistics__setByUser__; \
52
  statsEveryQuery__option_t::type statsEveryQuery;\
53
  bool statsEveryQuery__setByUser__; \
54
  statsHideZeros__option_t::type statsHideZeros;\
55
  bool statsHideZeros__setByUser__; \
56
  verbosity__option_t::type verbosity;\
57
  bool verbosity__setByUser__;
58
59
60
namespace CVC4 {
61
62
namespace options {
63
64
65
66
extern struct binary_name__option_t
67
{
68
  typedef std::string type;
69
  type operator()() const;
70
  bool wasSetByUser() const;
71
  void set(const type& v);
72
  const char* getName() const;
73
} thread_local binary_name;
74
extern struct err__option_t
75
{
76
  typedef std::ostream* type;
77
  type operator()() const;
78
  bool wasSetByUser() const;
79
  void set(const type& v);
80
  const char* getName() const;
81
} thread_local err;
82
extern struct in__option_t
83
{
84
  typedef std::istream* type;
85
  type operator()() const;
86
  bool wasSetByUser() const;
87
  void set(const type& v);
88
  const char* getName() const;
89
} thread_local in;
90
extern struct inputLanguage__option_t
91
{
92
  typedef InputLanguage type;
93
  type operator()() const;
94
  bool wasSetByUser() const;
95
  void set(const type& v);
96
  const char* getName() const;
97
} thread_local inputLanguage;
98
extern struct languageHelp__option_t
99
{
100
  typedef bool type;
101
  type operator()() const;
102
  bool wasSetByUser() const;
103
  void set(const type& v);
104
  const char* getName() const;
105
} thread_local languageHelp;
106
extern struct out__option_t
107
{
108
  typedef std::ostream* type;
109
  type operator()() const;
110
  bool wasSetByUser() const;
111
  void set(const type& v);
112
  const char* getName() const;
113
} thread_local out;
114
extern struct outputLanguage__option_t
115
{
116
  typedef OutputLanguage type;
117
  type operator()() const;
118
  bool wasSetByUser() const;
119
  void set(const type& v);
120
  const char* getName() const;
121
} thread_local outputLanguage;
122
extern struct parseOnly__option_t
123
{
124
  typedef bool type;
125
  type operator()() const;
126
  bool wasSetByUser() const;
127
  void set(const type& v);
128
  const char* getName() const;
129
} thread_local parseOnly;
130
extern struct preprocessOnly__option_t
131
{
132
  typedef bool type;
133
  type operator()() const;
134
  bool wasSetByUser() const;
135
  const char* getName() const;
136
} thread_local preprocessOnly;
137
extern struct printSuccess__option_t
138
{
139
  typedef bool type;
140
  type operator()() const;
141
  bool wasSetByUser() const;
142
  const char* getName() const;
143
} thread_local printSuccess;
144
extern struct statistics__option_t
145
{
146
  typedef bool type;
147
  type operator()() const;
148
  bool wasSetByUser() const;
149
  const char* getName() const;
150
} thread_local statistics;
151
extern struct statsEveryQuery__option_t
152
{
153
  typedef bool type;
154
  type operator()() const;
155
  bool wasSetByUser() const;
156
  const char* getName() const;
157
} thread_local statsEveryQuery;
158
extern struct statsHideZeros__option_t
159
{
160
  typedef bool type;
161
  type operator()() const;
162
  bool wasSetByUser() const;
163
  const char* getName() const;
164
} thread_local statsHideZeros;
165
extern struct verbosity__option_t
166
{
167
  typedef int type;
168
  type operator()() const;
169
  bool wasSetByUser() const;
170
  void set(const type& v);
171
  const char* getName() const;
172
} thread_local verbosity;
173
174
}  // namespace options
175
176
template <> void Options::set(
177
    options::binary_name__option_t,
178
    const options::binary_name__option_t::type& x);
179
template <> const options::binary_name__option_t::type& Options::operator[](
180
    options::binary_name__option_t) const;
181
template <> bool Options::wasSetByUser(options::binary_name__option_t) const;
182
template <> void Options::assign(
183
    options::binary_name__option_t,
184
    std::string option,
185
    std::string value);
186
template <> void Options::set(
187
    options::err__option_t,
188
    const options::err__option_t::type& x);
189
template <> const options::err__option_t::type& Options::operator[](
190
    options::err__option_t) const;
191
template <> bool Options::wasSetByUser(options::err__option_t) const;
192
template <> void Options::assign(
193
    options::err__option_t,
194
    std::string option,
195
    std::string value);
196
template <> void Options::set(
197
    options::in__option_t,
198
    const options::in__option_t::type& x);
199
template <> const options::in__option_t::type& Options::operator[](
200
    options::in__option_t) const;
201
template <> bool Options::wasSetByUser(options::in__option_t) const;
202
template <> void Options::assign(
203
    options::in__option_t,
204
    std::string option,
205
    std::string value);
206
template <> void Options::set(
207
    options::inputLanguage__option_t,
208
    const options::inputLanguage__option_t::type& x);
209
template <> const options::inputLanguage__option_t::type& Options::operator[](
210
    options::inputLanguage__option_t) const;
211
template <> bool Options::wasSetByUser(options::inputLanguage__option_t) const;
212
template <> void Options::assign(
213
    options::inputLanguage__option_t,
214
    std::string option,
215
    std::string value);
216
template <> void Options::set(
217
    options::languageHelp__option_t,
218
    const options::languageHelp__option_t::type& x);
219
template <> const options::languageHelp__option_t::type& Options::operator[](
220
    options::languageHelp__option_t) const;
221
template <> bool Options::wasSetByUser(options::languageHelp__option_t) const;
222
template <> void Options::assignBool(
223
    options::languageHelp__option_t,
224
    std::string option,
225
    bool value);
226
template <> void Options::set(
227
    options::out__option_t,
228
    const options::out__option_t::type& x);
229
template <> const options::out__option_t::type& Options::operator[](
230
    options::out__option_t) const;
231
template <> bool Options::wasSetByUser(options::out__option_t) const;
232
template <> void Options::assign(
233
    options::out__option_t,
234
    std::string option,
235
    std::string value);
236
template <> void Options::set(
237
    options::outputLanguage__option_t,
238
    const options::outputLanguage__option_t::type& x);
239
template <> const options::outputLanguage__option_t::type& Options::operator[](
240
    options::outputLanguage__option_t) const;
241
template <> bool Options::wasSetByUser(options::outputLanguage__option_t) const;
242
template <> void Options::assign(
243
    options::outputLanguage__option_t,
244
    std::string option,
245
    std::string value);
246
template <> void Options::set(
247
    options::parseOnly__option_t,
248
    const options::parseOnly__option_t::type& x);
249
template <> const options::parseOnly__option_t::type& Options::operator[](
250
    options::parseOnly__option_t) const;
251
template <> bool Options::wasSetByUser(options::parseOnly__option_t) const;
252
template <> void Options::assignBool(
253
    options::parseOnly__option_t,
254
    std::string option,
255
    bool value);
256
template <> const options::preprocessOnly__option_t::type& Options::operator[](
257
    options::preprocessOnly__option_t) const;
258
template <> bool Options::wasSetByUser(options::preprocessOnly__option_t) const;
259
template <> void Options::assignBool(
260
    options::preprocessOnly__option_t,
261
    std::string option,
262
    bool value);
263
template <> const options::printSuccess__option_t::type& Options::operator[](
264
    options::printSuccess__option_t) const;
265
template <> bool Options::wasSetByUser(options::printSuccess__option_t) const;
266
template <> void Options::assignBool(
267
    options::printSuccess__option_t,
268
    std::string option,
269
    bool value);
270
template <> const options::statistics__option_t::type& Options::operator[](
271
    options::statistics__option_t) const;
272
template <> bool Options::wasSetByUser(options::statistics__option_t) const;
273
template <> void Options::assignBool(
274
    options::statistics__option_t,
275
    std::string option,
276
    bool value);
277
template <> const options::statsEveryQuery__option_t::type& Options::operator[](
278
    options::statsEveryQuery__option_t) const;
279
template <> bool Options::wasSetByUser(options::statsEveryQuery__option_t) const;
280
template <> void Options::assignBool(
281
    options::statsEveryQuery__option_t,
282
    std::string option,
283
    bool value);
284
template <> const options::statsHideZeros__option_t::type& Options::operator[](
285
    options::statsHideZeros__option_t) const;
286
template <> bool Options::wasSetByUser(options::statsHideZeros__option_t) const;
287
template <> void Options::assignBool(
288
    options::statsHideZeros__option_t,
289
    std::string option,
290
    bool value);
291
template <> void Options::set(
292
    options::verbosity__option_t,
293
    const options::verbosity__option_t::type& x);
294
template <> const options::verbosity__option_t::type& Options::operator[](
295
    options::verbosity__option_t) const;
296
template <> bool Options::wasSetByUser(options::verbosity__option_t) const;
297
template <> void Options::assign(
298
    options::verbosity__option_t,
299
    std::string option,
300
    std::string value);
301
302
303
namespace options {
304
305
inline binary_name__option_t::type binary_name__option_t::operator()() const
306
{
307
  return (*Options::current())[*this];
308
}
309
inline bool binary_name__option_t::wasSetByUser() const
310
{
311
  return Options::current()->wasSetByUser(*this);
312
}
313
inline void binary_name__option_t::set(const binary_name__option_t::type& v)
314
{
315
  Options::current()->set(*this, v);
316
}
317
inline const char* binary_name__option_t::getName() const
318
{
319
  return "";
320
}
321
19202
inline err__option_t::type err__option_t::operator()() const
322
{
323
19202
  return (*Options::current())[*this];
324
}
325
inline bool err__option_t::wasSetByUser() const
326
{
327
  return Options::current()->wasSetByUser(*this);
328
}
329
inline void err__option_t::set(const err__option_t::type& v)
330
{
331
  Options::current()->set(*this, v);
332
}
333
inline const char* err__option_t::getName() const
334
{
335
  return "";
336
}
337
inline in__option_t::type in__option_t::operator()() const
338
{
339
  return (*Options::current())[*this];
340
}
341
inline bool in__option_t::wasSetByUser() const
342
{
343
  return Options::current()->wasSetByUser(*this);
344
}
345
inline void in__option_t::set(const in__option_t::type& v)
346
{
347
  Options::current()->set(*this, v);
348
}
349
inline const char* in__option_t::getName() const
350
{
351
  return "";
352
}
353
88676
inline inputLanguage__option_t::type inputLanguage__option_t::operator()() const
354
{
355
88676
  return (*Options::current())[*this];
356
}
357
2927
inline bool inputLanguage__option_t::wasSetByUser() const
358
{
359
2927
  return Options::current()->wasSetByUser(*this);
360
}
361
664
inline void inputLanguage__option_t::set(const inputLanguage__option_t::type& v)
362
{
363
664
  Options::current()->set(*this, v);
364
664
}
365
inline const char* inputLanguage__option_t::getName() const
366
{
367
  return "lang";
368
}
369
inline languageHelp__option_t::type languageHelp__option_t::operator()() const
370
{
371
  return (*Options::current())[*this];
372
}
373
inline bool languageHelp__option_t::wasSetByUser() const
374
{
375
  return Options::current()->wasSetByUser(*this);
376
}
377
inline void languageHelp__option_t::set(const languageHelp__option_t::type& v)
378
{
379
  Options::current()->set(*this, v);
380
}
381
inline const char* languageHelp__option_t::getName() const
382
{
383
  return "";
384
}
385
34
inline out__option_t::type out__option_t::operator()() const
386
{
387
34
  return (*Options::current())[*this];
388
}
389
inline bool out__option_t::wasSetByUser() const
390
{
391
  return Options::current()->wasSetByUser(*this);
392
}
393
inline void out__option_t::set(const out__option_t::type& v)
394
{
395
  Options::current()->set(*this, v);
396
}
397
inline const char* out__option_t::getName() const
398
{
399
  return "";
400
}
401
619426
inline outputLanguage__option_t::type outputLanguage__option_t::operator()() const
402
{
403
619426
  return (*Options::current())[*this];
404
}
405
2926
inline bool outputLanguage__option_t::wasSetByUser() const
406
{
407
2926
  return Options::current()->wasSetByUser(*this);
408
}
409
2
inline void outputLanguage__option_t::set(const outputLanguage__option_t::type& v)
410
{
411
2
  Options::current()->set(*this, v);
412
2
}
413
inline const char* outputLanguage__option_t::getName() const
414
{
415
  return "output-lang";
416
}
417
inline parseOnly__option_t::type parseOnly__option_t::operator()() const
418
{
419
  return (*Options::current())[*this];
420
}
421
inline bool parseOnly__option_t::wasSetByUser() const
422
{
423
  return Options::current()->wasSetByUser(*this);
424
}
425
inline void parseOnly__option_t::set(const parseOnly__option_t::type& v)
426
{
427
  Options::current()->set(*this, v);
428
}
429
inline const char* parseOnly__option_t::getName() const
430
{
431
  return "parse-only";
432
}
433
12422
inline preprocessOnly__option_t::type preprocessOnly__option_t::operator()() const
434
{
435
12422
  return (*Options::current())[*this];
436
}
437
inline bool preprocessOnly__option_t::wasSetByUser() const
438
{
439
  return Options::current()->wasSetByUser(*this);
440
}
441
inline const char* preprocessOnly__option_t::getName() const
442
{
443
  return "preprocess-only";
444
}
445
inline printSuccess__option_t::type printSuccess__option_t::operator()() const
446
{
447
  return (*Options::current())[*this];
448
}
449
inline bool printSuccess__option_t::wasSetByUser() const
450
{
451
  return Options::current()->wasSetByUser(*this);
452
}
453
9209
inline const char* printSuccess__option_t::getName() const
454
{
455
9209
  return "print-success";
456
}
457
inline statistics__option_t::type statistics__option_t::operator()() const
458
{
459
  return (*Options::current())[*this];
460
}
461
inline bool statistics__option_t::wasSetByUser() const
462
{
463
  return Options::current()->wasSetByUser(*this);
464
}
465
inline const char* statistics__option_t::getName() const
466
{
467
  return "stats";
468
}
469
inline statsEveryQuery__option_t::type statsEveryQuery__option_t::operator()() const
470
{
471
  return (*Options::current())[*this];
472
}
473
inline bool statsEveryQuery__option_t::wasSetByUser() const
474
{
475
  return Options::current()->wasSetByUser(*this);
476
}
477
inline const char* statsEveryQuery__option_t::getName() const
478
{
479
  return "stats-every-query";
480
}
481
inline statsHideZeros__option_t::type statsHideZeros__option_t::operator()() const
482
{
483
  return (*Options::current())[*this];
484
}
485
inline bool statsHideZeros__option_t::wasSetByUser() const
486
{
487
  return Options::current()->wasSetByUser(*this);
488
}
489
inline const char* statsHideZeros__option_t::getName() const
490
{
491
  return "stats-hide-zeros";
492
}
493
12781
inline verbosity__option_t::type verbosity__option_t::operator()() const
494
{
495
12781
  return (*Options::current())[*this];
496
}
497
inline bool verbosity__option_t::wasSetByUser() const
498
{
499
  return Options::current()->wasSetByUser(*this);
500
}
501
181
inline void verbosity__option_t::set(const verbosity__option_t::type& v)
502
{
503
181
  Options::current()->set(*this, v);
504
181
}
505
inline const char* verbosity__option_t::getName() const
506
{
507
  return "";
508
}
509
510
}  // namespace options
511
}  // namespace CVC4
512
513
#endif /* CVC4__OPTIONS__BASE_H */