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__UF_H |
22 |
|
#define CVC5__OPTIONS__UF_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 UfssMode |
35 |
|
{ |
36 |
|
NONE, |
37 |
|
FULL, |
38 |
|
NO_MINIMAL |
39 |
|
}; |
40 |
|
|
41 |
|
static constexpr size_t UfssMode__numValues = 3; |
42 |
|
|
43 |
|
std::ostream& operator<<(std::ostream& os, UfssMode mode); |
44 |
|
UfssMode stringToUfssMode(const std::string& optarg); |
45 |
|
// clang-format on |
46 |
|
|
47 |
|
#if defined(CVC5_MUZZLED) || defined(CVC5_COMPETITION_MODE) |
48 |
|
# define DO_SEMANTIC_CHECKS_BY_DEFAULT false |
49 |
|
#else /* CVC5_MUZZLED || CVC5_COMPETITION_MODE */ |
50 |
|
# define DO_SEMANTIC_CHECKS_BY_DEFAULT true |
51 |
|
#endif /* CVC5_MUZZLED || CVC5_COMPETITION_MODE */ |
52 |
|
|
53 |
27407 |
struct HolderUF |
54 |
|
{ |
55 |
|
// clang-format off |
56 |
|
bool ufSymmetryBreaker = true; |
57 |
|
bool ufSymmetryBreakerWasSetByUser = false; |
58 |
|
bool ufHo = false; |
59 |
|
bool ufHoWasSetByUser = false; |
60 |
|
bool ufHoExt = true; |
61 |
|
bool ufHoExtWasSetByUser = false; |
62 |
|
int64_t ufssAbortCardinality = -1; |
63 |
|
bool ufssAbortCardinalityWasSetByUser = false; |
64 |
|
bool ufssFairness = true; |
65 |
|
bool ufssFairnessWasSetByUser = false; |
66 |
|
bool ufssFairnessMonotone = false; |
67 |
|
bool ufssFairnessMonotoneWasSetByUser = false; |
68 |
|
int64_t ufssTotalityLimited = -1; |
69 |
|
bool ufssTotalityLimitedWasSetByUser = false; |
70 |
|
bool ufssTotalitySymBreak = false; |
71 |
|
bool ufssTotalitySymBreakWasSetByUser = false; |
72 |
|
UfssMode ufssMode = UfssMode::FULL; |
73 |
|
bool ufssModeWasSetByUser = false; |
74 |
|
// clang-format on |
75 |
|
}; |
76 |
|
|
77 |
|
#undef DO_SEMANTIC_CHECKS_BY_DEFAULT |
78 |
|
|
79 |
|
// clang-format off |
80 |
120442 |
inline bool ufSymmetryBreaker() { return Options::current().uf.ufSymmetryBreaker; } |
81 |
11556240 |
inline bool ufHo() { return Options::current().uf.ufHo; } |
82 |
34491 |
inline bool ufHoExt() { return Options::current().uf.ufHoExt; } |
83 |
7377 |
inline int64_t ufssAbortCardinality() { return Options::current().uf.ufssAbortCardinality; } |
84 |
12900 |
inline bool ufssFairness() { return Options::current().uf.ufssFairness; } |
85 |
99654 |
inline bool ufssFairnessMonotone() { return Options::current().uf.ufssFairnessMonotone; } |
86 |
|
inline int64_t ufssTotalityLimited() { return Options::current().uf.ufssTotalityLimited; } |
87 |
|
inline bool ufssTotalitySymBreak() { return Options::current().uf.ufssTotalitySymBreak; } |
88 |
941005 |
inline UfssMode ufssMode() { return Options::current().uf.ufssMode; } |
89 |
|
// clang-format on |
90 |
|
|
91 |
|
namespace uf |
92 |
|
{ |
93 |
|
// clang-format off |
94 |
|
static constexpr const char* ufSymmetryBreaker__name = "symmetry-breaker"; |
95 |
|
static constexpr const char* ufHo__name = "uf-ho"; |
96 |
|
static constexpr const char* ufHoExt__name = "uf-ho-ext"; |
97 |
|
static constexpr const char* ufssAbortCardinality__name = "uf-ss-abort-card"; |
98 |
|
static constexpr const char* ufssFairness__name = "uf-ss-fair"; |
99 |
|
static constexpr const char* ufssFairnessMonotone__name = "uf-ss-fair-monotone"; |
100 |
|
static constexpr const char* ufssTotalityLimited__name = "uf-ss-totality-limited"; |
101 |
|
static constexpr const char* ufssTotalitySymBreak__name = "uf-ss-totality-sym-break"; |
102 |
|
static constexpr const char* ufssMode__name = "uf-ss"; |
103 |
|
|
104 |
|
void setDefaultUfSymmetryBreaker(Options& opts, bool value);void setDefaultUfHo(Options& opts, bool value);void setDefaultUfHoExt(Options& opts, bool value);void setDefaultUfssAbortCardinality(Options& opts, int64_t value);void setDefaultUfssFairness(Options& opts, bool value);void setDefaultUfssFairnessMonotone(Options& opts, bool value);void setDefaultUfssTotalityLimited(Options& opts, int64_t value);void setDefaultUfssTotalitySymBreak(Options& opts, bool value);void setDefaultUfssMode(Options& opts, UfssMode value); |
105 |
|
// clang-format on |
106 |
|
} |
107 |
|
|
108 |
|
} // namespace cvc5::options |
109 |
|
|
110 |
|
#endif /* CVC5__OPTIONS__UF_H */ |