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__DATATYPES_H |
22 |
|
#define CVC5__OPTIONS__DATATYPES_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 SygusFairMode |
35 |
|
{ |
36 |
|
NONE, |
37 |
|
DT_SIZE_PRED, |
38 |
|
DT_SIZE, |
39 |
|
DT_HEIGHT_PRED, |
40 |
|
DIRECT |
41 |
|
}; |
42 |
|
|
43 |
|
static constexpr size_t SygusFairMode__numValues = 5; |
44 |
|
|
45 |
|
std::ostream& operator<<(std::ostream& os, SygusFairMode mode); |
46 |
|
SygusFairMode stringToSygusFairMode(const std::string& optarg); |
47 |
|
// clang-format on |
48 |
|
|
49 |
|
#if defined(CVC5_MUZZLED) || defined(CVC5_COMPETITION_MODE) |
50 |
|
# define DO_SEMANTIC_CHECKS_BY_DEFAULT false |
51 |
|
#else /* CVC5_MUZZLED || CVC5_COMPETITION_MODE */ |
52 |
|
# define DO_SEMANTIC_CHECKS_BY_DEFAULT true |
53 |
|
#endif /* CVC5_MUZZLED || CVC5_COMPETITION_MODE */ |
54 |
|
|
55 |
24065 |
struct HolderDATATYPES |
56 |
|
{ |
57 |
|
// clang-format off |
58 |
|
bool cdtBisimilar = true; |
59 |
|
bool cdtBisimilarWasSetByUser = false; |
60 |
|
bool dtBinarySplit = false; |
61 |
|
bool dtBinarySplitWasSetByUser = false; |
62 |
|
bool dtBlastSplits = false; |
63 |
|
bool dtBlastSplitsWasSetByUser = false; |
64 |
|
bool dtCyclic = true; |
65 |
|
bool dtCyclicWasSetByUser = false; |
66 |
|
bool dtForceAssignment = false; |
67 |
|
bool dtForceAssignmentWasSetByUser = false; |
68 |
|
bool dtInferAsLemmas = false; |
69 |
|
bool dtInferAsLemmasWasSetByUser = false; |
70 |
|
bool dtNestedRec = false; |
71 |
|
bool dtNestedRecWasSetByUser = false; |
72 |
|
bool dtPoliteOptimize = true; |
73 |
|
bool dtPoliteOptimizeWasSetByUser = false; |
74 |
|
bool dtRewriteErrorSel = false; |
75 |
|
bool dtRewriteErrorSelWasSetByUser = false; |
76 |
|
bool dtSharedSelectors = true; |
77 |
|
bool dtSharedSelectorsWasSetByUser = false; |
78 |
|
int64_t sygusAbortSize = -1; |
79 |
|
bool sygusAbortSizeWasSetByUser = false; |
80 |
|
bool sygusFairMax = true; |
81 |
|
bool sygusFairMaxWasSetByUser = false; |
82 |
|
SygusFairMode sygusFair = SygusFairMode::DT_SIZE; |
83 |
|
bool sygusFairWasSetByUser = false; |
84 |
|
bool sygusSymBreak = true; |
85 |
|
bool sygusSymBreakWasSetByUser = false; |
86 |
|
bool sygusSymBreakAgg = true; |
87 |
|
bool sygusSymBreakAggWasSetByUser = false; |
88 |
|
bool sygusSymBreakDynamic = true; |
89 |
|
bool sygusSymBreakDynamicWasSetByUser = false; |
90 |
|
bool sygusSymBreakLazy = true; |
91 |
|
bool sygusSymBreakLazyWasSetByUser = false; |
92 |
|
bool sygusSymBreakPbe = true; |
93 |
|
bool sygusSymBreakPbeWasSetByUser = false; |
94 |
|
bool sygusSymBreakRlv = true; |
95 |
|
bool sygusSymBreakRlvWasSetByUser = false; |
96 |
|
// clang-format on |
97 |
|
}; |
98 |
|
|
99 |
|
#undef DO_SEMANTIC_CHECKS_BY_DEFAULT |
100 |
|
|
101 |
|
// clang-format off |
102 |
87 |
inline bool cdtBisimilar() { return Options::current().datatypes.cdtBisimilar; } |
103 |
1305 |
inline bool dtBinarySplit() { return Options::current().datatypes.dtBinarySplit; } |
104 |
1305 |
inline bool dtBlastSplits() { return Options::current().datatypes.dtBlastSplits; } |
105 |
140654 |
inline bool dtCyclic() { return Options::current().datatypes.dtCyclic; } |
106 |
17530 |
inline bool dtForceAssignment() { return Options::current().datatypes.dtForceAssignment; } |
107 |
329448 |
inline bool dtInferAsLemmas() { return Options::current().datatypes.dtInferAsLemmas; } |
108 |
74510 |
inline bool dtNestedRec() { return Options::current().datatypes.dtNestedRec; } |
109 |
118188 |
inline bool dtPoliteOptimize() { return Options::current().datatypes.dtPoliteOptimize; } |
110 |
4307 |
inline bool dtRewriteErrorSel() { return Options::current().datatypes.dtRewriteErrorSel; } |
111 |
688132 |
inline bool dtSharedSelectors() { return Options::current().datatypes.dtSharedSelectors; } |
112 |
674 |
inline int64_t sygusAbortSize() { return Options::current().datatypes.sygusAbortSize; } |
113 |
449 |
inline bool sygusFairMax() { return Options::current().datatypes.sygusFairMax; } |
114 |
87699 |
inline SygusFairMode sygusFair() { return Options::current().datatypes.sygusFair; } |
115 |
2916 |
inline bool sygusSymBreak() { return Options::current().datatypes.sygusSymBreak; } |
116 |
181 |
inline bool sygusSymBreakAgg() { return Options::current().datatypes.sygusSymBreakAgg; } |
117 |
8830 |
inline bool sygusSymBreakDynamic() { return Options::current().datatypes.sygusSymBreakDynamic; } |
118 |
394897 |
inline bool sygusSymBreakLazy() { return Options::current().datatypes.sygusSymBreakLazy; } |
119 |
4269 |
inline bool sygusSymBreakPbe() { return Options::current().datatypes.sygusSymBreakPbe; } |
120 |
75875 |
inline bool sygusSymBreakRlv() { return Options::current().datatypes.sygusSymBreakRlv; } |
121 |
|
// clang-format on |
122 |
|
|
123 |
|
namespace datatypes |
124 |
|
{ |
125 |
|
// clang-format off |
126 |
|
static constexpr const char* cdtBisimilar__name = "cdt-bisimilar"; |
127 |
|
static constexpr const char* dtBinarySplit__name = "dt-binary-split"; |
128 |
|
static constexpr const char* dtBlastSplits__name = "dt-blast-splits"; |
129 |
|
static constexpr const char* dtCyclic__name = "dt-cyclic"; |
130 |
|
static constexpr const char* dtForceAssignment__name = "dt-force-assignment"; |
131 |
|
static constexpr const char* dtInferAsLemmas__name = "dt-infer-as-lemmas"; |
132 |
|
static constexpr const char* dtNestedRec__name = "dt-nested-rec"; |
133 |
|
static constexpr const char* dtPoliteOptimize__name = "dt-polite-optimize"; |
134 |
|
static constexpr const char* dtRewriteErrorSel__name = "dt-rewrite-error-sel"; |
135 |
|
static constexpr const char* dtSharedSelectors__name = "dt-share-sel"; |
136 |
|
static constexpr const char* sygusAbortSize__name = "sygus-abort-size"; |
137 |
|
static constexpr const char* sygusFairMax__name = "sygus-fair-max"; |
138 |
|
static constexpr const char* sygusFair__name = "sygus-fair"; |
139 |
|
static constexpr const char* sygusSymBreak__name = "sygus-sym-break"; |
140 |
|
static constexpr const char* sygusSymBreakAgg__name = "sygus-sym-break-agg"; |
141 |
|
static constexpr const char* sygusSymBreakDynamic__name = "sygus-sym-break-dynamic"; |
142 |
|
static constexpr const char* sygusSymBreakLazy__name = "sygus-sym-break-lazy"; |
143 |
|
static constexpr const char* sygusSymBreakPbe__name = "sygus-sym-break-pbe"; |
144 |
|
static constexpr const char* sygusSymBreakRlv__name = "sygus-sym-break-rlv"; |
145 |
|
|
146 |
|
void setDefaultCdtBisimilar(Options& opts, bool value);void setDefaultDtBinarySplit(Options& opts, bool value);void setDefaultDtBlastSplits(Options& opts, bool value);void setDefaultDtCyclic(Options& opts, bool value);void setDefaultDtForceAssignment(Options& opts, bool value);void setDefaultDtInferAsLemmas(Options& opts, bool value);void setDefaultDtNestedRec(Options& opts, bool value);void setDefaultDtPoliteOptimize(Options& opts, bool value);void setDefaultDtRewriteErrorSel(Options& opts, bool value);void setDefaultDtSharedSelectors(Options& opts, bool value);void setDefaultSygusAbortSize(Options& opts, int64_t value);void setDefaultSygusFairMax(Options& opts, bool value);void setDefaultSygusFair(Options& opts, SygusFairMode value);void setDefaultSygusSymBreak(Options& opts, bool value);void setDefaultSygusSymBreakAgg(Options& opts, bool value);void setDefaultSygusSymBreakDynamic(Options& opts, bool value);void setDefaultSygusSymBreakLazy(Options& opts, bool value);void setDefaultSygusSymBreakPbe(Options& opts, bool value);void setDefaultSygusSymBreakRlv(Options& opts, bool value); |
147 |
|
// clang-format on |
148 |
|
} |
149 |
|
|
150 |
|
} // namespace cvc5::options |
151 |
|
|
152 |
|
#endif /* CVC5__OPTIONS__DATATYPES_H */ |