GCC Code Coverage Report
Directory: . Exec Total Coverage
File: build-coverage/src/options/main_options.h Lines: 3 3 100.0 %
Date: 2021-09-18 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::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
62763
struct HolderDRIVER
43
{
44
// clang-format off
45
bool dumpDifficulty = false;
46
  bool dumpDifficultyWasSetByUser = false;
47
  bool dumpInstantiations = false;
48
  bool dumpInstantiationsWasSetByUser = false;
49
  bool dumpInstantiationsDebug = false;
50
  bool dumpInstantiationsDebugWasSetByUser = false;
51
  bool dumpModels = false;
52
  bool dumpModelsWasSetByUser = false;
53
  bool dumpProofs = false;
54
  bool dumpProofsWasSetByUser = false;
55
  bool dumpUnsatCores = false;
56
  bool dumpUnsatCoresWasSetByUser = false;
57
  bool dumpUnsatCoresFull = false;
58
  bool dumpUnsatCoresFullWasSetByUser = false;
59
  bool earlyExit = true;
60
  bool earlyExitWasSetByUser = false;
61
  std::string filename;
62
  bool filenameWasSetByUser = false;
63
  bool forceNoLimitCpuWhileDump = false;
64
  bool forceNoLimitCpuWhileDumpWasSetByUser = false;
65
  bool help;
66
  bool helpWasSetByUser = false;
67
  bool interactive;
68
  bool interactiveWasSetByUser = false;
69
  uint64_t seed = 0;
70
  bool seedWasSetByUser = false;
71
  bool segvSpin = false;
72
  bool segvSpinWasSetByUser = false;
73
  bool version;
74
  bool versionWasSetByUser = false;
75
// clang-format on
76
};
77
78
#undef DO_SEMANTIC_CHECKS_BY_DEFAULT
79
80
// clang-format off
81
inline bool dumpDifficulty() { return Options::current().driver.dumpDifficulty; }
82
inline bool dumpInstantiations() { return Options::current().driver.dumpInstantiations; }
83
7
inline bool dumpInstantiationsDebug() { return Options::current().driver.dumpInstantiationsDebug; }
84
inline bool dumpModels() { return Options::current().driver.dumpModels; }
85
inline bool dumpProofs() { return Options::current().driver.dumpProofs; }
86
inline bool dumpUnsatCores() { return Options::current().driver.dumpUnsatCores; }
87
12
inline bool dumpUnsatCoresFull() { return Options::current().driver.dumpUnsatCoresFull; }
88
inline bool earlyExit() { return Options::current().driver.earlyExit; }
89
inline std::string filename() { return Options::current().driver.filename; }
90
inline bool forceNoLimitCpuWhileDump() { return Options::current().driver.forceNoLimitCpuWhileDump; }
91
inline bool help() { return Options::current().driver.help; }
92
inline bool interactive() { return Options::current().driver.interactive; }
93
inline uint64_t seed() { return Options::current().driver.seed; }
94
inline bool segvSpin() { return Options::current().driver.segvSpin; }
95
inline bool version() { return Options::current().driver.version; }
96
// clang-format on
97
98
namespace driver
99
{
100
// clang-format off
101
static constexpr const char* dumpDifficulty__name = "dump-difficulty";
102
static constexpr const char* dumpInstantiations__name = "dump-instantiations";
103
static constexpr const char* dumpInstantiationsDebug__name = "dump-instantiations-debug";
104
static constexpr const char* dumpModels__name = "dump-models";
105
static constexpr const char* dumpProofs__name = "dump-proofs";
106
static constexpr const char* dumpUnsatCores__name = "dump-unsat-cores";
107
static constexpr const char* dumpUnsatCoresFull__name = "dump-unsat-cores-full";
108
static constexpr const char* earlyExit__name = "early-exit";
109
static constexpr const char* filename__name = "filename";
110
static constexpr const char* forceNoLimitCpuWhileDump__name = "force-no-limit-cpu-while-dump";
111
static constexpr const char* help__name = "help";
112
static constexpr const char* interactive__name = "interactive";
113
static constexpr const char* seed__name = "seed";
114
static constexpr const char* segvSpin__name = "segv-spin";
115
static constexpr const char* version__name = "version";
116
117
void setDefaultDumpDifficulty(Options& opts, bool value);
118
void setDefaultDumpInstantiations(Options& opts, bool value);
119
void setDefaultDumpInstantiationsDebug(Options& opts, bool value);
120
void setDefaultDumpModels(Options& opts, bool value);
121
void setDefaultDumpProofs(Options& opts, bool value);
122
void setDefaultDumpUnsatCores(Options& opts, bool value);
123
void setDefaultDumpUnsatCoresFull(Options& opts, bool value);
124
void setDefaultEarlyExit(Options& opts, bool value);
125
void setDefaultFilename(Options& opts, std::string value);
126
void setDefaultForceNoLimitCpuWhileDump(Options& opts, bool value);
127
void setDefaultHelp(Options& opts, bool value);
128
void setDefaultInteractive(Options& opts, bool value);
129
void setDefaultSeed(Options& opts, uint64_t value);
130
void setDefaultSegvSpin(Options& opts, bool value);
131
void setDefaultVersion(Options& opts, bool value);
132
// clang-format on
133
}
134
135
}  // namespace cvc5::options
136
137
#endif /* CVC5__OPTIONS__DRIVER_H */