GCC Code Coverage Report
Directory: . Exec Total Coverage
File: build-coverage/src/options/datatypes_options.h Lines: 20 20 100.0 %
Date: 2021-09-17 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__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
enum class SygusFairMode
34
{
35
  NONE, DT_HEIGHT_PRED, DT_SIZE_PRED, DIRECT, DT_SIZE
36
};
37
static constexpr size_t SygusFairMode__numValues = 5;
38
std::ostream& operator<<(std::ostream& os, SygusFairMode mode);
39
SygusFairMode stringToSygusFairMode(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 HolderDATATYPES
50
{
51
// clang-format off
52
bool cdtBisimilar = true;
53
  bool cdtBisimilarWasSetByUser = false;
54
  bool dtBinarySplit = false;
55
  bool dtBinarySplitWasSetByUser = false;
56
  bool dtBlastSplits = false;
57
  bool dtBlastSplitsWasSetByUser = false;
58
  bool dtCyclic = true;
59
  bool dtCyclicWasSetByUser = false;
60
  bool dtForceAssignment = false;
61
  bool dtForceAssignmentWasSetByUser = false;
62
  bool dtInferAsLemmas = false;
63
  bool dtInferAsLemmasWasSetByUser = false;
64
  bool dtNestedRec = false;
65
  bool dtNestedRecWasSetByUser = false;
66
  bool dtPoliteOptimize = true;
67
  bool dtPoliteOptimizeWasSetByUser = false;
68
  bool dtRewriteErrorSel = false;
69
  bool dtRewriteErrorSelWasSetByUser = false;
70
  bool dtSharedSelectors = true;
71
  bool dtSharedSelectorsWasSetByUser = false;
72
  int64_t sygusAbortSize = -1;
73
  bool sygusAbortSizeWasSetByUser = false;
74
  SygusFairMode sygusFair = SygusFairMode::DT_SIZE;
75
  bool sygusFairWasSetByUser = false;
76
  bool sygusFairMax = true;
77
  bool sygusFairMaxWasSetByUser = false;
78
  bool sygusSymBreak = true;
79
  bool sygusSymBreakWasSetByUser = false;
80
  bool sygusSymBreakAgg = true;
81
  bool sygusSymBreakAggWasSetByUser = false;
82
  bool sygusSymBreakDynamic = true;
83
  bool sygusSymBreakDynamicWasSetByUser = false;
84
  bool sygusSymBreakLazy = true;
85
  bool sygusSymBreakLazyWasSetByUser = false;
86
  bool sygusSymBreakPbe = true;
87
  bool sygusSymBreakPbeWasSetByUser = false;
88
  bool sygusSymBreakRlv = true;
89
  bool sygusSymBreakRlvWasSetByUser = false;
90
// clang-format on
91
};
92
93
#undef DO_SEMANTIC_CHECKS_BY_DEFAULT
94
95
// clang-format off
96
87
inline bool cdtBisimilar() { return Options::current().datatypes.cdtBisimilar; }
97
1305
inline bool dtBinarySplit() { return Options::current().datatypes.dtBinarySplit; }
98
1305
inline bool dtBlastSplits() { return Options::current().datatypes.dtBlastSplits; }
99
140647
inline bool dtCyclic() { return Options::current().datatypes.dtCyclic; }
100
17524
inline bool dtForceAssignment() { return Options::current().datatypes.dtForceAssignment; }
101
329439
inline bool dtInferAsLemmas() { return Options::current().datatypes.dtInferAsLemmas; }
102
74493
inline bool dtNestedRec() { return Options::current().datatypes.dtNestedRec; }
103
118190
inline bool dtPoliteOptimize() { return Options::current().datatypes.dtPoliteOptimize; }
104
4303
inline bool dtRewriteErrorSel() { return Options::current().datatypes.dtRewriteErrorSel; }
105
688149
inline bool dtSharedSelectors() { return Options::current().datatypes.dtSharedSelectors; }
106
676
inline int64_t sygusAbortSize() { return Options::current().datatypes.sygusAbortSize; }
107
87705
inline SygusFairMode sygusFair() { return Options::current().datatypes.sygusFair; }
108
450
inline bool sygusFairMax() { return Options::current().datatypes.sygusFairMax; }
109
2917
inline bool sygusSymBreak() { return Options::current().datatypes.sygusSymBreak; }
110
181
inline bool sygusSymBreakAgg() { return Options::current().datatypes.sygusSymBreakAgg; }
111
8832
inline bool sygusSymBreakDynamic() { return Options::current().datatypes.sygusSymBreakDynamic; }
112
394901
inline bool sygusSymBreakLazy() { return Options::current().datatypes.sygusSymBreakLazy; }
113
4275
inline bool sygusSymBreakPbe() { return Options::current().datatypes.sygusSymBreakPbe; }
114
75877
inline bool sygusSymBreakRlv() { return Options::current().datatypes.sygusSymBreakRlv; }
115
// clang-format on
116
117
namespace datatypes
118
{
119
// clang-format off
120
static constexpr const char* cdtBisimilar__name = "cdt-bisimilar";
121
static constexpr const char* dtBinarySplit__name = "dt-binary-split";
122
static constexpr const char* dtBlastSplits__name = "dt-blast-splits";
123
static constexpr const char* dtCyclic__name = "dt-cyclic";
124
static constexpr const char* dtForceAssignment__name = "dt-force-assignment";
125
static constexpr const char* dtInferAsLemmas__name = "dt-infer-as-lemmas";
126
static constexpr const char* dtNestedRec__name = "dt-nested-rec";
127
static constexpr const char* dtPoliteOptimize__name = "dt-polite-optimize";
128
static constexpr const char* dtRewriteErrorSel__name = "dt-rewrite-error-sel";
129
static constexpr const char* dtSharedSelectors__name = "dt-share-sel";
130
static constexpr const char* sygusAbortSize__name = "sygus-abort-size";
131
static constexpr const char* sygusFair__name = "sygus-fair";
132
static constexpr const char* sygusFairMax__name = "sygus-fair-max";
133
static constexpr const char* sygusSymBreak__name = "sygus-sym-break";
134
static constexpr const char* sygusSymBreakAgg__name = "sygus-sym-break-agg";
135
static constexpr const char* sygusSymBreakDynamic__name = "sygus-sym-break-dynamic";
136
static constexpr const char* sygusSymBreakLazy__name = "sygus-sym-break-lazy";
137
static constexpr const char* sygusSymBreakPbe__name = "sygus-sym-break-pbe";
138
static constexpr const char* sygusSymBreakRlv__name = "sygus-sym-break-rlv";
139
140
void setDefaultCdtBisimilar(Options& opts, bool value);
141
void setDefaultDtBinarySplit(Options& opts, bool value);
142
void setDefaultDtBlastSplits(Options& opts, bool value);
143
void setDefaultDtCyclic(Options& opts, bool value);
144
void setDefaultDtForceAssignment(Options& opts, bool value);
145
void setDefaultDtInferAsLemmas(Options& opts, bool value);
146
void setDefaultDtNestedRec(Options& opts, bool value);
147
void setDefaultDtPoliteOptimize(Options& opts, bool value);
148
void setDefaultDtRewriteErrorSel(Options& opts, bool value);
149
void setDefaultDtSharedSelectors(Options& opts, bool value);
150
void setDefaultSygusAbortSize(Options& opts, int64_t value);
151
void setDefaultSygusFair(Options& opts, SygusFairMode value);
152
void setDefaultSygusFairMax(Options& opts, bool value);
153
void setDefaultSygusSymBreak(Options& opts, bool value);
154
void setDefaultSygusSymBreakAgg(Options& opts, bool value);
155
void setDefaultSygusSymBreakDynamic(Options& opts, bool value);
156
void setDefaultSygusSymBreakLazy(Options& opts, bool value);
157
void setDefaultSygusSymBreakPbe(Options& opts, bool value);
158
void setDefaultSygusSymBreakRlv(Options& opts, bool value);
159
// clang-format on
160
}
161
162
}  // namespace cvc5::options
163
164
#endif /* CVC5__OPTIONS__DATATYPES_H */