GCC Code Coverage Report
Directory: . Exec Total Coverage
File: build-coverage/src/options/main_options.h Lines: 3 3 100.0 %
Date: 2021-08-14 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::options {
31
32
// clang-format off
33
34
// clang-format on
35
36
#if defined(CVC5_MUZZLED) || defined(CVC5_COMPETITION_MODE)
37
#  define DO_SEMANTIC_CHECKS_BY_DEFAULT false
38
#else /* CVC5_MUZZLED || CVC5_COMPETITION_MODE */
39
#  define DO_SEMANTIC_CHECKS_BY_DEFAULT true
40
#endif /* CVC5_MUZZLED || CVC5_COMPETITION_MODE */
41
42
27407
struct HolderDRIVER
43
{
44
// clang-format off
45
  bool dumpInstantiations = false;
46
  bool dumpInstantiationsWasSetByUser = false;
47
  bool dumpInstantiationsDebug = false;
48
  bool dumpInstantiationsDebugWasSetByUser = false;
49
  bool dumpModels = false;
50
  bool dumpModelsWasSetByUser = false;
51
  bool dumpProofs = false;
52
  bool dumpProofsWasSetByUser = false;
53
  bool dumpUnsatCores = false;
54
  bool dumpUnsatCoresWasSetByUser = false;
55
  bool dumpUnsatCoresFull = false;
56
  bool dumpUnsatCoresFullWasSetByUser = false;
57
  bool earlyExit = true;
58
  bool earlyExitWasSetByUser = false;
59
  bool forceNoLimitCpuWhileDump = false;
60
  bool forceNoLimitCpuWhileDumpWasSetByUser = false;
61
  bool help;
62
  bool helpWasSetByUser = false;
63
  bool interactive;
64
  bool interactiveWasSetByUser = false;
65
  bool interactivePrompt = true;
66
  bool interactivePromptWasSetByUser = false;
67
  uint64_t seed = 0;
68
  bool seedWasSetByUser = false;
69
  bool segvSpin = false;
70
  bool segvSpinWasSetByUser = false;
71
  bool version;
72
  bool versionWasSetByUser = false;
73
// clang-format on
74
};
75
76
#undef DO_SEMANTIC_CHECKS_BY_DEFAULT
77
78
// clang-format off
79
inline bool dumpInstantiations() { return Options::current().driver.dumpInstantiations; }
80
7
inline bool dumpInstantiationsDebug() { return Options::current().driver.dumpInstantiationsDebug; }
81
inline bool dumpModels() { return Options::current().driver.dumpModels; }
82
inline bool dumpProofs() { return Options::current().driver.dumpProofs; }
83
inline bool dumpUnsatCores() { return Options::current().driver.dumpUnsatCores; }
84
12
inline bool dumpUnsatCoresFull() { return Options::current().driver.dumpUnsatCoresFull; }
85
inline bool earlyExit() { return Options::current().driver.earlyExit; }
86
inline bool forceNoLimitCpuWhileDump() { return Options::current().driver.forceNoLimitCpuWhileDump; }
87
inline bool help() { return Options::current().driver.help; }
88
inline bool interactive() { return Options::current().driver.interactive; }
89
inline bool interactivePrompt() { return Options::current().driver.interactivePrompt; }
90
inline uint64_t seed() { return Options::current().driver.seed; }
91
inline bool segvSpin() { return Options::current().driver.segvSpin; }
92
inline bool version() { return Options::current().driver.version; }
93
// clang-format on
94
95
namespace driver
96
{
97
// clang-format off
98
static constexpr const char* dumpInstantiations__name = "dump-instantiations";
99
static constexpr const char* dumpInstantiationsDebug__name = "dump-instantiations-debug";
100
static constexpr const char* dumpModels__name = "dump-models";
101
static constexpr const char* dumpProofs__name = "dump-proofs";
102
static constexpr const char* dumpUnsatCores__name = "dump-unsat-cores";
103
static constexpr const char* dumpUnsatCoresFull__name = "dump-unsat-cores-full";
104
static constexpr const char* earlyExit__name = "early-exit";
105
static constexpr const char* forceNoLimitCpuWhileDump__name = "force-no-limit-cpu-while-dump";
106
static constexpr const char* help__name = "help";
107
static constexpr const char* interactive__name = "interactive";
108
static constexpr const char* interactivePrompt__name = "interactive-prompt";
109
static constexpr const char* seed__name = "seed";
110
static constexpr const char* segvSpin__name = "segv-spin";
111
static constexpr const char* version__name = "version";
112
113
void setDefaultDumpInstantiations(Options& opts, bool value);void setDefaultDumpInstantiationsDebug(Options& opts, bool value);void setDefaultDumpModels(Options& opts, bool value);void setDefaultDumpProofs(Options& opts, bool value);void setDefaultDumpUnsatCores(Options& opts, bool value);void setDefaultDumpUnsatCoresFull(Options& opts, bool value);void setDefaultEarlyExit(Options& opts, bool value);void setDefaultForceNoLimitCpuWhileDump(Options& opts, bool value);void setDefaultHelp(Options& opts, bool value);void setDefaultInteractive(Options& opts, bool value);void setDefaultInteractivePrompt(Options& opts, bool value);void setDefaultSeed(Options& opts, uint64_t value);void setDefaultSegvSpin(Options& opts, bool value);void setDefaultVersion(Options& opts, bool value);
114
// clang-format on
115
}
116
117
}  // namespace cvc5::options
118
119
#endif /* CVC5__OPTIONS__DRIVER_H */