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 |
27397 |
struct HolderPROP |
44 |
|
{ |
45 |
|
// clang-format off |
46 |
|
bool minisatDumpDimacs = false; |
47 |
|
bool minisatDumpDimacsWasSetByUser = false; |
48 |
|
bool minisatUseElim = true; |
49 |
|
bool minisatUseElimWasSetByUser = false; |
50 |
|
double satRandomFreq = 0.0; |
51 |
|
bool satRandomFreqWasSetByUser = false; |
52 |
|
uint64_t satRandomSeed = 0; |
53 |
|
bool satRandomSeedWasSetByUser = false; |
54 |
|
bool sat_refine_conflicts = false; |
55 |
|
bool sat_refine_conflictsWasSetByUser = false; |
56 |
|
uint64_t satRestartFirst = 25; |
57 |
|
bool satRestartFirstWasSetByUser = false; |
58 |
|
double satRestartInc = 3.0; |
59 |
|
bool satRestartIncWasSetByUser = false; |
60 |
|
double satClauseDecay = 0.999; |
61 |
|
bool satClauseDecayWasSetByUser = false; |
62 |
|
double satVarDecay = 0.95; |
63 |
|
bool satVarDecayWasSetByUser = 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 uint64_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 uint64_t 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 |
|
|
136 |
|
// clang-format on |
137 |
|
|
138 |
|
namespace options { |
139 |
|
// clang-format off |
140 |
15189 |
inline bool minisatDumpDimacs__option_t::operator()() const |
141 |
15189 |
{ return Options::current().prop.minisatDumpDimacs; } |
142 |
29533 |
inline bool minisatUseElim__option_t::operator()() const |
143 |
29533 |
{ return Options::current().prop.minisatUseElim; } |
144 |
15189 |
inline double satRandomFreq__option_t::operator()() const |
145 |
15189 |
{ return Options::current().prop.satRandomFreq; } |
146 |
15191 |
inline uint64_t satRandomSeed__option_t::operator()() const |
147 |
15191 |
{ return Options::current().prop.satRandomSeed; } |
148 |
51210 |
inline bool sat_refine_conflicts__option_t::operator()() const |
149 |
51210 |
{ return Options::current().prop.sat_refine_conflicts; } |
150 |
15189 |
inline uint64_t satRestartFirst__option_t::operator()() const |
151 |
15189 |
{ return Options::current().prop.satRestartFirst; } |
152 |
15189 |
inline double satRestartInc__option_t::operator()() const |
153 |
15189 |
{ return Options::current().prop.satRestartInc; } |
154 |
15189 |
inline double satClauseDecay__option_t::operator()() const |
155 |
15189 |
{ return Options::current().prop.satClauseDecay; } |
156 |
15189 |
inline double satVarDecay__option_t::operator()() const |
157 |
15189 |
{ return Options::current().prop.satVarDecay; } |
158 |
|
// clang-format on |
159 |
|
|
160 |
|
namespace prop |
161 |
|
{ |
162 |
|
// clang-format off |
163 |
|
void setDefaultMinisatDumpDimacs(Options& opts, bool value); |
164 |
|
void setDefaultMinisatUseElim(Options& opts, bool value); |
165 |
|
void setDefaultSatRandomFreq(Options& opts, double value); |
166 |
|
void setDefaultSatRandomSeed(Options& opts, uint64_t value); |
167 |
|
void setDefaultSat_refine_conflicts(Options& opts, bool value); |
168 |
|
void setDefaultSatRestartFirst(Options& opts, uint64_t value); |
169 |
|
void setDefaultSatRestartInc(Options& opts, double value); |
170 |
|
void setDefaultSatClauseDecay(Options& opts, double value); |
171 |
|
void setDefaultSatVarDecay(Options& opts, double value); |
172 |
|
// clang-format on |
173 |
|
} |
174 |
|
|
175 |
|
} // namespace options |
176 |
|
} // namespace cvc5 |
177 |
|
|
178 |
|
#endif /* CVC5__OPTIONS__PROP_H */ |