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__PRINTER_H |
22 |
|
#define CVC5__OPTIONS__PRINTER_H |
23 |
|
|
24 |
|
#include "options/options.h" |
25 |
|
|
26 |
|
// clang-format off |
27 |
|
|
28 |
|
// clang-format on |
29 |
|
|
30 |
|
namespace cvc5::options { |
31 |
|
|
32 |
|
// clang-format off |
33 |
|
enum class PrintInstMode |
34 |
|
{ |
35 |
|
NUM, LIST |
36 |
|
}; |
37 |
|
static constexpr size_t PrintInstMode__numValues = 2; |
38 |
|
std::ostream& operator<<(std::ostream& os, PrintInstMode mode); |
39 |
|
PrintInstMode stringToPrintInstMode(const std::string& optarg); |
40 |
|
|
41 |
|
// clang-format on |
42 |
|
|
43 |
|
#if defined(CVC5_MUZZLED) || defined(CVC5_COMPETITION_MODE) |
44 |
|
# define DO_SEMANTIC_CHECKS_BY_DEFAULT false |
45 |
|
#else /* CVC5_MUZZLED || CVC5_COMPETITION_MODE */ |
46 |
|
# define DO_SEMANTIC_CHECKS_BY_DEFAULT true |
47 |
|
#endif /* CVC5_MUZZLED || CVC5_COMPETITION_MODE */ |
48 |
|
|
49 |
24139 |
struct HolderPRINTER |
50 |
|
{ |
51 |
|
// clang-format off |
52 |
|
bool flattenHOChains = false; |
53 |
|
bool flattenHOChainsWasSetByUser = false; |
54 |
|
PrintInstMode printInstMode = PrintInstMode::LIST; |
55 |
|
bool printInstModeWasSetByUser = false; |
56 |
|
bool printInstFull = true; |
57 |
|
bool printInstFullWasSetByUser = false; |
58 |
|
// clang-format on |
59 |
|
}; |
60 |
|
|
61 |
|
#undef DO_SEMANTIC_CHECKS_BY_DEFAULT |
62 |
|
|
63 |
|
// clang-format off |
64 |
|
inline bool flattenHOChains() { return Options::current().printer.flattenHOChains; } |
65 |
|
inline PrintInstMode printInstMode() { return Options::current().printer.printInstMode; } |
66 |
2 |
inline bool printInstFull() { return Options::current().printer.printInstFull; } |
67 |
|
// clang-format on |
68 |
|
|
69 |
|
namespace printer |
70 |
|
{ |
71 |
|
// clang-format off |
72 |
|
static constexpr const char* flattenHOChains__name = "flatten-ho-chains"; |
73 |
|
static constexpr const char* printInstMode__name = "print-inst"; |
74 |
|
static constexpr const char* printInstFull__name = "print-inst-full"; |
75 |
|
|
76 |
|
void setDefaultFlattenHOChains(Options& opts, bool value); |
77 |
|
void setDefaultPrintInstMode(Options& opts, PrintInstMode value); |
78 |
|
void setDefaultPrintInstFull(Options& opts, bool value); |
79 |
|
// clang-format on |
80 |
|
} |
81 |
|
|
82 |
|
} // namespace cvc5::options |
83 |
|
|
84 |
|
#endif /* CVC5__OPTIONS__PRINTER_H */ |