GCC Code Coverage Report
Directory: . Exec Total Coverage
File: build-coverage/src/options/arrays_options.h Lines: 15 15 100.0 %
Date: 2021-08-01 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__ARRAYS_H
22
#define CVC5__OPTIONS__ARRAYS_H
23
24
#include "options/options.h"
25
26
// clang-format off
27
28
// clang-format on
29
30
namespace cvc5 {
31
namespace options {
32
33
// clang-format off
34
35
// clang-format on
36
37
#if defined(CVC5_MUZZLED) || defined(CVC5_COMPETITION_MODE)
38
#  define DO_SEMANTIC_CHECKS_BY_DEFAULT false
39
#else /* CVC5_MUZZLED || CVC5_COMPETITION_MODE */
40
#  define DO_SEMANTIC_CHECKS_BY_DEFAULT true
41
#endif /* CVC5_MUZZLED || CVC5_COMPETITION_MODE */
42
43
27390
struct HolderARRAYS
44
{
45
// clang-format off
46
  int arraysConfig = 0;
47
  bool arraysConfigWasSetByUser = false;
48
  bool arraysEagerIndexSplitting = true;
49
  bool arraysEagerIndexSplittingWasSetByUser = false;
50
  bool arraysEagerLemmas = false;
51
  bool arraysEagerLemmasWasSetByUser = false;
52
  bool arraysExp = false;
53
  bool arraysExpWasSetByUser = false;
54
  bool arraysModelBased = false;
55
  bool arraysModelBasedWasSetByUser = false;
56
  bool arraysOptimizeLinear = true;
57
  bool arraysOptimizeLinearWasSetByUser = false;
58
  int arraysPropagate = 2;
59
  bool arraysPropagateWasSetByUser = false;
60
  bool arraysReduceSharing = false;
61
  bool arraysReduceSharingWasSetByUser = false;
62
  bool arraysWeakEquivalence = false;
63
  bool arraysWeakEquivalenceWasSetByUser = false;
64
// clang-format on
65
};
66
67
#undef DO_SEMANTIC_CHECKS_BY_DEFAULT
68
69
// clang-format off
70
extern struct arraysConfig__option_t
71
{
72
  typedef int type;
73
  type operator()() const;
74
} thread_local arraysConfig;
75
extern struct arraysEagerIndexSplitting__option_t
76
{
77
  typedef bool type;
78
  type operator()() const;
79
} thread_local arraysEagerIndexSplitting;
80
extern struct arraysEagerLemmas__option_t
81
{
82
  typedef bool type;
83
  type operator()() const;
84
} thread_local arraysEagerLemmas;
85
extern struct arraysExp__option_t
86
{
87
  typedef bool type;
88
  type operator()() const;
89
} thread_local arraysExp;
90
extern struct arraysModelBased__option_t
91
{
92
  typedef bool type;
93
  type operator()() const;
94
} thread_local arraysModelBased;
95
extern struct arraysOptimizeLinear__option_t
96
{
97
  typedef bool type;
98
  type operator()() const;
99
} thread_local arraysOptimizeLinear;
100
extern struct arraysPropagate__option_t
101
{
102
  typedef int type;
103
  type operator()() const;
104
} thread_local arraysPropagate;
105
extern struct arraysReduceSharing__option_t
106
{
107
  typedef bool type;
108
  type operator()() const;
109
} thread_local arraysReduceSharing;
110
extern struct arraysWeakEquivalence__option_t
111
{
112
  typedef bool type;
113
  type operator()() const;
114
} thread_local arraysWeakEquivalence;
115
// clang-format on
116
117
namespace arrays
118
{
119
// clang-format off
120
static constexpr const char* arraysConfig__name = "arrays-config";
121
static constexpr const char* arraysEagerIndexSplitting__name = "arrays-eager-index";
122
static constexpr const char* arraysEagerLemmas__name = "arrays-eager-lemmas";
123
static constexpr const char* arraysExp__name = "arrays-exp";
124
static constexpr const char* arraysModelBased__name = "arrays-model-based";
125
static constexpr const char* arraysOptimizeLinear__name = "arrays-optimize-linear";
126
static constexpr const char* arraysPropagate__name = "arrays-prop";
127
static constexpr const char* arraysReduceSharing__name = "arrays-reduce-sharing";
128
static constexpr const char* arraysWeakEquivalence__name = "arrays-weak-equiv";
129
// clang-format on
130
}
131
132
}  // namespace options
133
134
// clang-format off
135
136
// clang-format on
137
138
namespace options {
139
// clang-format off
140
inline int arraysConfig__option_t::operator()() const
141
{ return Options::current().arrays.arraysConfig; }
142
20254
inline bool arraysEagerIndexSplitting__option_t::operator()() const
143
20254
{ return Options::current().arrays.arraysEagerIndexSplitting; }
144
200766
inline bool arraysEagerLemmas__option_t::operator()() const
145
200766
{ return Options::current().arrays.arraysEagerLemmas; }
146
9839
inline bool arraysExp__option_t::operator()() const
147
9839
{ return Options::current().arrays.arraysExp; }
148
inline bool arraysModelBased__option_t::operator()() const
149
{ return Options::current().arrays.arraysModelBased; }
150
41576
inline bool arraysOptimizeLinear__option_t::operator()() const
151
41576
{ return Options::current().arrays.arraysOptimizeLinear; }
152
69193
inline int arraysPropagate__option_t::operator()() const
153
69193
{ return Options::current().arrays.arraysPropagate; }
154
1371
inline bool arraysReduceSharing__option_t::operator()() const
155
1371
{ return Options::current().arrays.arraysReduceSharing; }
156
121920
inline bool arraysWeakEquivalence__option_t::operator()() const
157
121920
{ return Options::current().arrays.arraysWeakEquivalence; }
158
// clang-format on
159
160
namespace arrays
161
{
162
// clang-format off
163
void setDefaultArraysConfig(Options& opts, int value);
164
void setDefaultArraysEagerIndexSplitting(Options& opts, bool value);
165
void setDefaultArraysEagerLemmas(Options& opts, bool value);
166
void setDefaultArraysExp(Options& opts, bool value);
167
void setDefaultArraysModelBased(Options& opts, bool value);
168
void setDefaultArraysOptimizeLinear(Options& opts, bool value);
169
void setDefaultArraysPropagate(Options& opts, int value);
170
void setDefaultArraysReduceSharing(Options& opts, bool value);
171
void setDefaultArraysWeakEquivalence(Options& opts, bool value);
172
// clang-format on
173
}
174
175
}  // namespace options
176
}  // namespace cvc5
177
178
#endif /* CVC5__OPTIONS__ARRAYS_H */