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__STRINGS_H |
22 |
|
#define CVC5__OPTIONS__STRINGS_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 RegExpInterMode |
34 |
|
{ |
35 |
|
ONE_CONSTANT, ALL, NONE, CONSTANT, |
36 |
|
__MAX_VALUE = CONSTANT |
37 |
|
}; |
38 |
|
std::ostream& operator<<(std::ostream& os, RegExpInterMode mode); |
39 |
|
RegExpInterMode stringToRegExpInterMode(const std::string& optarg); |
40 |
|
|
41 |
|
enum class ProcessLoopMode |
42 |
|
{ |
43 |
|
SIMPLE, SIMPLE_ABORT, NONE, FULL, ABORT, |
44 |
|
__MAX_VALUE = ABORT |
45 |
|
}; |
46 |
|
std::ostream& operator<<(std::ostream& os, ProcessLoopMode mode); |
47 |
|
ProcessLoopMode stringToProcessLoopMode(const std::string& optarg); |
48 |
|
|
49 |
|
// clang-format on |
50 |
|
|
51 |
|
#if defined(CVC5_MUZZLED) || defined(CVC5_COMPETITION_MODE) |
52 |
|
# define DO_SEMANTIC_CHECKS_BY_DEFAULT false |
53 |
|
#else /* CVC5_MUZZLED || CVC5_COMPETITION_MODE */ |
54 |
|
# define DO_SEMANTIC_CHECKS_BY_DEFAULT true |
55 |
|
#endif /* CVC5_MUZZLED || CVC5_COMPETITION_MODE */ |
56 |
|
|
57 |
30748 |
struct HolderSTRINGS |
58 |
|
{ |
59 |
|
// clang-format off |
60 |
|
bool regExpElim = false; |
61 |
|
bool regExpElimWasSetByUser = false; |
62 |
|
bool regExpElimAgg = false; |
63 |
|
bool regExpElimAggWasSetByUser = false; |
64 |
|
RegExpInterMode stringRegExpInterMode = RegExpInterMode::CONSTANT; |
65 |
|
bool stringRegExpInterModeWasSetByUser = false; |
66 |
|
uint64_t stringsAlphaCard = 196608; |
67 |
|
bool stringsAlphaCardWasSetByUser = false; |
68 |
|
bool stringCheckEntailLen = true; |
69 |
|
bool stringCheckEntailLenWasSetByUser = false; |
70 |
|
bool stringsDeqExt = false; |
71 |
|
bool stringsDeqExtWasSetByUser = false; |
72 |
|
bool stringEager = false; |
73 |
|
bool stringEagerWasSetByUser = false; |
74 |
|
bool stringEagerEval = true; |
75 |
|
bool stringEagerEvalWasSetByUser = false; |
76 |
|
bool stringEagerLen = true; |
77 |
|
bool stringEagerLenWasSetByUser = false; |
78 |
|
bool stringExp = false; |
79 |
|
bool stringExpWasSetByUser = false; |
80 |
|
bool stringFlatForms = true; |
81 |
|
bool stringFlatFormsWasSetByUser = false; |
82 |
|
bool stringFMF = false; |
83 |
|
bool stringFMFWasSetByUser = false; |
84 |
|
bool stringGuessModel = false; |
85 |
|
bool stringGuessModelWasSetByUser = false; |
86 |
|
bool stringInferAsLemmas = false; |
87 |
|
bool stringInferAsLemmasWasSetByUser = false; |
88 |
|
bool stringInferSym = true; |
89 |
|
bool stringInferSymWasSetByUser = false; |
90 |
|
bool stringLazyPreproc = true; |
91 |
|
bool stringLazyPreprocWasSetByUser = false; |
92 |
|
bool stringLenNorm = true; |
93 |
|
bool stringLenNormWasSetByUser = false; |
94 |
|
bool stringMinPrefixExplain = true; |
95 |
|
bool stringMinPrefixExplainWasSetByUser = false; |
96 |
|
ProcessLoopMode stringProcessLoopMode = ProcessLoopMode::FULL; |
97 |
|
bool stringProcessLoopModeWasSetByUser = false; |
98 |
|
bool stringRExplainLemmas = true; |
99 |
|
bool stringRExplainLemmasWasSetByUser = false; |
100 |
|
bool stringUnifiedVSpt = true; |
101 |
|
bool stringUnifiedVSptWasSetByUser = false; |
102 |
|
// clang-format on |
103 |
|
}; |
104 |
|
|
105 |
|
#undef DO_SEMANTIC_CHECKS_BY_DEFAULT |
106 |
|
|
107 |
|
// clang-format off |
108 |
126590 |
inline bool regExpElim() { return Options::current().strings.regExpElim; } |
109 |
15273 |
inline bool regExpElimAgg() { return Options::current().strings.regExpElimAgg; } |
110 |
1887 |
inline RegExpInterMode stringRegExpInterMode() { return Options::current().strings.stringRegExpInterMode; } |
111 |
|
inline uint64_t stringsAlphaCard() { return Options::current().strings.stringsAlphaCard; } |
112 |
4521 |
inline bool stringCheckEntailLen() { return Options::current().strings.stringCheckEntailLen; } |
113 |
1180 |
inline bool stringsDeqExt() { return Options::current().strings.stringsDeqExt; } |
114 |
29514 |
inline bool stringEager() { return Options::current().strings.stringEager; } |
115 |
15273 |
inline bool stringEagerEval() { return Options::current().strings.stringEagerEval; } |
116 |
73107 |
inline bool stringEagerLen() { return Options::current().strings.stringEagerLen; } |
117 |
245530 |
inline bool stringExp() { return Options::current().strings.stringExp; } |
118 |
14757 |
inline bool stringFlatForms() { return Options::current().strings.stringFlatForms; } |
119 |
139246 |
inline bool stringFMF() { return Options::current().strings.stringFMF; } |
120 |
11194 |
inline bool stringGuessModel() { return Options::current().strings.stringGuessModel; } |
121 |
40775 |
inline bool stringInferAsLemmas() { return Options::current().strings.stringInferAsLemmas; } |
122 |
180769 |
inline bool stringInferSym() { return Options::current().strings.stringInferSym; } |
123 |
|
inline bool stringLazyPreproc() { return Options::current().strings.stringLazyPreproc; } |
124 |
14757 |
inline bool stringLenNorm() { return Options::current().strings.stringLenNorm; } |
125 |
28712 |
inline bool stringMinPrefixExplain() { return Options::current().strings.stringMinPrefixExplain; } |
126 |
1644 |
inline ProcessLoopMode stringProcessLoopMode() { return Options::current().strings.stringProcessLoopMode; } |
127 |
25507 |
inline bool stringRExplainLemmas() { return Options::current().strings.stringRExplainLemmas; } |
128 |
9312 |
inline bool stringUnifiedVSpt() { return Options::current().strings.stringUnifiedVSpt; } |
129 |
|
// clang-format on |
130 |
|
|
131 |
|
} // namespace cvc5::options |
132 |
|
|
133 |
|
#endif /* CVC5__OPTIONS__STRINGS_H */ |