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__PROP_H |
22 |
|
#define CVC5__OPTIONS__PROP_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 |
|
// clang-format on |
36 |
|
|
37 |
|
#if defined(CVC5_MUZZLED) || defined(CVC5_COMPETITION_MODE) |
38 |
|
# define DO_SEMANTIC_CHECKS_BY_DEFAULT false |
39 |
|
#else /* CVC5_MUZZLED || CVC5_COMPETITION_MODE */ |
40 |
|
# define DO_SEMANTIC_CHECKS_BY_DEFAULT true |
41 |
|
#endif /* CVC5_MUZZLED || CVC5_COMPETITION_MODE */ |
42 |
|
|
43 |
25265 |
struct HolderPROP |
44 |
|
{ |
45 |
|
// clang-format off |
46 |
|
bool minisatDumpDimacs = false;\ |
47 |
|
bool minisatDumpDimacs__setByUser__ = false; |
48 |
|
bool minisatUseElim = true;\ |
49 |
|
bool minisatUseElim__setByUser__ = false; |
50 |
|
double satRandomFreq = 0.0;\ |
51 |
|
bool satRandomFreq__setByUser__ = false; |
52 |
|
uint32_t satRandomSeed = 0;\ |
53 |
|
bool satRandomSeed__setByUser__ = false; |
54 |
|
bool sat_refine_conflicts = false;\ |
55 |
|
bool sat_refine_conflicts__setByUser__ = false; |
56 |
|
unsigned satRestartFirst = 25;\ |
57 |
|
bool satRestartFirst__setByUser__ = false; |
58 |
|
double satRestartInc = 3.0;\ |
59 |
|
bool satRestartInc__setByUser__ = false; |
60 |
|
double satClauseDecay = 0.999;\ |
61 |
|
bool satClauseDecay__setByUser__ = false; |
62 |
|
double satVarDecay = 0.95;\ |
63 |
|
bool satVarDecay__setByUser__ = false; |
64 |
|
// clang-format on |
65 |
|
}; |
66 |
|
|
67 |
|
#undef DO_SEMANTIC_CHECKS_BY_DEFAULT |
68 |
|
|
69 |
|
// clang-format off |
70 |
|
extern struct minisatDumpDimacs__option_t |
71 |
|
{ |
72 |
|
typedef bool type; |
73 |
|
type operator()() const; |
74 |
|
} thread_local minisatDumpDimacs; |
75 |
|
extern struct minisatUseElim__option_t |
76 |
|
{ |
77 |
|
typedef bool type; |
78 |
|
type operator()() const; |
79 |
|
} thread_local minisatUseElim; |
80 |
|
extern struct satRandomFreq__option_t |
81 |
|
{ |
82 |
|
typedef double type; |
83 |
|
type operator()() const; |
84 |
|
} thread_local satRandomFreq; |
85 |
|
extern struct satRandomSeed__option_t |
86 |
|
{ |
87 |
|
typedef uint32_t type; |
88 |
|
type operator()() const; |
89 |
|
} thread_local satRandomSeed; |
90 |
|
extern struct sat_refine_conflicts__option_t |
91 |
|
{ |
92 |
|
typedef bool type; |
93 |
|
type operator()() const; |
94 |
|
} thread_local sat_refine_conflicts; |
95 |
|
extern struct satRestartFirst__option_t |
96 |
|
{ |
97 |
|
typedef unsigned type; |
98 |
|
type operator()() const; |
99 |
|
} thread_local satRestartFirst; |
100 |
|
extern struct satRestartInc__option_t |
101 |
|
{ |
102 |
|
typedef double type; |
103 |
|
type operator()() const; |
104 |
|
} thread_local satRestartInc; |
105 |
|
extern struct satClauseDecay__option_t |
106 |
|
{ |
107 |
|
typedef double type; |
108 |
|
type operator()() const; |
109 |
|
} thread_local satClauseDecay; |
110 |
|
extern struct satVarDecay__option_t |
111 |
|
{ |
112 |
|
typedef double type; |
113 |
|
type operator()() const; |
114 |
|
} thread_local satVarDecay; |
115 |
|
// clang-format on |
116 |
|
|
117 |
|
namespace prop |
118 |
|
{ |
119 |
|
// clang-format off |
120 |
|
static constexpr const char* minisatDumpDimacs__name = "minisat-dump-dimacs"; |
121 |
|
static constexpr const char* minisatUseElim__name = "minisat-elimination"; |
122 |
|
static constexpr const char* satRandomFreq__name = "random-freq"; |
123 |
|
static constexpr const char* satRandomSeed__name = "random-seed"; |
124 |
|
static constexpr const char* sat_refine_conflicts__name = "refine-conflicts"; |
125 |
|
static constexpr const char* satRestartFirst__name = "restart-int-base"; |
126 |
|
static constexpr const char* satRestartInc__name = "restart-int-inc"; |
127 |
|
static constexpr const char* satClauseDecay__name = ""; |
128 |
|
static constexpr const char* satVarDecay__name = ""; |
129 |
|
// clang-format on |
130 |
|
} |
131 |
|
|
132 |
|
} // namespace options |
133 |
|
|
134 |
|
// clang-format off |
135 |
|
template <> options::minisatDumpDimacs__option_t::type& Options::ref( |
136 |
|
options::minisatDumpDimacs__option_t); |
137 |
|
template <> const options::minisatDumpDimacs__option_t::type& Options::operator[]( |
138 |
|
options::minisatDumpDimacs__option_t) const; |
139 |
|
template <> bool Options::wasSetByUser(options::minisatDumpDimacs__option_t) const; |
140 |
|
template <> options::minisatUseElim__option_t::type& Options::ref( |
141 |
|
options::minisatUseElim__option_t); |
142 |
|
template <> const options::minisatUseElim__option_t::type& Options::operator[]( |
143 |
|
options::minisatUseElim__option_t) const; |
144 |
|
template <> bool Options::wasSetByUser(options::minisatUseElim__option_t) const; |
145 |
|
template <> options::satRandomFreq__option_t::type& Options::ref( |
146 |
|
options::satRandomFreq__option_t); |
147 |
|
template <> const options::satRandomFreq__option_t::type& Options::operator[]( |
148 |
|
options::satRandomFreq__option_t) const; |
149 |
|
template <> bool Options::wasSetByUser(options::satRandomFreq__option_t) const; |
150 |
|
template <> options::satRandomSeed__option_t::type& Options::ref( |
151 |
|
options::satRandomSeed__option_t); |
152 |
|
template <> const options::satRandomSeed__option_t::type& Options::operator[]( |
153 |
|
options::satRandomSeed__option_t) const; |
154 |
|
template <> bool Options::wasSetByUser(options::satRandomSeed__option_t) const; |
155 |
|
template <> options::sat_refine_conflicts__option_t::type& Options::ref( |
156 |
|
options::sat_refine_conflicts__option_t); |
157 |
|
template <> const options::sat_refine_conflicts__option_t::type& Options::operator[]( |
158 |
|
options::sat_refine_conflicts__option_t) const; |
159 |
|
template <> bool Options::wasSetByUser(options::sat_refine_conflicts__option_t) const; |
160 |
|
template <> options::satRestartFirst__option_t::type& Options::ref( |
161 |
|
options::satRestartFirst__option_t); |
162 |
|
template <> const options::satRestartFirst__option_t::type& Options::operator[]( |
163 |
|
options::satRestartFirst__option_t) const; |
164 |
|
template <> bool Options::wasSetByUser(options::satRestartFirst__option_t) const; |
165 |
|
template <> options::satRestartInc__option_t::type& Options::ref( |
166 |
|
options::satRestartInc__option_t); |
167 |
|
template <> const options::satRestartInc__option_t::type& Options::operator[]( |
168 |
|
options::satRestartInc__option_t) const; |
169 |
|
template <> bool Options::wasSetByUser(options::satRestartInc__option_t) const; |
170 |
|
template <> options::satClauseDecay__option_t::type& Options::ref( |
171 |
|
options::satClauseDecay__option_t); |
172 |
|
template <> const options::satClauseDecay__option_t::type& Options::operator[]( |
173 |
|
options::satClauseDecay__option_t) const; |
174 |
|
template <> bool Options::wasSetByUser(options::satClauseDecay__option_t) const; |
175 |
|
template <> options::satVarDecay__option_t::type& Options::ref( |
176 |
|
options::satVarDecay__option_t); |
177 |
|
template <> const options::satVarDecay__option_t::type& Options::operator[]( |
178 |
|
options::satVarDecay__option_t) const; |
179 |
|
template <> bool Options::wasSetByUser(options::satVarDecay__option_t) const; |
180 |
|
// clang-format on |
181 |
|
|
182 |
|
namespace options { |
183 |
|
// clang-format off |
184 |
14307 |
inline minisatDumpDimacs__option_t::type minisatDumpDimacs__option_t::operator()() const |
185 |
|
{ |
186 |
14307 |
return Options::current()[*this]; |
187 |
|
} |
188 |
28323 |
inline minisatUseElim__option_t::type minisatUseElim__option_t::operator()() const |
189 |
|
{ |
190 |
28323 |
return Options::current()[*this]; |
191 |
|
} |
192 |
14307 |
inline satRandomFreq__option_t::type satRandomFreq__option_t::operator()() const |
193 |
|
{ |
194 |
14307 |
return Options::current()[*this]; |
195 |
|
} |
196 |
14307 |
inline satRandomSeed__option_t::type satRandomSeed__option_t::operator()() const |
197 |
|
{ |
198 |
14307 |
return Options::current()[*this]; |
199 |
|
} |
200 |
53165 |
inline sat_refine_conflicts__option_t::type sat_refine_conflicts__option_t::operator()() const |
201 |
|
{ |
202 |
53165 |
return Options::current()[*this]; |
203 |
|
} |
204 |
14307 |
inline satRestartFirst__option_t::type satRestartFirst__option_t::operator()() const |
205 |
|
{ |
206 |
14307 |
return Options::current()[*this]; |
207 |
|
} |
208 |
14307 |
inline satRestartInc__option_t::type satRestartInc__option_t::operator()() const |
209 |
|
{ |
210 |
14307 |
return Options::current()[*this]; |
211 |
|
} |
212 |
14307 |
inline satClauseDecay__option_t::type satClauseDecay__option_t::operator()() const |
213 |
|
{ |
214 |
14307 |
return Options::current()[*this]; |
215 |
|
} |
216 |
14307 |
inline satVarDecay__option_t::type satVarDecay__option_t::operator()() const |
217 |
|
{ |
218 |
14307 |
return Options::current()[*this]; |
219 |
|
} |
220 |
|
// clang-format on |
221 |
|
|
222 |
|
} // namespace options |
223 |
|
} // namespace cvc5 |
224 |
|
|
225 |
|
#endif /* CVC5__OPTIONS__PROP_H */ |