GCC Code Coverage Report
Directory: . Exec Total Coverage
File: build-coverage/src/options/smt_options.h Lines: 13 13 100.0 %
Date: 2021-11-07 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__SMT_H
22
#define CVC5__OPTIONS__SMT_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
enum class BlockModelsMode
34
{
35
  VALUES, NONE, LITERALS,
36
  __MAX_VALUE = LITERALS
37
};
38
std::ostream& operator<<(std::ostream& os, BlockModelsMode mode);
39
BlockModelsMode stringToBlockModelsMode(const std::string& optarg);
40
41
enum class DifficultyMode
42
{
43
  LEMMA_LITERAL, MODEL_CHECK,
44
  __MAX_VALUE = MODEL_CHECK
45
};
46
std::ostream& operator<<(std::ostream& os, DifficultyMode mode);
47
DifficultyMode stringToDifficultyMode(const std::string& optarg);
48
49
enum class IandMode
50
{
51
  VALUE, BITWISE, SUM,
52
  __MAX_VALUE = SUM
53
};
54
std::ostream& operator<<(std::ostream& os, IandMode mode);
55
IandMode stringToIandMode(const std::string& optarg);
56
57
enum class ModelCoresMode
58
{
59
  SIMPLE, NONE, NON_IMPLIED,
60
  __MAX_VALUE = NON_IMPLIED
61
};
62
std::ostream& operator<<(std::ostream& os, ModelCoresMode mode);
63
ModelCoresMode stringToModelCoresMode(const std::string& optarg);
64
65
enum class ModelUninterpPrintMode
66
{
67
  DeclSortAndFun, None, DeclFun,
68
  __MAX_VALUE = DeclFun
69
};
70
std::ostream& operator<<(std::ostream& os, ModelUninterpPrintMode mode);
71
ModelUninterpPrintMode stringToModelUninterpPrintMode(const std::string& optarg);
72
73
enum class ProduceInterpols
74
{
75
  ALL, NONE, ASSUMPTIONS, CONJECTURE, SHARED, DEFAULT,
76
  __MAX_VALUE = DEFAULT
77
};
78
std::ostream& operator<<(std::ostream& os, ProduceInterpols mode);
79
ProduceInterpols stringToProduceInterpols(const std::string& optarg);
80
81
enum class SimplificationMode
82
{
83
  NONE, BATCH,
84
  __MAX_VALUE = BATCH
85
};
86
std::ostream& operator<<(std::ostream& os, SimplificationMode mode);
87
SimplificationMode stringToSimplificationMode(const std::string& optarg);
88
89
enum class SolveBVAsIntMode
90
{
91
  IAND, SUM, BV, OFF,
92
  __MAX_VALUE = OFF
93
};
94
std::ostream& operator<<(std::ostream& os, SolveBVAsIntMode mode);
95
SolveBVAsIntMode stringToSolveBVAsIntMode(const std::string& optarg);
96
97
enum class SygusSolutionOutMode
98
{
99
  STATUS_AND_DEF, STATUS_OR_DEF, STANDARD, STATUS,
100
  __MAX_VALUE = STATUS
101
};
102
std::ostream& operator<<(std::ostream& os, SygusSolutionOutMode mode);
103
SygusSolutionOutMode stringToSygusSolutionOutMode(const std::string& optarg);
104
105
enum class UnsatCoresMode
106
{
107
  PP_ONLY, FULL_PROOF, ASSUMPTIONS, SAT_PROOF, OFF,
108
  __MAX_VALUE = OFF
109
};
110
std::ostream& operator<<(std::ostream& os, UnsatCoresMode mode);
111
UnsatCoresMode stringToUnsatCoresMode(const std::string& optarg);
112
113
// clang-format on
114
115
#if defined(CVC5_MUZZLED) || defined(CVC5_COMPETITION_MODE)
116
#  define DO_SEMANTIC_CHECKS_BY_DEFAULT false
117
#else /* CVC5_MUZZLED || CVC5_COMPETITION_MODE */
118
#  define DO_SEMANTIC_CHECKS_BY_DEFAULT true
119
#endif /* CVC5_MUZZLED || CVC5_COMPETITION_MODE */
120
121
30748
struct HolderSMT
122
{
123
// clang-format off
124
bool abstractValues = false;
125
  bool abstractValuesWasSetByUser = false;
126
  bool ackermann = false;
127
  bool ackermannWasSetByUser = false;
128
  BlockModelsMode blockModelsMode = BlockModelsMode::NONE;
129
  bool blockModelsModeWasSetByUser = false;
130
  uint64_t BVAndIntegerGranularity = 1;
131
  bool BVAndIntegerGranularityWasSetByUser = false;
132
  bool checkAbducts = false;
133
  bool checkAbductsWasSetByUser = false;
134
  bool checkInterpols = false;
135
  bool checkInterpolsWasSetByUser = false;
136
  bool checkModels;
137
  bool checkModelsWasSetByUser = false;
138
  bool checkProofs;
139
  bool checkProofsWasSetByUser = false;
140
  bool checkSynthSol = false;
141
  bool checkSynthSolWasSetByUser = false;
142
  bool checkUnsatCores;
143
  bool checkUnsatCoresWasSetByUser = false;
144
  bool debugCheckModels;
145
  bool debugCheckModelsWasSetByUser = false;
146
  DifficultyMode difficultyMode = DifficultyMode::LEMMA_LITERAL;
147
  bool difficultyModeWasSetByUser = false;
148
  bool earlyIteRemoval = false;
149
  bool earlyIteRemovalWasSetByUser = false;
150
  bool expandDefinitions = false;
151
  bool expandDefinitionsWasSetByUser = false;
152
  bool extRewPrep = false;
153
  bool extRewPrepWasSetByUser = false;
154
  bool extRewPrepAgg = false;
155
  bool extRewPrepAggWasSetByUser = false;
156
  bool foreignTheoryRewrite = false;
157
  bool foreignTheoryRewriteWasSetByUser = false;
158
  IandMode iandMode = IandMode::VALUE;
159
  bool iandModeWasSetByUser = false;
160
  bool doITESimp;
161
  bool doITESimpWasSetByUser = false;
162
  bool learnedRewrite = false;
163
  bool learnedRewriteWasSetByUser = false;
164
  bool minimalUnsatCores = false;
165
  bool minimalUnsatCoresWasSetByUser = false;
166
  ModelCoresMode modelCoresMode = ModelCoresMode::NONE;
167
  bool modelCoresModeWasSetByUser = false;
168
  ModelUninterpPrintMode modelUninterpPrint = ModelUninterpPrintMode::None;
169
  bool modelUninterpPrintWasSetByUser = false;
170
  bool modelWitnessValue = false;
171
  bool modelWitnessValueWasSetByUser = false;
172
  bool doITESimpOnRepeat = false;
173
  bool doITESimpOnRepeatWasSetByUser = false;
174
  bool produceAbducts = false;
175
  bool produceAbductsWasSetByUser = false;
176
  bool produceAssertions;
177
  bool produceAssertionsWasSetByUser = false;
178
  bool produceAssignments = false;
179
  bool produceAssignmentsWasSetByUser = false;
180
  bool produceDifficulty = false;
181
  bool produceDifficultyWasSetByUser = false;
182
  ProduceInterpols produceInterpols = ProduceInterpols::NONE;
183
  bool produceInterpolsWasSetByUser = false;
184
  bool produceModels = false;
185
  bool produceModelsWasSetByUser = false;
186
  bool produceProofs = false;
187
  bool produceProofsWasSetByUser = false;
188
  bool unsatAssumptions = false;
189
  bool unsatAssumptionsWasSetByUser = false;
190
  bool unsatCores;
191
  bool unsatCoresWasSetByUser = false;
192
  bool repeatSimp;
193
  bool repeatSimpWasSetByUser = false;
194
  bool compressItes = false;
195
  bool compressItesWasSetByUser = false;
196
  uint64_t zombieHuntThreshold = 524288;
197
  bool zombieHuntThresholdWasSetByUser = false;
198
  bool simplifyWithCareEnabled = false;
199
  bool simplifyWithCareEnabledWasSetByUser = false;
200
  SimplificationMode simplificationMode = SimplificationMode::BATCH;
201
  bool simplificationModeWasSetByUser = false;
202
  SolveBVAsIntMode solveBVAsInt = SolveBVAsIntMode::OFF;
203
  bool solveBVAsIntWasSetByUser = false;
204
  uint64_t solveIntAsBV = 0;
205
  bool solveIntAsBVWasSetByUser = false;
206
  bool solveRealAsInt = false;
207
  bool solveRealAsIntWasSetByUser = false;
208
  bool sortInference = false;
209
  bool sortInferenceWasSetByUser = false;
210
  bool doStaticLearning = true;
211
  bool doStaticLearningWasSetByUser = false;
212
  SygusSolutionOutMode sygusOut = SygusSolutionOutMode::STANDARD;
213
  bool sygusOutWasSetByUser = false;
214
  bool unconstrainedSimp = false;
215
  bool unconstrainedSimpWasSetByUser = false;
216
  UnsatCoresMode unsatCoresMode = UnsatCoresMode::OFF;
217
  bool unsatCoresModeWasSetByUser = false;
218
// clang-format on
219
};
220
221
#undef DO_SEMANTIC_CHECKS_BY_DEFAULT
222
223
// clang-format off
224
8
inline bool abstractValues() { return Options::current().smt.abstractValues; }
225
inline bool ackermann() { return Options::current().smt.ackermann; }
226
inline BlockModelsMode blockModelsMode() { return Options::current().smt.blockModelsMode; }
227
inline uint64_t BVAndIntegerGranularity() { return Options::current().smt.BVAndIntegerGranularity; }
228
inline bool checkAbducts() { return Options::current().smt.checkAbducts; }
229
inline bool checkInterpols() { return Options::current().smt.checkInterpols; }
230
inline bool checkModels() { return Options::current().smt.checkModels; }
231
inline bool checkProofs() { return Options::current().smt.checkProofs; }
232
inline bool checkSynthSol() { return Options::current().smt.checkSynthSol; }
233
inline bool checkUnsatCores() { return Options::current().smt.checkUnsatCores; }
234
3862
inline bool debugCheckModels() { return Options::current().smt.debugCheckModels; }
235
4
inline DifficultyMode difficultyMode() { return Options::current().smt.difficultyMode; }
236
inline bool earlyIteRemoval() { return Options::current().smt.earlyIteRemoval; }
237
inline bool expandDefinitions() { return Options::current().smt.expandDefinitions; }
238
inline bool extRewPrep() { return Options::current().smt.extRewPrep; }
239
inline bool extRewPrepAgg() { return Options::current().smt.extRewPrepAgg; }
240
inline bool foreignTheoryRewrite() { return Options::current().smt.foreignTheoryRewrite; }
241
inline IandMode iandMode() { return Options::current().smt.iandMode; }
242
inline bool doITESimp() { return Options::current().smt.doITESimp; }
243
inline bool learnedRewrite() { return Options::current().smt.learnedRewrite; }
244
3857
inline bool minimalUnsatCores() { return Options::current().smt.minimalUnsatCores; }
245
inline ModelCoresMode modelCoresMode() { return Options::current().smt.modelCoresMode; }
246
14
inline ModelUninterpPrintMode modelUninterpPrint() { return Options::current().smt.modelUninterpPrint; }
247
inline bool modelWitnessValue() { return Options::current().smt.modelWitnessValue; }
248
inline bool doITESimpOnRepeat() { return Options::current().smt.doITESimpOnRepeat; }
249
inline bool produceAbducts() { return Options::current().smt.produceAbducts; }
250
inline bool produceAssertions() { return Options::current().smt.produceAssertions; }
251
inline bool produceAssignments() { return Options::current().smt.produceAssignments; }
252
23
inline bool produceDifficulty() { return Options::current().smt.produceDifficulty; }
253
inline ProduceInterpols produceInterpols() { return Options::current().smt.produceInterpols; }
254
inline bool produceModels() { return Options::current().smt.produceModels; }
255
12735856
inline bool produceProofs() { return Options::current().smt.produceProofs; }
256
inline bool unsatAssumptions() { return Options::current().smt.unsatAssumptions; }
257
8862260
inline bool unsatCores() { return Options::current().smt.unsatCores; }
258
inline bool repeatSimp() { return Options::current().smt.repeatSimp; }
259
inline bool compressItes() { return Options::current().smt.compressItes; }
260
inline uint64_t zombieHuntThreshold() { return Options::current().smt.zombieHuntThreshold; }
261
inline bool simplifyWithCareEnabled() { return Options::current().smt.simplifyWithCareEnabled; }
262
inline SimplificationMode simplificationMode() { return Options::current().smt.simplificationMode; }
263
inline SolveBVAsIntMode solveBVAsInt() { return Options::current().smt.solveBVAsInt; }
264
20524
inline uint64_t solveIntAsBV() { return Options::current().smt.solveIntAsBV; }
265
20537
inline bool solveRealAsInt() { return Options::current().smt.solveRealAsInt; }
266
inline bool sortInference() { return Options::current().smt.sortInference; }
267
inline bool doStaticLearning() { return Options::current().smt.doStaticLearning; }
268
1427
inline SygusSolutionOutMode sygusOut() { return Options::current().smt.sygusOut; }
269
inline bool unconstrainedSimp() { return Options::current().smt.unconstrainedSimp; }
270
1659409
inline UnsatCoresMode unsatCoresMode() { return Options::current().smt.unsatCoresMode; }
271
// clang-format on
272
273
}  // namespace cvc5::options
274
275
#endif /* CVC5__OPTIONS__SMT_H */