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__PROOF_H |
22 |
|
#define CVC5__OPTIONS__PROOF_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 |
|
enum class ProofFormatMode |
36 |
|
{ |
37 |
|
NONE, |
38 |
|
VERIT, |
39 |
|
DOT |
40 |
|
}; |
41 |
|
std::ostream& operator<<(std::ostream& os, ProofFormatMode mode); |
42 |
|
ProofFormatMode stringToProofFormatMode(const std::string& optarg); |
43 |
|
enum class ProofGranularityMode |
44 |
|
{ |
45 |
|
OFF, |
46 |
|
REWRITE, |
47 |
|
DSL_REWRITE, |
48 |
|
THEORY_REWRITE |
49 |
|
}; |
50 |
|
std::ostream& operator<<(std::ostream& os, ProofGranularityMode mode); |
51 |
|
ProofGranularityMode stringToProofGranularityMode(const std::string& optarg); |
52 |
|
// clang-format on |
53 |
|
|
54 |
|
#if defined(CVC5_MUZZLED) || defined(CVC5_COMPETITION_MODE) |
55 |
|
# define DO_SEMANTIC_CHECKS_BY_DEFAULT false |
56 |
|
#else /* CVC5_MUZZLED || CVC5_COMPETITION_MODE */ |
57 |
|
# define DO_SEMANTIC_CHECKS_BY_DEFAULT true |
58 |
|
#endif /* CVC5_MUZZLED || CVC5_COMPETITION_MODE */ |
59 |
|
|
60 |
24449 |
struct HolderPROOF |
61 |
|
{ |
62 |
|
// clang-format off |
63 |
|
bool proofEagerChecking = false;\ |
64 |
|
bool proofEagerChecking__setByUser__ = false; |
65 |
|
ProofFormatMode proofFormatMode = ProofFormatMode::NONE;\ |
66 |
|
bool proofFormatMode__setByUser__ = false; |
67 |
|
ProofGranularityMode proofGranularityMode = ProofGranularityMode::THEORY_REWRITE;\ |
68 |
|
bool proofGranularityMode__setByUser__ = false; |
69 |
|
uint32_t proofPedantic = 0;\ |
70 |
|
bool proofPedantic__setByUser__ = false; |
71 |
|
bool proofPrintConclusion = false;\ |
72 |
|
bool proofPrintConclusion__setByUser__ = false; |
73 |
|
// clang-format on |
74 |
|
}; |
75 |
|
|
76 |
|
#undef DO_SEMANTIC_CHECKS_BY_DEFAULT |
77 |
|
|
78 |
|
// clang-format off |
79 |
|
extern struct proofEagerChecking__option_t |
80 |
|
{ |
81 |
|
typedef bool type; |
82 |
|
type operator()() const; |
83 |
|
} thread_local proofEagerChecking; |
84 |
|
extern struct proofFormatMode__option_t |
85 |
|
{ |
86 |
|
typedef ProofFormatMode type; |
87 |
|
type operator()() const; |
88 |
|
} thread_local proofFormatMode; |
89 |
|
extern struct proofGranularityMode__option_t |
90 |
|
{ |
91 |
|
typedef ProofGranularityMode type; |
92 |
|
type operator()() const; |
93 |
|
} thread_local proofGranularityMode; |
94 |
|
extern struct proofPedantic__option_t |
95 |
|
{ |
96 |
|
typedef uint32_t type; |
97 |
|
type operator()() const; |
98 |
|
} thread_local proofPedantic; |
99 |
|
extern struct proofPrintConclusion__option_t |
100 |
|
{ |
101 |
|
typedef bool type; |
102 |
|
type operator()() const; |
103 |
|
} thread_local proofPrintConclusion; |
104 |
|
// clang-format on |
105 |
|
|
106 |
|
namespace proof |
107 |
|
{ |
108 |
|
// clang-format off |
109 |
|
static constexpr const char* proofEagerChecking__name = "proof-eager-checking"; |
110 |
|
static constexpr const char* proofFormatMode__name = "proof-format-mode"; |
111 |
|
static constexpr const char* proofGranularityMode__name = "proof-granularity"; |
112 |
|
static constexpr const char* proofPedantic__name = "proof-pedantic"; |
113 |
|
static constexpr const char* proofPrintConclusion__name = "proof-print-conclusion"; |
114 |
|
// clang-format on |
115 |
|
} |
116 |
|
|
117 |
|
} // namespace options |
118 |
|
|
119 |
|
// clang-format off |
120 |
|
template <> options::proofEagerChecking__option_t::type& Options::ref( |
121 |
|
options::proofEagerChecking__option_t); |
122 |
|
template <> const options::proofEagerChecking__option_t::type& Options::operator[]( |
123 |
|
options::proofEagerChecking__option_t) const; |
124 |
|
template <> bool Options::wasSetByUser(options::proofEagerChecking__option_t) const; |
125 |
|
template <> options::proofFormatMode__option_t::type& Options::ref( |
126 |
|
options::proofFormatMode__option_t); |
127 |
|
template <> const options::proofFormatMode__option_t::type& Options::operator[]( |
128 |
|
options::proofFormatMode__option_t) const; |
129 |
|
template <> bool Options::wasSetByUser(options::proofFormatMode__option_t) const; |
130 |
|
template <> options::proofGranularityMode__option_t::type& Options::ref( |
131 |
|
options::proofGranularityMode__option_t); |
132 |
|
template <> const options::proofGranularityMode__option_t::type& Options::operator[]( |
133 |
|
options::proofGranularityMode__option_t) const; |
134 |
|
template <> bool Options::wasSetByUser(options::proofGranularityMode__option_t) const; |
135 |
|
template <> options::proofPedantic__option_t::type& Options::ref( |
136 |
|
options::proofPedantic__option_t); |
137 |
|
template <> const options::proofPedantic__option_t::type& Options::operator[]( |
138 |
|
options::proofPedantic__option_t) const; |
139 |
|
template <> bool Options::wasSetByUser(options::proofPedantic__option_t) const; |
140 |
|
template <> options::proofPrintConclusion__option_t::type& Options::ref( |
141 |
|
options::proofPrintConclusion__option_t); |
142 |
|
template <> const options::proofPrintConclusion__option_t::type& Options::operator[]( |
143 |
|
options::proofPrintConclusion__option_t) const; |
144 |
|
template <> bool Options::wasSetByUser(options::proofPrintConclusion__option_t) const; |
145 |
|
// clang-format on |
146 |
|
|
147 |
|
namespace options { |
148 |
|
// clang-format off |
149 |
13624778 |
inline proofEagerChecking__option_t::type proofEagerChecking__option_t::operator()() const |
150 |
|
{ |
151 |
13624778 |
return Options::current()[*this]; |
152 |
|
} |
153 |
3118 |
inline proofFormatMode__option_t::type proofFormatMode__option_t::operator()() const |
154 |
|
{ |
155 |
3118 |
return Options::current()[*this]; |
156 |
|
} |
157 |
5463 |
inline proofGranularityMode__option_t::type proofGranularityMode__option_t::operator()() const |
158 |
|
{ |
159 |
5463 |
return Options::current()[*this]; |
160 |
|
} |
161 |
3117 |
inline proofPedantic__option_t::type proofPedantic__option_t::operator()() const |
162 |
|
{ |
163 |
3117 |
return Options::current()[*this]; |
164 |
|
} |
165 |
208623 |
inline proofPrintConclusion__option_t::type proofPrintConclusion__option_t::operator()() const |
166 |
|
{ |
167 |
208623 |
return Options::current()[*this]; |
168 |
|
} |
169 |
|
// clang-format on |
170 |
|
|
171 |
|
} // namespace options |
172 |
|
} // namespace cvc5 |
173 |
|
|
174 |
|
#endif /* CVC5__OPTIONS__PROOF_H */ |