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::options { |
31 |
|
|
32 |
|
// clang-format off |
33 |
|
|
34 |
|
enum class ProofCheckMode |
35 |
|
{ |
36 |
|
LAZY, |
37 |
|
EAGER_SIMPLE, |
38 |
|
EAGER, |
39 |
|
NONE |
40 |
|
}; |
41 |
|
|
42 |
|
static constexpr size_t ProofCheckMode__numValues = 4; |
43 |
|
|
44 |
|
std::ostream& operator<<(std::ostream& os, ProofCheckMode mode); |
45 |
|
ProofCheckMode stringToProofCheckMode(const std::string& optarg); |
46 |
|
|
47 |
|
enum class ProofFormatMode |
48 |
|
{ |
49 |
|
DOT, |
50 |
|
TPTP, |
51 |
|
VERIT, |
52 |
|
NONE |
53 |
|
}; |
54 |
|
|
55 |
|
static constexpr size_t ProofFormatMode__numValues = 4; |
56 |
|
|
57 |
|
std::ostream& operator<<(std::ostream& os, ProofFormatMode mode); |
58 |
|
ProofFormatMode stringToProofFormatMode(const std::string& optarg); |
59 |
|
|
60 |
|
enum class ProofGranularityMode |
61 |
|
{ |
62 |
|
REWRITE, |
63 |
|
DSL_REWRITE, |
64 |
|
OFF, |
65 |
|
THEORY_REWRITE |
66 |
|
}; |
67 |
|
|
68 |
|
static constexpr size_t ProofGranularityMode__numValues = 4; |
69 |
|
|
70 |
|
std::ostream& operator<<(std::ostream& os, ProofGranularityMode mode); |
71 |
|
ProofGranularityMode stringToProofGranularityMode(const std::string& optarg); |
72 |
|
// clang-format on |
73 |
|
|
74 |
|
#if defined(CVC5_MUZZLED) || defined(CVC5_COMPETITION_MODE) |
75 |
|
# define DO_SEMANTIC_CHECKS_BY_DEFAULT false |
76 |
|
#else /* CVC5_MUZZLED || CVC5_COMPETITION_MODE */ |
77 |
|
# define DO_SEMANTIC_CHECKS_BY_DEFAULT true |
78 |
|
#endif /* CVC5_MUZZLED || CVC5_COMPETITION_MODE */ |
79 |
|
|
80 |
24034 |
struct HolderPROOF |
81 |
|
{ |
82 |
|
// clang-format off |
83 |
|
ProofCheckMode proofCheck = ProofCheckMode::LAZY; |
84 |
|
bool proofCheckWasSetByUser = false; |
85 |
|
ProofFormatMode proofFormatMode = ProofFormatMode::NONE; |
86 |
|
bool proofFormatModeWasSetByUser = false; |
87 |
|
ProofGranularityMode proofGranularityMode = ProofGranularityMode::THEORY_REWRITE; |
88 |
|
bool proofGranularityModeWasSetByUser = false; |
89 |
|
uint64_t proofPedantic = 0; |
90 |
|
bool proofPedanticWasSetByUser = false; |
91 |
|
bool proofPrintConclusion = false; |
92 |
|
bool proofPrintConclusionWasSetByUser = false; |
93 |
|
// clang-format on |
94 |
|
}; |
95 |
|
|
96 |
|
#undef DO_SEMANTIC_CHECKS_BY_DEFAULT |
97 |
|
|
98 |
|
// clang-format off |
99 |
26112288 |
inline ProofCheckMode proofCheck() { return Options::current().proof.proofCheck; } |
100 |
3800 |
inline ProofFormatMode proofFormatMode() { return Options::current().proof.proofFormatMode; } |
101 |
6156 |
inline ProofGranularityMode proofGranularityMode() { return Options::current().proof.proofGranularityMode; } |
102 |
|
inline uint64_t proofPedantic() { return Options::current().proof.proofPedantic; } |
103 |
272900 |
inline bool proofPrintConclusion() { return Options::current().proof.proofPrintConclusion; } |
104 |
|
// clang-format on |
105 |
|
|
106 |
|
namespace proof |
107 |
|
{ |
108 |
|
// clang-format off |
109 |
|
static constexpr const char* proofCheck__name = "proof-check"; |
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 |
|
|
115 |
|
void setDefaultProofCheck(Options& opts, ProofCheckMode value);void setDefaultProofFormatMode(Options& opts, ProofFormatMode value);void setDefaultProofGranularityMode(Options& opts, ProofGranularityMode value);void setDefaultProofPedantic(Options& opts, uint64_t value);void setDefaultProofPrintConclusion(Options& opts, bool value); |
116 |
|
// clang-format on |
117 |
|
} |
118 |
|
|
119 |
|
} // namespace cvc5::options |
120 |
|
|
121 |
|
#endif /* CVC5__OPTIONS__PROOF_H */ |