cardinality operation for finite sets (based on my thesis / ijcar16 paper)
[cvc5.git] / src / options / options_public_functions.cpp
1 /********************* */
2 /*! \file options_public_functions.cpp
3 ** \verbatim
4 ** Top contributors (to current version):
5 ** Tim King
6 ** This file is part of the CVC4 project.
7 ** Copyright (c) 2009-2016 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 Definitions of public facing interface functions for Options.
13 **
14 ** Definitions of public facing interface functions for Options. These are
15 ** all 1 line wrappers for Options::get<T>, Options::set<T>, and
16 ** Options::wasSetByUser<T> for different option types T.
17 **/
18
19 #include "options.h"
20
21 #include <fstream>
22 #include <ostream>
23 #include <string>
24 #include <vector>
25
26 #include "base/listener.h"
27 #include "base/modal_exception.h"
28 #include "base/tls.h"
29 #include "options/base_options.h"
30 #include "options/language.h"
31 #include "options/main_options.h"
32 #include "options/parser_options.h"
33 #include "options/printer_modes.h"
34 #include "options/printer_options.h"
35 #include "options/option_exception.h"
36 #include "options/smt_options.h"
37 #include "options/quantifiers_options.h"
38
39 namespace CVC4 {
40
41 // Get accessor functions.
42 InputLanguage Options::getInputLanguage() const {
43 return (*this)[options::inputLanguage];
44 }
45
46 InstFormatMode Options::getInstFormatMode() const {
47 return (*this)[options::instFormatMode];
48 }
49
50 OutputLanguage Options::getOutputLanguage() const {
51 return (*this)[options::outputLanguage];
52 }
53
54 bool Options::getCheckProofs() const{
55 return (*this)[options::checkProofs];
56 }
57
58 bool Options::getContinuedExecution() const{
59 return (*this)[options::continuedExecution];
60 }
61
62 bool Options::getDumpInstantiations() const{
63 return (*this)[options::dumpInstantiations];
64 }
65
66 bool Options::getDumpModels() const{
67 return (*this)[options::dumpModels];
68 }
69
70 bool Options::getDumpProofs() const{
71 return (*this)[options::dumpProofs];
72 }
73
74 bool Options::getDumpSynth() const{
75 return (*this)[options::dumpSynth];
76 }
77
78 bool Options::getDumpUnsatCores() const{
79 return (*this)[options::dumpUnsatCores];
80 }
81
82 bool Options::getEarlyExit() const{
83 return (*this)[options::earlyExit];
84 }
85
86 bool Options::getFallbackSequential() const{
87 return (*this)[options::fallbackSequential];
88 }
89
90 bool Options::getFilesystemAccess() const{
91 return (*this)[options::filesystemAccess];
92 }
93
94 bool Options::getForceNoLimitCpuWhileDump() const{
95 return (*this)[options::forceNoLimitCpuWhileDump];
96 }
97
98 bool Options::getHelp() const{
99 return (*this)[options::help];
100 }
101
102 bool Options::getIncrementalParallel() const{
103 return (*this)[options::incrementalParallel];
104 }
105
106 bool Options::getIncrementalSolving() const{
107 return (*this)[options::incrementalSolving];
108 }
109
110 bool Options::getInteractive() const{
111 return (*this)[options::interactive];
112 }
113
114 bool Options::getInteractivePrompt() const{
115 return (*this)[options::interactivePrompt];
116 }
117
118 bool Options::getLanguageHelp() const{
119 return (*this)[options::languageHelp];
120 }
121
122 bool Options::getMemoryMap() const{
123 return (*this)[options::memoryMap];
124 }
125
126 bool Options::getParseOnly() const{
127 return (*this)[options::parseOnly];
128 }
129
130 bool Options::getProduceModels() const{
131 return (*this)[options::produceModels];
132 }
133
134 bool Options::getProof() const{
135 return (*this)[options::proof];
136 }
137
138 bool Options::getSegvSpin() const{
139 return (*this)[options::segvSpin];
140 }
141
142 bool Options::getSemanticChecks() const{
143 return (*this)[options::semanticChecks];
144 }
145
146 bool Options::getStatistics() const{
147 return (*this)[options::statistics];
148 }
149
150 bool Options::getStatsEveryQuery() const{
151 return (*this)[options::statsEveryQuery];
152 }
153
154 bool Options::getStatsHideZeros() const{
155 return (*this)[options::statsHideZeros];
156 }
157
158 bool Options::getStrictParsing() const{
159 return (*this)[options::strictParsing];
160 }
161
162 bool Options::getTearDownIncremental() const{
163 return (*this)[options::tearDownIncremental];
164 }
165
166 bool Options::getVersion() const{
167 return (*this)[options::version];
168 }
169
170 bool Options::getWaitToJoin() const{
171 return (*this)[options::waitToJoin];
172 }
173
174 const std::string& Options::getForceLogicString() const{
175 return (*this)[options::forceLogicString];
176 }
177
178 const std::vector<std::string>& Options::getThreadArgv() const{
179 return (*this)[options::threadArgv];
180 }
181
182 int Options::getSharingFilterByLength() const{
183 return (*this)[options::sharingFilterByLength];
184 }
185
186 int Options::getThreadId() const{
187 return (*this)[options::thread_id];
188 }
189
190 int Options::getVerbosity() const{
191 return (*this)[options::verbosity];
192 }
193
194 std::istream* Options::getIn() const{
195 return (*this)[options::in];
196 }
197
198 std::ostream* Options::getErr(){
199 return (*this)[options::err];
200 }
201
202 std::ostream* Options::getOut(){
203 return (*this)[options::out];
204 }
205
206 std::ostream* Options::getOutConst() const{
207 // #warning "Remove Options::getOutConst"
208 return (*this)[options::out];
209 }
210
211 std::string Options::getBinaryName() const{
212 return (*this)[options::binary_name];
213 }
214
215 std::string Options::getReplayInputFilename() const{
216 return (*this)[options::replayInputFilename];
217 }
218
219 unsigned Options::getParseStep() const{
220 return (*this)[options::parseStep];
221 }
222
223 unsigned Options::getThreadStackSize() const{
224 return (*this)[options::threadStackSize];
225 }
226
227 unsigned Options::getThreads() const{
228 return (*this)[options::threads];
229 }
230
231 int Options::currentGetSharingFilterByLength() {
232 return current()->getSharingFilterByLength();
233 }
234
235 int Options::currentGetThreadId() {
236 return current()->getThreadId();
237 }
238
239 std::ostream* Options::currentGetOut() {
240 return current()->getOut();
241 }
242
243
244 // TODO: Document these.
245 void Options::setCeGuidedInst(bool value) {
246 set(options::ceGuidedInst, value);
247 }
248
249 void Options::setDumpSynth(bool value) {
250 set(options::dumpSynth, value);
251 }
252
253 void Options::setInputLanguage(InputLanguage value) {
254 set(options::inputLanguage, value);
255 }
256
257 void Options::setInteractive(bool value) {
258 set(options::interactive, value);
259 }
260
261 void Options::setOut(std::ostream* value) {
262 set(options::out, value);
263 }
264
265 void Options::setOutputLanguage(OutputLanguage value) {
266 set(options::outputLanguage, value);
267 }
268
269 void Options::setSharingFilterByLength(int length) {
270 set(options::sharingFilterByLength, length);
271 }
272
273 void Options::setThreadId(int value) {
274 set(options::thread_id, value);
275 }
276
277 bool Options::wasSetByUserCeGuidedInst() const {
278 return wasSetByUser(options::ceGuidedInst);
279 }
280
281 bool Options::wasSetByUserDumpSynth() const {
282 return wasSetByUser(options::dumpSynth);
283 }
284
285 bool Options::wasSetByUserEarlyExit() const {
286 return wasSetByUser(options::earlyExit);
287 }
288
289 bool Options::wasSetByUserForceLogicString() const {
290 return wasSetByUser(options::forceLogicString);
291 }
292
293 bool Options::wasSetByUserIncrementalSolving() const {
294 return wasSetByUser(options::incrementalSolving);
295 }
296
297 bool Options::wasSetByUserInteractive() const {
298 return wasSetByUser(options::interactive);
299 }
300
301 bool Options::wasSetByUserThreadStackSize() const {
302 return wasSetByUser(options::threadStackSize);
303 }
304
305 bool Options::wasSetByUserThreads() const {
306 return wasSetByUser(options::threads);
307 }
308
309
310 void Options::flushErr() {
311 if(getErr() != NULL) {
312 *(getErr()) << std::flush;
313 }
314 }
315
316 void Options::flushOut() {
317 if(getOut() != NULL) {
318 *(getOut()) << std::flush;
319 }
320 }
321
322 }/* CVC4 namespace */