GCC Code Coverage Report
Directory: . Exec Total Coverage
File: build-coverage/src/options/strings_options.h Lines: 20 20 100.0 %
Date: 2021-09-15 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::options {
31
32
// clang-format off
33
enum class RegExpInterMode
34
{
35
  ALL, NONE, CONSTANT, ONE_CONSTANT
36
};
37
static constexpr size_t RegExpInterMode__numValues = 4;
38
std::ostream& operator<<(std::ostream& os, RegExpInterMode mode);
39
RegExpInterMode stringToRegExpInterMode(const std::string& optarg);
40
41
enum class ProcessLoopMode
42
{
43
  SIMPLE_ABORT, NONE, FULL, ABORT, SIMPLE
44
};
45
static constexpr size_t ProcessLoopMode__numValues = 5;
46
std::ostream& operator<<(std::ostream& os, ProcessLoopMode mode);
47
ProcessLoopMode stringToProcessLoopMode(const std::string& optarg);
48
49
// clang-format on
50
51
#if defined(CVC5_MUZZLED) || defined(CVC5_COMPETITION_MODE)
52
#  define DO_SEMANTIC_CHECKS_BY_DEFAULT false
53
#else /* CVC5_MUZZLED || CVC5_COMPETITION_MODE */
54
#  define DO_SEMANTIC_CHECKS_BY_DEFAULT true
55
#endif /* CVC5_MUZZLED || CVC5_COMPETITION_MODE */
56
57
24139
struct HolderSTRINGS
58
{
59
// clang-format off
60
bool regExpElim = false;
61
  bool regExpElimWasSetByUser = false;
62
  bool regExpElimAgg = false;
63
  bool regExpElimAggWasSetByUser = false;
64
  RegExpInterMode stringRegExpInterMode = RegExpInterMode::CONSTANT;
65
  bool stringRegExpInterModeWasSetByUser = false;
66
  bool stringCheckEntailLen = true;
67
  bool stringCheckEntailLenWasSetByUser = false;
68
  bool stringEager = false;
69
  bool stringEagerWasSetByUser = false;
70
  bool stringEagerEval = true;
71
  bool stringEagerEvalWasSetByUser = false;
72
  bool stringEagerLen = true;
73
  bool stringEagerLenWasSetByUser = false;
74
  bool stringExp = false;
75
  bool stringExpWasSetByUser = false;
76
  bool stringFlatForms = true;
77
  bool stringFlatFormsWasSetByUser = false;
78
  bool stringFMF = false;
79
  bool stringFMFWasSetByUser = false;
80
  bool stringGuessModel = false;
81
  bool stringGuessModelWasSetByUser = false;
82
  bool stringInferAsLemmas = false;
83
  bool stringInferAsLemmasWasSetByUser = false;
84
  bool stringInferSym = true;
85
  bool stringInferSymWasSetByUser = false;
86
  bool stringLazyPreproc = true;
87
  bool stringLazyPreprocWasSetByUser = false;
88
  bool stringLenNorm = true;
89
  bool stringLenNormWasSetByUser = false;
90
  bool stringLenPropCsp = false;
91
  bool stringLenPropCspWasSetByUser = false;
92
  bool stringMinPrefixExplain = true;
93
  bool stringMinPrefixExplainWasSetByUser = false;
94
  ProcessLoopMode stringProcessLoopMode = ProcessLoopMode::FULL;
95
  bool stringProcessLoopModeWasSetByUser = false;
96
  bool stringRExplainLemmas = true;
97
  bool stringRExplainLemmasWasSetByUser = false;
98
  bool stringUnifiedVSpt = true;
99
  bool stringUnifiedVSptWasSetByUser = false;
100
// clang-format on
101
};
102
103
#undef DO_SEMANTIC_CHECKS_BY_DEFAULT
104
105
// clang-format off
106
125165
inline bool regExpElim() { return Options::current().strings.regExpElim; }
107
9942
inline bool regExpElimAgg() { return Options::current().strings.regExpElimAgg; }
108
1846
inline RegExpInterMode stringRegExpInterMode() { return Options::current().strings.stringRegExpInterMode; }
109
4543
inline bool stringCheckEntailLen() { return Options::current().strings.stringCheckEntailLen; }
110
18928
inline bool stringEager() { return Options::current().strings.stringEager; }
111
9942
inline bool stringEagerEval() { return Options::current().strings.stringEagerEval; }
112
55829
inline bool stringEagerLen() { return Options::current().strings.stringEagerLen; }
113
203344
inline bool stringExp() { return Options::current().strings.stringExp; }
114
9464
inline bool stringFlatForms() { return Options::current().strings.stringFlatForms; }
115
124865
inline bool stringFMF() { return Options::current().strings.stringFMF; }
116
8659
inline bool stringGuessModel() { return Options::current().strings.stringGuessModel; }
117
41127
inline bool stringInferAsLemmas() { return Options::current().strings.stringInferAsLemmas; }
118
188687
inline bool stringInferSym() { return Options::current().strings.stringInferSym; }
119
13799
inline bool stringLazyPreproc() { return Options::current().strings.stringLazyPreproc; }
120
9464
inline bool stringLenNorm() { return Options::current().strings.stringLenNorm; }
121
inline bool stringLenPropCsp() { return Options::current().strings.stringLenPropCsp; }
122
28476
inline bool stringMinPrefixExplain() { return Options::current().strings.stringMinPrefixExplain; }
123
1644
inline ProcessLoopMode stringProcessLoopMode() { return Options::current().strings.stringProcessLoopMode; }
124
25297
inline bool stringRExplainLemmas() { return Options::current().strings.stringRExplainLemmas; }
125
9362
inline bool stringUnifiedVSpt() { return Options::current().strings.stringUnifiedVSpt; }
126
// clang-format on
127
128
namespace strings
129
{
130
// clang-format off
131
static constexpr const char* regExpElim__name = "re-elim";
132
static constexpr const char* regExpElimAgg__name = "re-elim-agg";
133
static constexpr const char* stringRegExpInterMode__name = "re-inter-mode";
134
static constexpr const char* stringCheckEntailLen__name = "strings-check-entail-len";
135
static constexpr const char* stringEager__name = "strings-eager";
136
static constexpr const char* stringEagerEval__name = "strings-eager-eval";
137
static constexpr const char* stringEagerLen__name = "strings-eager-len";
138
static constexpr const char* stringExp__name = "strings-exp";
139
static constexpr const char* stringFlatForms__name = "strings-ff";
140
static constexpr const char* stringFMF__name = "strings-fmf";
141
static constexpr const char* stringGuessModel__name = "strings-guess-model";
142
static constexpr const char* stringInferAsLemmas__name = "strings-infer-as-lemmas";
143
static constexpr const char* stringInferSym__name = "strings-infer-sym";
144
static constexpr const char* stringLazyPreproc__name = "strings-lazy-pp";
145
static constexpr const char* stringLenNorm__name = "strings-len-norm";
146
static constexpr const char* stringLenPropCsp__name = "strings-lprop-csp";
147
static constexpr const char* stringMinPrefixExplain__name = "strings-min-prefix-explain";
148
static constexpr const char* stringProcessLoopMode__name = "strings-process-loop-mode";
149
static constexpr const char* stringRExplainLemmas__name = "strings-rexplain-lemmas";
150
static constexpr const char* stringUnifiedVSpt__name = "strings-unified-vspt";
151
152
void setDefaultRegExpElim(Options& opts, bool value);
153
void setDefaultRegExpElimAgg(Options& opts, bool value);
154
void setDefaultStringRegExpInterMode(Options& opts, RegExpInterMode value);
155
void setDefaultStringCheckEntailLen(Options& opts, bool value);
156
void setDefaultStringEager(Options& opts, bool value);
157
void setDefaultStringEagerEval(Options& opts, bool value);
158
void setDefaultStringEagerLen(Options& opts, bool value);
159
void setDefaultStringExp(Options& opts, bool value);
160
void setDefaultStringFlatForms(Options& opts, bool value);
161
void setDefaultStringFMF(Options& opts, bool value);
162
void setDefaultStringGuessModel(Options& opts, bool value);
163
void setDefaultStringInferAsLemmas(Options& opts, bool value);
164
void setDefaultStringInferSym(Options& opts, bool value);
165
void setDefaultStringLazyPreproc(Options& opts, bool value);
166
void setDefaultStringLenNorm(Options& opts, bool value);
167
void setDefaultStringLenPropCsp(Options& opts, bool value);
168
void setDefaultStringMinPrefixExplain(Options& opts, bool value);
169
void setDefaultStringProcessLoopMode(Options& opts, ProcessLoopMode value);
170
void setDefaultStringRExplainLemmas(Options& opts, bool value);
171
void setDefaultStringUnifiedVSpt(Options& opts, bool value);
172
// clang-format on
173
}
174
175
}  // namespace cvc5::options
176
177
#endif /* CVC5__OPTIONS__STRINGS_H */