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__FP_H |
22 |
|
#define CVC5__OPTIONS__FP_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 |
27390 |
struct HolderFP |
44 |
|
{ |
45 |
|
// clang-format off |
46 |
|
bool fpExp = false; |
47 |
|
bool fpExpWasSetByUser = false; |
48 |
|
bool fpLazyWb = false; |
49 |
|
bool fpLazyWbWasSetByUser = false; |
50 |
|
// clang-format on |
51 |
|
}; |
52 |
|
|
53 |
|
#undef DO_SEMANTIC_CHECKS_BY_DEFAULT |
54 |
|
|
55 |
|
// clang-format off |
56 |
|
extern struct fpExp__option_t |
57 |
|
{ |
58 |
|
typedef bool type; |
59 |
|
type operator()() const; |
60 |
|
} thread_local fpExp; |
61 |
|
extern struct fpLazyWb__option_t |
62 |
|
{ |
63 |
|
typedef bool type; |
64 |
|
type operator()() const; |
65 |
|
} thread_local fpLazyWb; |
66 |
|
// clang-format on |
67 |
|
|
68 |
|
namespace fp |
69 |
|
{ |
70 |
|
// clang-format off |
71 |
|
static constexpr const char* fpExp__name = "fp-exp"; |
72 |
|
static constexpr const char* fpLazyWb__name = "fp-lazy-wb"; |
73 |
|
// clang-format on |
74 |
|
} |
75 |
|
|
76 |
|
} // namespace options |
77 |
|
|
78 |
|
// clang-format off |
79 |
|
|
80 |
|
// clang-format on |
81 |
|
|
82 |
|
namespace options { |
83 |
|
// clang-format off |
84 |
2652 |
inline bool fpExp__option_t::operator()() const |
85 |
2652 |
{ return Options::current().fp.fpExp; } |
86 |
8245 |
inline bool fpLazyWb__option_t::operator()() const |
87 |
8245 |
{ return Options::current().fp.fpLazyWb; } |
88 |
|
// clang-format on |
89 |
|
|
90 |
|
namespace fp |
91 |
|
{ |
92 |
|
// clang-format off |
93 |
|
void setDefaultFpExp(Options& opts, bool value); |
94 |
|
void setDefaultFpLazyWb(Options& opts, bool value); |
95 |
|
// clang-format on |
96 |
|
} |
97 |
|
|
98 |
|
} // namespace options |
99 |
|
} // namespace cvc5 |
100 |
|
|
101 |
|
#endif /* CVC5__OPTIONS__FP_H */ |