GCC Code Coverage Report
Directory: . Exec Total Coverage
File: build-coverage/src/options/decision_options.h Lines: 16 20 80.0 %
Date: 2021-03-22 Branches: 0 0 0.0 %

Line Exec Source
1
/*********************                                                        */
2
/*! \file module_template.h
3
 ** \verbatim
4
 ** Top contributors (to current version):
5
 **   Mathias Preiner
6
 ** This file is part of the CVC4 project.
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.\endverbatim
11
 **
12
 ** \brief Contains code for handling command-line options.
13
 **
14
 ** For each <module>_options.toml configuration file, mkoptions.py
15
 ** expands this template and generates a <module>_options.h file.
16
 **/
17
18
#include "cvc4_private.h"
19
20
#ifndef CVC4__OPTIONS__DECISION_H
21
#define CVC4__OPTIONS__DECISION_H
22
23
#include "options/options.h"
24
25
#include "options/decision_weight.h"
26
27
28
#define CVC4_OPTIONS__DECISION__FOR_OPTION_HOLDER \
29
  decisionRandomWeight__option_t::type decisionRandomWeight;\
30
  bool decisionRandomWeight__setByUser__; \
31
  decisionThreshold__option_t::type decisionThreshold;\
32
  bool decisionThreshold__setByUser__; \
33
  decisionUseWeight__option_t::type decisionUseWeight;\
34
  bool decisionUseWeight__setByUser__; \
35
  decisionWeightInternal__option_t::type decisionWeightInternal;\
36
  bool decisionWeightInternal__setByUser__; \
37
  decisionMode__option_t::type decisionMode;\
38
  bool decisionMode__setByUser__; \
39
  decisionStopOnly__option_t::type decisionStopOnly;\
40
  bool decisionStopOnly__setByUser__;
