GCC Code Coverage Report
Directory: . Exec Total Coverage
File: build-coverage/src/options/uf_options.h Lines: 8 8 100.0 %
Date: 2021-09-15 Branches: 0 0 0.0 %

Line Exec Source
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
  NONE, FULL, NO_MINIMAL
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
  int64_t ufssTotalityLimited = -1;
67
  bool ufssTotalityLimitedWasSetByUser = false;
68
  bool ufssTotalitySymBreak = false;
69
  bool ufssTotalitySymBreakWasSetByUser = false;
70
// clang-format on
71
};
72
73
#undef DO_SEMANTIC_CHECKS_BY_DEFAULT
74
75
// clang-format off
76
120726
inline bool ufSymmetryBreaker() { return Options::current().uf.ufSymmetryBreaker; }
77
93099
inline bool ufHo() { return Options::current().uf.ufHo; }
78
35117
inline bool ufHoExt() { return Options::current().uf.ufHoExt; }
79
921103
inline UfssMode ufssMode() { return Options::current().uf.ufssMode; }
80
7414
inline int64_t ufssAbortCardinality() { return Options::current().uf.ufssAbortCardinality; }
81
12934
inline bool ufssFairness() { return Options::current().uf.ufssFairness; }
82
100330
inline bool ufssFairnessMonotone() { return Options::current().uf.ufssFairnessMonotone; }
83
inline int64_t ufssTotalityLimited() { return Options::current().uf.ufssTotalityLimited; }
84
inline bool ufssTotalitySymBreak() { return Options::current().uf.ufssTotalitySymBreak; }
85
// clang-format on
86
87
namespace uf
88
{
89
// clang-format off
90
static constexpr const char* ufSymmetryBreaker__name = "symmetry-breaker";
91
static constexpr const char* ufHo__name = "uf-ho";
92
static constexpr const char* ufHoExt__name = "uf-ho-ext";
93
static constexpr const char* ufssMode__name = "uf-ss";
94
static constexpr const char* ufssAbortCardinality__name = "uf-ss-abort-card";
95
static constexpr const char* ufssFairness__name = "uf-ss-fair";
96
static constexpr const char* ufssFairnessMonotone__name = "uf-ss-fair-monotone";
97
static constexpr const char* ufssTotalityLimited__name = "uf-ss-totality-limited";
98
static constexpr const char* ufssTotalitySymBreak__name = "uf-ss-totality-sym-break";
99
100
void setDefaultUfSymmetryBreaker(Options& opts, bool value);
101
void setDefaultUfHo(Options& opts, bool value);
102
void setDefaultUfHoExt(Options& opts, bool value);
103
void setDefaultUfssMode(Options& opts, UfssMode value);
104
void setDefaultUfssAbortCardinality(Options& opts, int64_t value);
105
void setDefaultUfssFairness(Options& opts, bool value);
106
void setDefaultUfssFairnessMonotone(Options& opts, bool value);
107
void setDefaultUfssTotalityLimited(Options& opts, int64_t value);
108
void setDefaultUfssTotalitySymBreak(Options& opts, bool value);
109
// clang-format on
110
}
111
112
}  // namespace cvc5::options
113
114
#endif /* CVC5__OPTIONS__UF_H */