1 |
|
/****************************************************************************** |
2 |
|
* Top contributors (to current version): |
3 |
|
* Morgan Deters, Tim King, Andrew Reynolds |
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 |
|
|
16 |
|
#include "options/options.h" |
17 |
|
|
18 |
|
#include "base/check.h" |
19 |
|
#include "base/cvc5config.h" |
20 |
|
#include "options/options_handler.h" |
21 |
|
#include "options/options_listener.h" |
22 |
|
|
23 |
|
// clang-format off |
24 |
|
#include "options/arith_options.h" |
25 |
|
#include "options/arrays_options.h" |
26 |
|
#include "options/base_options.h" |
27 |
|
#include "options/booleans_options.h" |
28 |
|
#include "options/builtin_options.h" |
29 |
|
#include "options/bv_options.h" |
30 |
|
#include "options/datatypes_options.h" |
31 |
|
#include "options/decision_options.h" |
32 |
|
#include "options/expr_options.h" |
33 |
|
#include "options/fp_options.h" |
34 |
|
#include "options/main_options.h" |
35 |
|
#include "options/parser_options.h" |
36 |
|
#include "options/printer_options.h" |
37 |
|
#include "options/proof_options.h" |
38 |
|
#include "options/prop_options.h" |
39 |
|
#include "options/quantifiers_options.h" |
40 |
|
#include "options/sep_options.h" |
41 |
|
#include "options/sets_options.h" |
42 |
|
#include "options/smt_options.h" |
43 |
|
#include "options/strings_options.h" |
44 |
|
#include "options/theory_options.h" |
45 |
|
#include "options/uf_options.h" |
46 |
|
// clang-format on |
47 |
|
|
48 |
|
namespace cvc5 |
49 |
|
{ |
50 |
|
thread_local Options* Options::s_current = nullptr; |
51 |
|
|
52 |
24072 |
Options::Options() |
53 |
|
: |
54 |
|
// clang-format off |
55 |
|
d_arith(std::make_unique<options::HolderARITH>()), |
56 |
|
d_arrays(std::make_unique<options::HolderARRAYS>()), |
57 |
|
d_base(std::make_unique<options::HolderBASE>()), |
58 |
|
d_booleans(std::make_unique<options::HolderBOOLEANS>()), |
59 |
|
d_builtin(std::make_unique<options::HolderBUILTIN>()), |
60 |
|
d_bv(std::make_unique<options::HolderBV>()), |
61 |
|
d_datatypes(std::make_unique<options::HolderDATATYPES>()), |
62 |
|
d_decision(std::make_unique<options::HolderDECISION>()), |
63 |
|
d_expr(std::make_unique<options::HolderEXPR>()), |
64 |
|
d_fp(std::make_unique<options::HolderFP>()), |
65 |
|
d_driver(std::make_unique<options::HolderDRIVER>()), |
66 |
|
d_parser(std::make_unique<options::HolderPARSER>()), |
67 |
|
d_printer(std::make_unique<options::HolderPRINTER>()), |
68 |
|
d_proof(std::make_unique<options::HolderPROOF>()), |
69 |
|
d_prop(std::make_unique<options::HolderPROP>()), |
70 |
|
d_quantifiers(std::make_unique<options::HolderQUANTIFIERS>()), |
71 |
|
d_sep(std::make_unique<options::HolderSEP>()), |
72 |
|
d_sets(std::make_unique<options::HolderSETS>()), |
73 |
|
d_smt(std::make_unique<options::HolderSMT>()), |
74 |
|
d_strings(std::make_unique<options::HolderSTRINGS>()), |
75 |
|
d_theory(std::make_unique<options::HolderTHEORY>()), |
76 |
|
d_uf(std::make_unique<options::HolderUF>()), |
77 |
24072 |
arith(*d_arith), |
78 |
24072 |
arrays(*d_arrays), |
79 |
24072 |
base(*d_base), |
80 |
24072 |
booleans(*d_booleans), |
81 |
24072 |
builtin(*d_builtin), |
82 |
24072 |
bv(*d_bv), |
83 |
24072 |
datatypes(*d_datatypes), |
84 |
24072 |
decision(*d_decision), |
85 |
24072 |
expr(*d_expr), |
86 |
24072 |
fp(*d_fp), |
87 |
24072 |
driver(*d_driver), |
88 |
24072 |
parser(*d_parser), |
89 |
24072 |
printer(*d_printer), |
90 |
24072 |
proof(*d_proof), |
91 |
24072 |
prop(*d_prop), |
92 |
24072 |
quantifiers(*d_quantifiers), |
93 |
24072 |
sep(*d_sep), |
94 |
24072 |
sets(*d_sets), |
95 |
24072 |
smt(*d_smt), |
96 |
24072 |
strings(*d_strings), |
97 |
24072 |
theory(*d_theory), |
98 |
24072 |
uf(*d_uf), |
99 |
|
// clang-format on |
100 |
553656 |
d_handler(std::make_unique<options::OptionsHandler>(this)) |
101 |
|
{ |
102 |
24072 |
} |
103 |
|
|
104 |
18786 |
Options::~Options() {} |
105 |
|
|
106 |
19740 |
void Options::copyValues(const Options& options) |
107 |
|
{ |
108 |
19740 |
if (this != &options) |
109 |
|
{ |
110 |
|
// clang-format off |
111 |
19740 |
*d_arith = *options.d_arith; |
112 |
19740 |
*d_arrays = *options.d_arrays; |
113 |
19740 |
*d_base = *options.d_base; |
114 |
19740 |
*d_booleans = *options.d_booleans; |
115 |
19740 |
*d_builtin = *options.d_builtin; |
116 |
19740 |
*d_bv = *options.d_bv; |
117 |
19740 |
*d_datatypes = *options.d_datatypes; |
118 |
19740 |
*d_decision = *options.d_decision; |
119 |
19740 |
*d_expr = *options.d_expr; |
120 |
19740 |
*d_fp = *options.d_fp; |
121 |
19740 |
*d_driver = *options.d_driver; |
122 |
19740 |
*d_parser = *options.d_parser; |
123 |
19740 |
*d_printer = *options.d_printer; |
124 |
19740 |
*d_proof = *options.d_proof; |
125 |
19740 |
*d_prop = *options.d_prop; |
126 |
19740 |
*d_quantifiers = *options.d_quantifiers; |
127 |
19740 |
*d_sep = *options.d_sep; |
128 |
19740 |
*d_sets = *options.d_sets; |
129 |
19740 |
*d_smt = *options.d_smt; |
130 |
19740 |
*d_strings = *options.d_strings; |
131 |
19740 |
*d_theory = *options.d_theory; |
132 |
19740 |
*d_uf = *options.d_uf; |
133 |
|
// clang-format on |
134 |
|
} |
135 |
19740 |
} |
136 |
|
|
137 |
29514 |
} // namespace cvc5 |
138 |
|
|