41
42
43
namespace CVC4 {
44
45
namespace options {
46
47
48
enum class DecisionWeightInternal
49
{
50
  USR1,
51
  SUM,
52
  OFF,
53
  MAX
54
};
55
std::ostream&
56
operator<<(std::ostream& os, DecisionWeightInternal mode);
57
DecisionWeightInternal
58
stringToDecisionWeightInternal(const std::string& option, const std::string& optarg);
59
enum class DecisionMode
60
{
61
  INTERNAL,
62
  RELEVANCY,
63
  JUSTIFICATION
64
};
65
std::ostream&
66
operator<<(std::ostream& os, DecisionMode mode);
67
DecisionMode
68
stringToDecisionMode(const std::string& option, const std::string& optarg);
69
70
extern struct decisionRandomWeight__option_t
71
{
72
  typedef int type;
73
  type operator()() const;
74
  bool wasSetByUser() const;
75
  const char* getName() const;
76
} thread_local decisionRandomWeight;
77
extern struct decisionThreshold__option_t
78
{
79
  typedef decision::DecisionWeight type;
80
  type operator()() const;
81
  bool wasSetByUser() const;
82
  const char* getName() const;
83
} thread_local decisionThreshold;
84
extern struct decisionUseWeight__option_t
85
{
86
  typedef bool type;
87
  type operator()() const;
88
  bool wasSetByUser() const;
89
  const char* getName() const;
90
} thread_local decisionUseWeight;
91
extern struct decisionWeightInternal__option_t
92
{
93
  typedef DecisionWeightInternal type;
94
  type operator()() const;
95
  bool wasSetByUser() const;
96
  const char* getName() const;
97
} thread_local decisionWeightInternal;
98
extern struct decisionMode__option_t
99
{
100
  typedef DecisionMode type;
101
  type operator()() const;
102
  bool wasSetByUser() const;
103
  void set(const type& v);
104
  const char* getName() const;
105
} thread_local decisionMode;
106
extern struct decisionStopOnly__option_t
107
{
108
  typedef bool type;
109
  type operator()() const;
110
  bool wasSetByUser() const;
111
  void set(const type& v);
112
  const char* getName() const;
113
} thread_local decisionStopOnly;
114
115
}  // namespace options
116
117
template <> const options::decisionRandomWeight__option_t::type& Options::operator[](
118
    options::decisionRandomWeight__option_t) const;
119
template <> bool Options::wasSetByUser(options::decisionRandomWeight__option_t) const;
120
template <> void Options::assign(
121
    options::decisionRandomWeight__option_t,
122
    std::string option,
123
    std::string value);
124
template <> const options::decisionThreshold__option_t::type& Options::operator[](
125
    options::decisionThreshold__option_t) const;
126
template <> bool Options::wasSetByUser(options::decisionThreshold__option_t) const;
127
template <> void Options::assign(
128
    options::decisionThreshold__option_t,
129
    std::string option,
130
    std::string value);
131
template <> const options::decisionUseWeight__option_t::type& Options::operator[](
132
    options::decisionUseWeight__option_t) const;
133
template <> bool Options::wasSetByUser(options::decisionUseWeight__option_t) const;
134
template <> void Options::assignBool(
135
    options::decisionUseWeight__option_t,
136
    std::string option,
137
    bool value);
138
template <> const options::decisionWeightInternal__option_t::type& Options::operator[](
139
    options::decisionWeightInternal__option_t) const;
140
template <> bool Options::wasSetByUser(options::decisionWeightInternal__option_t) const;
141
template <> void Options::assign(
142
    options::decisionWeightInternal__option_t,
143
    std::string option,
144
    std::string value);
145
template <> void Options::set(
146
    options::decisionMode__option_t,
147
    const options::decisionMode__option_t::type& x);
148
template <> const options::decisionMode__option_t::type& Options::operator[](
149
    options::decisionMode__option_t) const;
150
template <> bool Options::wasSetByUser(options::decisionMode__option_t) const;
151
template <> void Options::assign(
152
    options::decisionMode__option_t,
153
    std::string option,
154
    std::string value);
155
template <> void Options::set(
156
    options::decisionStopOnly__option_t,
157
    const options::decisionStopOnly__option_t::type& x);
158
template <> const options::decisionStopOnly__option_t::type& Options::operator[](
159
    options::decisionStopOnly__option_t) const;
160
template <> bool Options::wasSetByUser(options::decisionStopOnly__option_t) const;
161
template <> void Options::assignBool(
162
    options::decisionStopOnly__option_t,
163
    std::string option,
164
    bool value);
165
166
167
namespace options {
168
169
inline decisionRandomWeight__option_t::type decisionRandomWeight__option_t::operator()() const
170
{
171
  return (*Options::current())[*this];
172
}
173
inline bool decisionRandomWeight__option_t::wasSetByUser() const
174
{
175
  return Options::current()->wasSetByUser(*this);
176
}
177
inline const char* decisionRandomWeight__option_t::getName() const
178
{
179
  return "decision-random-weight";
180
}
181
743480
inline decisionThreshold__option_t::type decisionThreshold__option_t::operator()() const
182
{
183
743480
  return (*Options::current())[*this];
184
}
185
inline bool decisionThreshold__option_t::wasSetByUser() const
186
{
187
  return Options::current()->wasSetByUser(*this);
188
}
189
inline const char* decisionThreshold__option_t::getName() const
190
{
191
  return "decision-threshold";
192
}
193
13038788
inline decisionUseWeight__option_t::type decisionUseWeight__option_t::operator()() const
194
{
195
13038788
  return (*Options::current())[*this];
196
}
197
inline bool decisionUseWeight__option_t::wasSetByUser() const
198
{
199
  return Options::current()->wasSetByUser(*this);
200
}
201
inline const char* decisionUseWeight__option_t::getName() const
202
{
203
  return "decision-use-weight";
204
}
205
inline decisionWeightInternal__option_t::type decisionWeightInternal__option_t::operator()() const
206
{
207
  return (*Options::current())[*this];
208
}
209
inline bool decisionWeightInternal__option_t::wasSetByUser() const
210
{
211
  return Options::current()->wasSetByUser(*this);
212
}
213
inline const char* decisionWeightInternal__option_t::getName() const
214
{
215
  return "decision-weight-internal";
216
}
217
34550
inline decisionMode__option_t::type decisionMode__option_t::operator()() const
218
{
219
34550
  return (*Options::current())[*this];
220
}
221
8995
inline bool decisionMode__option_t::wasSetByUser() const
222
{
223
8995
  return Options::current()->wasSetByUser(*this);
224
}
225
8866
inline void decisionMode__option_t::set(const decisionMode__option_t::type& v)
226
{
227
8866
  Options::current()->set(*this, v);
228
8866
}
229
inline const char* decisionMode__option_t::getName() const
230
{
231
  return "decision";
232
}
233
2519924
inline decisionStopOnly__option_t::type decisionStopOnly__option_t::operator()() const
234
{
235
2519924
  return (*Options::current())[*this];
236
}
237
inline bool decisionStopOnly__option_t::wasSetByUser() const
238
{
239
  return Options::current()->wasSetByUser(*this);
240
}
241
8943
inline void decisionStopOnly__option_t::set(const decisionStopOnly__option_t::type& v)
242
{
243
8943
  Options::current()->set(*this, v);
244
8943
}
245
inline const char* decisionStopOnly__option_t::getName() const
246
{
247
  return "";
248
}
249
250
}  // namespace options
251
}  // namespace CVC4
252
253
#endif /* CVC4__OPTIONS__DECISION_H */