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