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 |
|
* Option template for option modules. |
14 |
|
* |
15 |
|
* For each <module>_options.toml configuration file, mkoptions.py |
16 |
|
* expands this template and generates a <module>_options.cpp file. |
17 |
|
*/ |
18 |
|
#include "options/parser_options.h" |
19 |
|
|
20 |
|
#include <iostream> |
21 |
|
|
22 |
|
#include "base/check.h" |
23 |
|
#include "options/option_exception.h" |
24 |
|
|
25 |
|
// clang-format off |
26 |
|
namespace cvc5 { |
27 |
|
|
28 |
|
template <> options::filesystemAccess__option_t::type& Options::ref( |
29 |
|
options::filesystemAccess__option_t) |
30 |
|
{ |
31 |
|
return parser().filesystemAccess; |
32 |
|
} |
33 |
6108 |
template <> const options::filesystemAccess__option_t::type& Options::operator[]( |
34 |
|
options::filesystemAccess__option_t) const |
35 |
|
{ |
36 |
6108 |
return parser().filesystemAccess; |
37 |
|
} |
38 |
|
template <> bool Options::wasSetByUser(options::filesystemAccess__option_t) const |
39 |
|
{ |
40 |
|
return parser().filesystemAccess__setByUser__; |
41 |
|
} |
42 |
|
template <> options::forceLogicString__option_t::type& Options::ref( |
43 |
|
options::forceLogicString__option_t) |
44 |
|
{ |
45 |
|
return parser().forceLogicString; |
46 |
|
} |
47 |
9 |
template <> const options::forceLogicString__option_t::type& Options::operator[]( |
48 |
|
options::forceLogicString__option_t) const |
49 |
|
{ |
50 |
9 |
return parser().forceLogicString; |
51 |
|
} |
52 |
6120 |
template <> bool Options::wasSetByUser(options::forceLogicString__option_t) const |
53 |
|
{ |
54 |
6120 |
return parser().forceLogicString__setByUser__; |
55 |
|
} |
56 |
|
template <> options::globalDeclarations__option_t::type& Options::ref( |
57 |
|
options::globalDeclarations__option_t) |
58 |
|
{ |
59 |
|
return parser().globalDeclarations; |
60 |
|
} |
61 |
|
template <> const options::globalDeclarations__option_t::type& Options::operator[]( |
62 |
|
options::globalDeclarations__option_t) const |
63 |
|
{ |
64 |
|
return parser().globalDeclarations; |
65 |
|
} |
66 |
|
template <> bool Options::wasSetByUser(options::globalDeclarations__option_t) const |
67 |
|
{ |
68 |
|
return parser().globalDeclarations__setByUser__; |
69 |
|
} |
70 |
|
template <> options::memoryMap__option_t::type& Options::ref( |
71 |
|
options::memoryMap__option_t) |
72 |
|
{ |
73 |
|
return parser().memoryMap; |
74 |
|
} |
75 |
5877 |
template <> const options::memoryMap__option_t::type& Options::operator[]( |
76 |
|
options::memoryMap__option_t) const |
77 |
|
{ |
78 |
5877 |
return parser().memoryMap; |
79 |
|
} |
80 |
|
template <> bool Options::wasSetByUser(options::memoryMap__option_t) const |
81 |
|
{ |
82 |
|
return parser().memoryMap__setByUser__; |
83 |
|
} |
84 |
|
template <> options::semanticChecks__option_t::type& Options::ref( |
85 |
|
options::semanticChecks__option_t) |
86 |
|
{ |
87 |
|
return parser().semanticChecks; |
88 |
|
} |
89 |
6108 |
template <> const options::semanticChecks__option_t::type& Options::operator[]( |
90 |
|
options::semanticChecks__option_t) const |
91 |
|
{ |
92 |
6108 |
return parser().semanticChecks; |
93 |
|
} |
94 |
|
template <> bool Options::wasSetByUser(options::semanticChecks__option_t) const |
95 |
|
{ |
96 |
|
return parser().semanticChecks__setByUser__; |
97 |
|
} |
98 |
|
template <> options::strictParsing__option_t::type& Options::ref( |
99 |
|
options::strictParsing__option_t) |
100 |
|
{ |
101 |
|
return parser().strictParsing; |
102 |
|
} |
103 |
6108 |
template <> const options::strictParsing__option_t::type& Options::operator[]( |
104 |
|
options::strictParsing__option_t) const |
105 |
|
{ |
106 |
6108 |
return parser().strictParsing; |
107 |
|
} |
108 |
|
template <> bool Options::wasSetByUser(options::strictParsing__option_t) const |
109 |
|
{ |
110 |
|
return parser().strictParsing__setByUser__; |
111 |
|
} |
112 |
|
|
113 |
|
namespace options { |
114 |
|
|
115 |
|
thread_local struct filesystemAccess__option_t filesystemAccess; |
116 |
|
thread_local struct forceLogicString__option_t forceLogicString; |
117 |
|
thread_local struct globalDeclarations__option_t globalDeclarations; |
118 |
|
thread_local struct memoryMap__option_t memoryMap; |
119 |
|
thread_local struct semanticChecks__option_t semanticChecks; |
120 |
|
thread_local struct strictParsing__option_t strictParsing; |
121 |
|
|
122 |
|
|
123 |
|
|
124 |
|
} // namespace options |
125 |
28191 |
} // namespace cvc5 |
126 |
|
// clang-format on |