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 |
|
enum class ProofCheckMode |
34 |
|
{ |
35 |
|
NONE, LAZY, EAGER_SIMPLE, EAGER, |
36 |
|
__MAX_VALUE = EAGER |
37 |
|
}; |
38 |
|
std::ostream& operator<<(std::ostream& os, ProofCheckMode mode); |
39 |
|
ProofCheckMode stringToProofCheckMode(const std::string& optarg); |
40 |
|
|
41 |
|
enum class ProofFormatMode |
42 |
|
{ |
43 |
|
NONE, ALETHE, LFSC, TPTP, DOT, |
44 |
|
__MAX_VALUE = DOT |
45 |
|
}; |
46 |
|
std::ostream& operator<<(std::ostream& os, ProofFormatMode mode); |
47 |
|
ProofFormatMode stringToProofFormatMode(const std::string& optarg); |
48 |
|
|
49 |
|
enum class ProofGranularityMode |
50 |
|
{ |
51 |
|
OFF, THEORY_REWRITE, REWRITE, DSL_REWRITE, |
52 |
|
__MAX_VALUE = DSL_REWRITE |
53 |
|
}; |
54 |
|
std::ostream& operator<<(std::ostream& os, ProofGranularityMode mode); |
55 |
|
ProofGranularityMode stringToProofGranularityMode(const std::string& optarg); |
56 |
|
|
57 |
|
// clang-format on |
58 |
|
|
59 |
|
#if defined(CVC5_MUZZLED) || defined(CVC5_COMPETITION_MODE) |
60 |
|
# define DO_SEMANTIC_CHECKS_BY_DEFAULT false |
61 |
|
#else /* CVC5_MUZZLED || CVC5_COMPETITION_MODE */ |
62 |
|
# define DO_SEMANTIC_CHECKS_BY_DEFAULT true |
63 |
|
#endif /* CVC5_MUZZLED || CVC5_COMPETITION_MODE */ |
64 |
|
|
65 |
30741 |
struct HolderPROOF |
66 |
|
{ |
67 |
|
// clang-format off |
68 |
|
ProofCheckMode proofCheck = ProofCheckMode::LAZY; |
69 |
|
bool proofCheckWasSetByUser = false; |
70 |
|
ProofFormatMode proofFormatMode = ProofFormatMode::NONE; |
71 |
|
bool proofFormatModeWasSetByUser = false; |
72 |
|
ProofGranularityMode proofGranularityMode = ProofGranularityMode::THEORY_REWRITE; |
73 |
|
bool proofGranularityModeWasSetByUser = false; |
74 |
|
uint64_t proofPedantic = 0; |
75 |
|
bool proofPedanticWasSetByUser = false; |
76 |
|
bool proofPpMerge = true; |
77 |
|
bool proofPpMergeWasSetByUser = false; |
78 |
|
bool proofPrintConclusion = false; |
79 |
|
bool proofPrintConclusionWasSetByUser = false; |
80 |
|
// clang-format on |
81 |
|
}; |
82 |
|
|
83 |
|
#undef DO_SEMANTIC_CHECKS_BY_DEFAULT |
84 |
|
|
85 |
|
// clang-format off |
86 |
26213520 |
inline ProofCheckMode proofCheck() { return Options::current().proof.proofCheck; } |
87 |
|
inline ProofFormatMode proofFormatMode() { return Options::current().proof.proofFormatMode; } |
88 |
|
inline ProofGranularityMode proofGranularityMode() { return Options::current().proof.proofGranularityMode; } |
89 |
|
inline uint64_t proofPedantic() { return Options::current().proof.proofPedantic; } |
90 |
|
inline bool proofPpMerge() { return Options::current().proof.proofPpMerge; } |
91 |
270928 |
inline bool proofPrintConclusion() { return Options::current().proof.proofPrintConclusion; } |
92 |
|
// clang-format on |
93 |
|
|
94 |
|
} // namespace cvc5::options |
95 |
|
|
96 |
|
#endif /* CVC5__OPTIONS__PROOF_H */ |