GCC Code Coverage Report
Directory: . Exec Total Coverage
File: build-coverage/src/options/strings_options.h Lines: 39 39 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_private.h"
20
21
#ifndef CVC5__OPTIONS__STRINGS_H
22
#define CVC5__OPTIONS__STRINGS_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
enum class RegExpInterMode
36
{
37
  ALL,
38
  CONSTANT,
39
  ONE_CONSTANT,
40
  NONE
41
};
42
43
static constexpr size_t RegExpInterMode__numValues = 4;
44
45
std::ostream& operator<<(std::ostream& os, RegExpInterMode mode);
46
RegExpInterMode stringToRegExpInterMode(const std::string& optarg);
47
enum class ProcessLoopMode
48
{
49
  FULL,
50
  ABORT,
51
  SIMPLE_ABORT,
52
  NONE,
53
  SIMPLE
54
};
55
56
static constexpr size_t ProcessLoopMode__numValues = 5;
57
58
std::ostream& operator<<(std::ostream& os, ProcessLoopMode mode);
59
ProcessLoopMode stringToProcessLoopMode(const std::string& optarg);
60
// clang-format on
61
62
#if defined(CVC5_MUZZLED) || defined(CVC5_COMPETITION_MODE)
63
#  define DO_SEMANTIC_CHECKS_BY_DEFAULT false
64
#else /* CVC5_MUZZLED || CVC5_COMPETITION_MODE */
65
#  define DO_SEMANTIC_CHECKS_BY_DEFAULT true
66
#endif /* CVC5_MUZZLED || CVC5_COMPETITION_MODE */
67
68
27390
struct HolderSTRINGS
69
{
70
// clang-format off
71
  bool regExpElim = false;
72
  bool regExpElimWasSetByUser = false;
73
  bool regExpElimAgg = false;
74
  bool regExpElimAggWasSetByUser = false;
75
  RegExpInterMode stringRegExpInterMode = RegExpInterMode::CONSTANT;
76
  bool stringRegExpInterModeWasSetByUser = false;
77
  bool stringCheckEntailLen = true;
78
  bool stringCheckEntailLenWasSetByUser = false;
79
  bool stringEager = false;
80
  bool stringEagerWasSetByUser = false;
81
  bool stringEagerEval = true;
82
  bool stringEagerEvalWasSetByUser = false;
83
  bool stringEagerLen = true;
84
  bool stringEagerLenWasSetByUser = false;
85
  bool stringExp = false;
86
  bool stringExpWasSetByUser = false;
87
  bool stringFlatForms = true;
88
  bool stringFlatFormsWasSetByUser = false;
89
  bool stringFMF = false;
90
  bool stringFMFWasSetByUser = false;
91
  bool stringGuessModel = false;
92
  bool stringGuessModelWasSetByUser = false;
93
  bool stringInferAsLemmas = false;
94
  bool stringInferAsLemmasWasSetByUser = false;
95
  bool stringInferSym = true;
96
  bool stringInferSymWasSetByUser = false;
97
  bool stringLazyPreproc = true;
98
  bool stringLazyPreprocWasSetByUser = false;
99
  bool stringLenNorm = true;
100
  bool stringLenNormWasSetByUser = false;
101
  bool stringLenPropCsp = false;
102
  bool stringLenPropCspWasSetByUser = false;
103
  bool stringMinPrefixExplain = true;
104
  bool stringMinPrefixExplainWasSetByUser = false;
105
  ProcessLoopMode stringProcessLoopMode = ProcessLoopMode::FULL;
106
  bool stringProcessLoopModeWasSetByUser = false;
107
  bool stringRExplainLemmas = true;
108
  bool stringRExplainLemmasWasSetByUser = false;
109
  bool stringUnifiedVSpt = true;
110
  bool stringUnifiedVSptWasSetByUser = false;
111
// clang-format on
112
};
113
114
#undef DO_SEMANTIC_CHECKS_BY_DEFAULT
115
116
// clang-format off
117
extern struct regExpElim__option_t
118
{
119
  typedef bool type;
120
  type operator()() const;
121
} thread_local regExpElim;
122
extern struct regExpElimAgg__option_t
123
{
124
  typedef bool type;
125
  type operator()() const;
126
} thread_local regExpElimAgg;
127
extern struct stringRegExpInterMode__option_t
128
{
129
  typedef RegExpInterMode type;
130
  type operator()() const;
131
} thread_local stringRegExpInterMode;
132
extern struct stringCheckEntailLen__option_t
133
{
134
  typedef bool type;
135
  type operator()() const;
136
} thread_local stringCheckEntailLen;
137
extern struct stringEager__option_t
138
{
139
  typedef bool type;
140
  type operator()() const;
141
} thread_local stringEager;
142
extern struct stringEagerEval__option_t
143
{
144
  typedef bool type;
145
  type operator()() const;
146
} thread_local stringEagerEval;
147
extern struct stringEagerLen__option_t
148
{
149
  typedef bool type;
150
  type operator()() const;
151
} thread_local stringEagerLen;
152
extern struct stringExp__option_t
153
{
154
  typedef bool type;
155
  type operator()() const;
156
} thread_local stringExp;
157
extern struct stringFlatForms__option_t
158
{
159
  typedef bool type;
160
  type operator()() const;
161
} thread_local stringFlatForms;
162
extern struct stringFMF__option_t
163
{
164
  typedef bool type;
165
  type operator()() const;
166
} thread_local stringFMF;
167
extern struct stringGuessModel__option_t
168
{
169
  typedef bool type;
170
  type operator()() const;
171
} thread_local stringGuessModel;
172
extern struct stringInferAsLemmas__option_t
173
{
174
  typedef bool type;
175
  type operator()() const;
176
} thread_local stringInferAsLemmas;
177
extern struct stringInferSym__option_t
178
{
179
  typedef bool type;
180
  type operator()() const;
181
} thread_local stringInferSym;
182
extern struct stringLazyPreproc__option_t
183
{
184
  typedef bool type;
185
  type operator()() const;
186
} thread_local stringLazyPreproc;
187
extern struct stringLenNorm__option_t
188
{
189
  typedef bool type;
190
  type operator()() const;
191
} thread_local stringLenNorm;
192
extern struct stringLenPropCsp__option_t
193
{
194
  typedef bool type;
195
  type operator()() const;
196
} thread_local stringLenPropCsp;
197
extern struct stringMinPrefixExplain__option_t
198
{
199
  typedef bool type;
200
  type operator()() const;
201
} thread_local stringMinPrefixExplain;
202
extern struct stringProcessLoopMode__option_t
203
{
204
  typedef ProcessLoopMode type;
205
  type operator()() const;
206
} thread_local stringProcessLoopMode;
207
extern struct stringRExplainLemmas__option_t
208
{
209
  typedef bool type;
210
  type operator()() const;
211
} thread_local stringRExplainLemmas;
212
extern struct stringUnifiedVSpt__option_t
213
{
214
  typedef bool type;
215
  type operator()() const;
216
} thread_local stringUnifiedVSpt;
217
// clang-format on
218
219
namespace strings
220
{
221
// clang-format off
222
static constexpr const char* regExpElim__name = "re-elim";
223
static constexpr const char* regExpElimAgg__name = "re-elim-agg";
224
static constexpr const char* stringRegExpInterMode__name = "re-inter-mode";
225
static constexpr const char* stringCheckEntailLen__name = "strings-check-entail-len";
226
static constexpr const char* stringEager__name = "strings-eager";
227
static constexpr const char* stringEagerEval__name = "strings-eager-eval";
228
static constexpr const char* stringEagerLen__name = "strings-eager-len";
229
static constexpr const char* stringExp__name = "strings-exp";
230
static constexpr const char* stringFlatForms__name = "strings-ff";
231
static constexpr const char* stringFMF__name = "strings-fmf";
232
static constexpr const char* stringGuessModel__name = "strings-guess-model";
233
static constexpr const char* stringInferAsLemmas__name = "strings-infer-as-lemmas";
234
static constexpr const char* stringInferSym__name = "strings-infer-sym";
235
static constexpr const char* stringLazyPreproc__name = "strings-lazy-pp";
236
static constexpr const char* stringLenNorm__name = "strings-len-norm";
237
static constexpr const char* stringLenPropCsp__name = "strings-lprop-csp";
238
static constexpr const char* stringMinPrefixExplain__name = "strings-min-prefix-explain";
239
static constexpr const char* stringProcessLoopMode__name = "strings-process-loop-mode";
240
static constexpr const char* stringRExplainLemmas__name = "strings-rexplain-lemmas";
241
static constexpr const char* stringUnifiedVSpt__name = "strings-unified-vspt";
242
// clang-format on
243
}
244
245
}  // namespace options
246
247
// clang-format off
248
249
// clang-format on
250
251
namespace options {
252
// clang-format off
253
111145
inline bool regExpElim__option_t::operator()() const
254
111145
{ return Options::current().strings.regExpElim; }
255
9838
inline bool regExpElimAgg__option_t::operator()() const
256
9838
{ return Options::current().strings.regExpElimAgg; }
257
1516
inline RegExpInterMode stringRegExpInterMode__option_t::operator()() const
258
1516
{ return Options::current().strings.stringRegExpInterMode; }
259
3153
inline bool stringCheckEntailLen__option_t::operator()() const
260
3153
{ return Options::current().strings.stringCheckEntailLen; }
261
18778
inline bool stringEager__option_t::operator()() const
262
18778
{ return Options::current().strings.stringEager; }
263
9838
inline bool stringEagerEval__option_t::operator()() const
264
9838
{ return Options::current().strings.stringEagerEval; }
265
52789
inline bool stringEagerLen__option_t::operator()() const
266
52789
{ return Options::current().strings.stringEagerLen; }
267
192422
inline bool stringExp__option_t::operator()() const
268
192422
{ return Options::current().strings.stringExp; }
269
9389
inline bool stringFlatForms__option_t::operator()() const
270
9389
{ return Options::current().strings.stringFlatForms; }
271
123364
inline bool stringFMF__option_t::operator()() const
272
123364
{ return Options::current().strings.stringFMF; }
273
8815
inline bool stringGuessModel__option_t::operator()() const
274
8815
{ return Options::current().strings.stringGuessModel; }
275
25070
inline bool stringInferAsLemmas__option_t::operator()() const
276
25070
{ return Options::current().strings.stringInferAsLemmas; }
277
143085
inline bool stringInferSym__option_t::operator()() const
278
143085
{ return Options::current().strings.stringInferSym; }
279
22456
inline bool stringLazyPreproc__option_t::operator()() const
280
22456
{ return Options::current().strings.stringLazyPreproc; }
281
9389
inline bool stringLenNorm__option_t::operator()() const
282
9389
{ return Options::current().strings.stringLenNorm; }
283
inline bool stringLenPropCsp__option_t::operator()() const
284
{ return Options::current().strings.stringLenPropCsp; }
285
22840
inline bool stringMinPrefixExplain__option_t::operator()() const
286
22840
{ return Options::current().strings.stringMinPrefixExplain; }
287
1600
inline ProcessLoopMode stringProcessLoopMode__option_t::operator()() const
288
1600
{ return Options::current().strings.stringProcessLoopMode; }
289
19327
inline bool stringRExplainLemmas__option_t::operator()() const
290
19327
{ return Options::current().strings.stringRExplainLemmas; }
291
6464
inline bool stringUnifiedVSpt__option_t::operator()() const
292
6464
{ return Options::current().strings.stringUnifiedVSpt; }
293
// clang-format on
294
295
namespace strings
296
{
297
// clang-format off
298
void setDefaultRegExpElim(Options& opts, bool value);
299
void setDefaultRegExpElimAgg(Options& opts, bool value);
300
void setDefaultStringRegExpInterMode(Options& opts, RegExpInterMode value);
301
void setDefaultStringCheckEntailLen(Options& opts, bool value);
302
void setDefaultStringEager(Options& opts, bool value);
303
void setDefaultStringEagerEval(Options& opts, bool value);
304
void setDefaultStringEagerLen(Options& opts, bool value);
305
void setDefaultStringExp(Options& opts, bool value);
306
void setDefaultStringFlatForms(Options& opts, bool value);
307
void setDefaultStringFMF(Options& opts, bool value);
308
void setDefaultStringGuessModel(Options& opts, bool value);
309
void setDefaultStringInferAsLemmas(Options& opts, bool value);
310
void setDefaultStringInferSym(Options& opts, bool value);
311
void setDefaultStringLazyPreproc(Options& opts, bool value);
312
void setDefaultStringLenNorm(Options& opts, bool value);
313
void setDefaultStringLenPropCsp(Options& opts, bool value);
314
void setDefaultStringMinPrefixExplain(Options& opts, bool value);
315
void setDefaultStringProcessLoopMode(Options& opts, ProcessLoopMode value);
316
void setDefaultStringRExplainLemmas(Options& opts, bool value);
317
void setDefaultStringUnifiedVSpt(Options& opts, bool value);
318
// clang-format on
319
}
320
321
}  // namespace options
322
}  // namespace cvc5
323
324
#endif /* CVC5__OPTIONS__STRINGS_H */