GCC Code Coverage Report
Directory: . Exec Total Coverage
File: build-coverage/src/options/printer_options.h Lines: 6 10 60.0 %
Date: 2021-03-23 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__PRINTER_H
21
#define CVC4__OPTIONS__PRINTER_H
22
23
#include "options/options.h"
24
25
#include "options/printer_modes.h"
26
27
28
#define CVC4_OPTIONS__PRINTER__FOR_OPTION_HOLDER \
29
  flattenHOChains__option_t::type flattenHOChains;\
30
  bool flattenHOChains__setByUser__; \
31
  instFormatMode__option_t::type instFormatMode;\
32
  bool instFormatMode__setByUser__; \
33
  modelFormatMode__option_t::type modelFormatMode;\
34
  bool modelFormatMode__setByUser__; \
35
  printInstFull__option_t::type printInstFull;\
36
  bool printInstFull__setByUser__; \
37
  printInstMode__option_t::type printInstMode;\
38
  bool printInstMode__setByUser__;
39
40
41
namespace CVC4 {
42
43
namespace options {
44
45
46
enum class ModelFormatMode
47
{
48
  TABLE,
49
  DEFAULT
50
};
51
std::ostream&
52
operator<<(std::ostream& os, ModelFormatMode mode);
53
ModelFormatMode
54
stringToModelFormatMode(const std::string& option, const std::string& optarg);
55
enum class PrintInstMode
56
{
57
  NUM,
58
  LIST
59
};
60
std::ostream&
61
operator<<(std::ostream& os, PrintInstMode mode);
62
PrintInstMode
63
stringToPrintInstMode(const std::string& option, const std::string& optarg);
64
65
extern struct flattenHOChains__option_t
66
{
67
  typedef bool type;
68
  type operator()() const;
69
  bool wasSetByUser() const;
70
  void set(const type& v);
71
  const char* getName() const;
72
} thread_local flattenHOChains;
73
extern struct instFormatMode__option_t
74
{
75
  typedef InstFormatMode type;
76
  type operator()() const;
77
  bool wasSetByUser() const;
78
  void set(const type& v);
79
  const char* getName() const;
80
} thread_local instFormatMode;
81
extern struct modelFormatMode__option_t
82
{
83
  typedef ModelFormatMode type;
84
  type operator()() const;
85
  bool wasSetByUser() const;
86
  void set(const type& v);
87
  const char* getName() const;
88
} thread_local modelFormatMode;
89
extern struct printInstFull__option_t
90
{
91
  typedef bool type;
92
  type operator()() const;
93
  bool wasSetByUser() const;
94
  void set(const type& v);
95
  const char* getName() const;
96
} thread_local printInstFull;
97
extern struct printInstMode__option_t
98
{
99
  typedef PrintInstMode type;
100
  type operator()() const;
101
  bool wasSetByUser() const;
102
  void set(const type& v);
103
  const char* getName() const;
104
} thread_local printInstMode;
105
106
}  // namespace options
107
108
template <> void Options::set(
109
    options::flattenHOChains__option_t,
110
    const options::flattenHOChains__option_t::type& x);
111
template <> const options::flattenHOChains__option_t::type& Options::operator[](
112
    options::flattenHOChains__option_t) const;
113
template <> bool Options::wasSetByUser(options::flattenHOChains__option_t) const;
114
template <> void Options::assignBool(
115
    options::flattenHOChains__option_t,
116
    std::string option,
117
    bool value);
118
template <> void Options::set(
119
    options::instFormatMode__option_t,
120
    const options::instFormatMode__option_t::type& x);
121
template <> const options::instFormatMode__option_t::type& Options::operator[](
122
    options::instFormatMode__option_t) const;
123
template <> bool Options::wasSetByUser(options::instFormatMode__option_t) const;
124
template <> void Options::assign(
125
    options::instFormatMode__option_t,
126
    std::string option,
127
    std::string value);
128
template <> void Options::set(
129
    options::modelFormatMode__option_t,
130
    const options::modelFormatMode__option_t::type& x);
131
template <> const options::modelFormatMode__option_t::type& Options::operator[](
132
    options::modelFormatMode__option_t) const;
133
template <> bool Options::wasSetByUser(options::modelFormatMode__option_t) const;
134
template <> void Options::assign(
135
    options::modelFormatMode__option_t,
136
    std::string option,
137
    std::string value);
138
template <> void Options::set(
139
    options::printInstFull__option_t,
140
    const options::printInstFull__option_t::type& x);
141
template <> const options::printInstFull__option_t::type& Options::operator[](
142
    options::printInstFull__option_t) const;
143
template <> bool Options::wasSetByUser(options::printInstFull__option_t) const;
144
template <> void Options::assignBool(
145
    options::printInstFull__option_t,
146
    std::string option,
147
    bool value);
148
template <> void Options::set(
149
    options::printInstMode__option_t,
150
    const options::printInstMode__option_t::type& x);
151
template <> const options::printInstMode__option_t::type& Options::operator[](
152
    options::printInstMode__option_t) const;
153
template <> bool Options::wasSetByUser(options::printInstMode__option_t) const;
154
template <> void Options::assign(
155
    options::printInstMode__option_t,
156
    std::string option,
157
    std::string value);
158
159
160
namespace options {
161
162
inline flattenHOChains__option_t::type flattenHOChains__option_t::operator()() const
163
{
164
  return (*Options::current())[*this];
165
}
166
inline bool flattenHOChains__option_t::wasSetByUser() const
167
{
168
  return Options::current()->wasSetByUser(*this);
169
}
170
inline void flattenHOChains__option_t::set(const flattenHOChains__option_t::type& v)
171
{
172
  Options::current()->set(*this, v);
173
}
174
inline const char* flattenHOChains__option_t::getName() const
175
{
176
  return "flatten-ho-chains";
177
}
178
20
inline instFormatMode__option_t::type instFormatMode__option_t::operator()() const
179
{
180
20
  return (*Options::current())[*this];
181
}
182
inline bool instFormatMode__option_t::wasSetByUser() const
183
{
184
  return Options::current()->wasSetByUser(*this);
185
}
186
inline void instFormatMode__option_t::set(const instFormatMode__option_t::type& v)
187
{
188
  Options::current()->set(*this, v);
189
}
190
inline const char* instFormatMode__option_t::getName() const
191
{
192
  return "inst-format";
193
}
194
inline modelFormatMode__option_t::type modelFormatMode__option_t::operator()() const
195
{
196
  return (*Options::current())[*this];
197
}
198
inline bool modelFormatMode__option_t::wasSetByUser() const
199
{
200
  return Options::current()->wasSetByUser(*this);
201
}
202
inline void modelFormatMode__option_t::set(const modelFormatMode__option_t::type& v)
203
{
204
  Options::current()->set(*this, v);
205
}
206
inline const char* modelFormatMode__option_t::getName() const
207
{
208
  return "model-format";
209
}
210
12
inline printInstFull__option_t::type printInstFull__option_t::operator()() const
211
{
212
12
  return (*Options::current())[*this];
213
}
214
inline bool printInstFull__option_t::wasSetByUser() const
215
{
216
  return Options::current()->wasSetByUser(*this);
217
}
218
inline void printInstFull__option_t::set(const printInstFull__option_t::type& v)
219
{
220
  Options::current()->set(*this, v);
221
}
222
inline const char* printInstFull__option_t::getName() const
223
{
224
  return "print-inst-full";
225
}
226
30
inline printInstMode__option_t::type printInstMode__option_t::operator()() const
227
{
228
30
  return (*Options::current())[*this];
229
}
230
inline bool printInstMode__option_t::wasSetByUser() const
231
{
232
  return Options::current()->wasSetByUser(*this);
233
}
234
inline void printInstMode__option_t::set(const printInstMode__option_t::type& v)
235
{
236
  Options::current()->set(*this, v);
237
}
238
inline const char* printInstMode__option_t::getName() const
239
{
240
  return "print-inst";
241
}
242
243
}  // namespace options
244
}  // namespace CVC4
245
246
#endif /* CVC4__OPTIONS__PRINTER_H */