33#include <unordered_map>
46 std::unordered_map<std::string, std::string>
info;
48 std::unordered_map<std::string, std::string>
get_info;
51 std::unordered_map<std::string, std::string>
options;
58 std::unordered_map<std::string, std::string>
values;
93 if (logic_name ==
"AUFBV" || logic_name ==
"QF_RDL" ||
94 logic_name ==
"QF_AX" || logic_name ==
"BV" || logic_name ==
"QF_FP" ||
95 logic_name ==
"BVFPLRA" || logic_name ==
"QF_UFNRA" ||
96 logic_name ==
"QF_ABVFPLRA" || logic_name ==
"ANIA" ||
97 logic_name ==
"LRA" || logic_name ==
"QF_UFLRA" ||
98 logic_name ==
"NIA" || logic_name ==
"UF" || logic_name ==
"UFBVDT" ||
99 logic_name ==
"QF_LRA" || logic_name ==
"QF_IDL" ||
100 logic_name ==
"UFDTLIA" || logic_name ==
"UFDT" ||
101 logic_name ==
"UFBVFP" || logic_name ==
"AUFBVDTLIA" ||
102 logic_name ==
"QF_S" || logic_name ==
"AUFBVDTNIA" ||
103 logic_name ==
"AUFNIRA" || logic_name ==
"AUFNIA" ||
104 logic_name ==
"QF_UFDTNIA" || logic_name ==
"QF_UFFPDTNIRA" ||
105 logic_name ==
"ABV" || logic_name ==
"ALIA" || logic_name ==
"QF_UF" ||
106 logic_name ==
"UFNIA" || logic_name ==
"UFLRA" ||
107 logic_name ==
"AUFFPDTNIRA" || logic_name ==
"FP" ||
108 logic_name ==
"UFFPDTNIRA" || logic_name ==
"QF_ANIA" ||
109 logic_name ==
"QF_UFDTLIA" || logic_name ==
"QF_BVFPLRA" ||
110 logic_name ==
"QF_UFBVDT" || logic_name ==
"QF_ABV" ||
111 logic_name ==
"QF_UFDT" || logic_name ==
"AUFBVDTNIRA" ||
112 logic_name ==
"QF_NIA" || logic_name ==
"QF_AUFNIA" ||
113 logic_name ==
"UFNIRA" || logic_name ==
"BVFP" ||
114 logic_name ==
"UFBVFPDTNIRA" || logic_name ==
"ABVFP" ||
115 logic_name ==
"UFDTLIRA" || logic_name ==
"FPLRA" ||
116 logic_name ==
"QF_BVFP" || logic_name ==
"QF_UFFP" ||
117 logic_name ==
"QF_FPLRA" || logic_name ==
"AUFBVFP" ||
118 logic_name ==
"AUFBVFPDTNIRA" || logic_name ==
"QF_AUFBV" ||
119 logic_name ==
"QF_NIRA" || logic_name ==
"QF_SLIA" ||
120 logic_name ==
"QF_AUFBVFP" || logic_name ==
"UFDTNIRA" ||
121 logic_name ==
"UFDTNIA" || logic_name ==
"QF_AUFLIA" ||
122 logic_name ==
"QF_UFBV" || logic_name ==
"AUFDTNIRA" ||
123 logic_name ==
"QF_ALIA" || logic_name ==
"QF_UFDTLIRA" ||
124 logic_name ==
"QF_NRA" || logic_name ==
"ABVFPLRA" ||
125 logic_name ==
"QF_BV" || logic_name ==
"QF_UFNIA" ||
126 logic_name ==
"QF_LIA" || logic_name ==
"UFBVDTLIA" ||
127 logic_name ==
"AUFDTLIRA" || logic_name ==
"UFIDL" ||
128 logic_name ==
"LIA" || logic_name ==
"UFBVDTNIA" ||
129 logic_name ==
"QF_ABVFP" || logic_name ==
"QF_LIRA" ||
130 logic_name ==
"UFBV" || logic_name ==
"QF_UFIDL" ||
131 logic_name ==
"AUFLIA" || logic_name ==
"UFBVDTNIRA" ||
132 logic_name ==
"AUFLIRA" || logic_name ==
"UFLIA" ||
133 logic_name ==
"AUFDTLIA" || logic_name ==
"QF_UFLIA" ||
134 logic_name ==
"UFBVLIA" || logic_name ==
"QF_SNIA" ||
135 logic_name ==
"QF_DT" || logic_name ==
"NRA" || logic_name ==
"ALL") {
146 void setOption(
const std::string &key,
const std::string &value) {
148 if (key ==
"keep_let") {
151 else if (key ==
"keep_division") {
154 else if (key ==
"precision") {
157 else if (key ==
"float_evaluate") {
160 else if (key ==
"expand_functions") {
163 else if (key ==
"expand_recursive_functions") {
168 void setInfo(
const std::string &key,
const std::string &value) {
174 void getValue(
const std::string &key,
const std::string &value) {
178 void getInfo(
const std::string &key,
const std::string &value) {
182 void getOption(
const std::string &key,
const std::string &value) {
188 return logic.find(
"I") != std::string::npos &&
189 logic.find(
"R") == std::string::npos;
193 return logic.find(
"I") != std::string::npos &&
194 logic.find(
"R") != std::string::npos;
237 "=================================================================\n";
238 result +=
" stabilizer::parser Configuration Report\n";
240 "=================================================================\n\n";
243 result +=
"1. Logic\n";
244 result +=
" Option: logic\n";
245 result +=
" Default: UNKNOWN_LOGIC\n";
246 result +=
" Current: " +
logic +
"\n";
248 " Description: The SMT-LIB2 logic to use for parsing and "
251 " Determines which theories and quantifiers are "
255 result +=
"2. Evaluation Precision\n";
257 " Option: precision (set via setOption or setEvaluatePrecision)\n";
258 result +=
" Default: 128\n";
261 " Description: The precision (in bits) for MPFR floating-point "
264 " Higher values provide more accurate results but "
265 "slower computation.\n\n";
268 result +=
"3. Floating-Point Evaluation Mode\n";
270 " Option: float_evaluate (set via setOption or "
271 "setEvaluateUseFloating)\n";
272 result +=
" Default: true\n";
277 " Description: When enabled, uses floating-point arithmetic "
280 " When disabled, uses exact rational arithmetic "
281 "where possible.\n\n";
284 result +=
"4. Keep Division If Not Divisible\n";
286 " Option: keep_division (set via setOption or setKeepDivision)\n";
287 result +=
" Default: true\n";
288 result +=
" Current: " +
292 " Description: When enabled, preserves division operations in "
293 "their original form\n";
295 " if the division is not exact. When disabled, "
296 "always computes the result.\n\n";
299 result +=
"5. Preserve Let Bindings\n";
300 result +=
" Option: keep_let (set via setOption or setKeepLet)\n";
301 result +=
" Default: true\n";
306 " Description: When enabled, preserves let-binding structures "
309 " When disabled, automatically expands "
310 "let-bindings inline.\n\n";
313 result +=
"6. Expand Function Applications\n";
315 " Option: expand_functions (set via setOption or "
316 "setExpandFunctions)\n";
317 result +=
" Default: true\n";
322 " Description: When enabled (default), function calls "
323 "(define-fun) are inlined with\n";
325 " their definitions. When disabled, function "
326 "applications are preserved\n";
328 " as-is, keeping the function call structure in "
332 result +=
"7. Expand Recursive Functions\n";
334 " Option: expand_recursive_functions (set via setOption or "
335 "setExpandRecursiveFunctions)\n";
336 result +=
" Default: false\n";
337 result +=
" Current: " +
339 result +=
" Status: NOT CURRENTLY SUPPORTED\n";
341 " Description: When enabled, recursive functions "
342 "(define-fun-rec) would be expanded\n";
344 " like regular function definitions. This feature "
345 "is planned for future\n";
347 " implementation using a 'this' placeholder "
348 "mechanism to handle recursive\n";
350 " self-references during function body parsing "
351 "and expansion.\n\n";
354 result +=
"8. Command Flags\n";
356 " check_sat: " + std::string(
check_sat ?
"true" :
"false") +
"\n";
358 " get_assertions: " + std::string(
get_assertions ?
"true" :
"false") +
361 " get_assignment: " + std::string(
get_assignment ?
"true" :
"false") +
364 " get_model: " + std::string(
get_model ?
"true" :
"false") +
"\n";
366 " get_proof: " + std::string(
get_proof ?
"true" :
"false") +
"\n";
367 result +=
" get_unsat_assumptions: " +
370 " get_unsat_core: " + std::string(
get_unsat_core ?
"true" :
"false") +
373 " get_objectives: " + std::string(
get_objectives ?
"true" :
"false") +
376 " Description: Flags indicating which SMT-LIB2 commands have "
377 "been encountered.\n\n";
381 result +=
"8. Set-Info Attributes\n";
382 for (
const auto &kv :
info) {
383 result +=
" " + kv.first +
" = " + kv.second +
"\n";
390 result +=
"9. Set-Option Values\n";
391 for (
const auto &kv :
options) {
392 result +=
" " + kv.first +
" = " + kv.second +
"\n";
399 result +=
"10. Get-Info Queries\n";
401 result +=
" " + kv.first +
" = " + kv.second +
"\n";
408 result +=
"11. Get-Option Queries\n";
410 result +=
" " + kv.first +
" = " + kv.second +
"\n";
417 result +=
"12. Get-Value Queries\n";
418 for (
const auto &kv :
values) {
419 result +=
" " + kv.first +
" = " + kv.second +
"\n";
425 "=================================================================\n";
bool get_unsat_assumptions
bool parsing_preserve_let
std::unordered_map< std::string, std::string > info
bool expand_recursive_functions
std::unordered_map< std::string, std::string > get_info
std::unordered_map< std::string, std::string > values
void getValue(const std::string &key, const std::string &value)
bool getExpandFunctions() const
void setExpandFunctions(bool expand)
bool isRealTheory() const
void setOption(const std::string &key, const std::string &value)
mpfr_prec_t getEvaluatePrecision() const
void setExpandRecursiveFunctions(bool expand)
bool getExpandRecursiveFunctions() const
void setKeepLet(bool keep)
bool getEvaluateUseFloating() const
bool evaluate_use_floating
bool setLogic(const std::string &logic_name)
void getOption(const std::string &key, const std::string &value)
void setInfo(const std::string &key, const std::string &value)
std::string toString() const
Generate a detailed configuration report.
std::unordered_map< std::string, std::string > options
void setKeepDivision(bool keep)
std::string getLogic() const
bool getKeepDivision() const
bool keep_division_if_not_divisible
void setRewrite(bool rewrite)
void setEvaluateUseFloating(bool use_floating)
void setEvaluatePrecision(mpfr_prec_t precision)
bool isIntRealTheory() const
void getInfo(const std::string &key, const std::string &value)
mpfr_prec_t evaluate_precision
std::unordered_map< std::string, std::string > get_options