GCC Code Coverage Report
Directory: . Exec Total Coverage
File: build-coverage/src/options/expr_options.h Lines: 7 7 100.0 %
Date: 2021-05-22 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__EXPR_H
22
#define CVC5__OPTIONS__EXPR_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
25268
struct HolderEXPR
44
{
45
// clang-format off
46
  int defaultDagThresh = 1;\
47
  bool defaultDagThresh__setByUser__ = false;
48
  int defaultExprDepth = 0;\
49
  bool defaultExprDepth__setByUser__ = false;
50
  bool typeChecking = DO_SEMANTIC_CHECKS_BY_DEFAULT;\
51
  bool typeChecking__setByUser__ = false;
52
// clang-format on
53
};
54
55
#undef DO_SEMANTIC_CHECKS_BY_DEFAULT
56
57
// clang-format off
58
extern struct defaultDagThresh__option_t
59
{
60
  typedef int type;
61
  type operator()() const;
62
} thread_local defaultDagThresh;
63
extern struct defaultExprDepth__option_t
64
{
65
  typedef int type;
66
  type operator()() const;
67
} thread_local defaultExprDepth;
68
extern struct typeChecking__option_t
69
{
70
  typedef bool type;
71
  type operator()() const;
72
} thread_local typeChecking;
73
// clang-format on
74
75
namespace expr
76
{
77
// clang-format off
78
static constexpr const char* defaultDagThresh__name = "dag-thresh";
79
static constexpr const char* defaultExprDepth__name = "expr-depth";
80
static constexpr const char* typeChecking__name = "type-checking";
81
// clang-format on
82
}
83
84
}  // namespace options
85
86
// clang-format off
87
template <> options::defaultDagThresh__option_t::type& Options::ref(
88
    options::defaultDagThresh__option_t);
89
template <> const options::defaultDagThresh__option_t::type& Options::operator[](
90
    options::defaultDagThresh__option_t) const;
91
template <> bool Options::wasSetByUser(options::defaultDagThresh__option_t) const;
92
template <> options::defaultExprDepth__option_t::type& Options::ref(
93
    options::defaultExprDepth__option_t);
94
template <> const options::defaultExprDepth__option_t::type& Options::operator[](
95
    options::defaultExprDepth__option_t) const;
96
template <> bool Options::wasSetByUser(options::defaultExprDepth__option_t) const;
97
template <> options::typeChecking__option_t::type& Options::ref(
98
    options::typeChecking__option_t);
99
template <> const options::typeChecking__option_t::type& Options::operator[](
100
    options::typeChecking__option_t) const;
101
template <> bool Options::wasSetByUser(options::typeChecking__option_t) const;
102
// clang-format on
103
104
namespace options {
105
// clang-format off
106
11281
inline defaultDagThresh__option_t::type defaultDagThresh__option_t::operator()() const
107
{
108
11281
  return Options::current()[*this];
109
}
110
53936
inline defaultExprDepth__option_t::type defaultExprDepth__option_t::operator()() const
111
{
112
53936
  return Options::current()[*this];
113
}
114
96165
inline typeChecking__option_t::type typeChecking__option_t::operator()() const
115
{
116
96165
  return Options::current()[*this];
117
}
118
// clang-format on
119
120
}  // namespace options
121
}  // namespace cvc5
122
123
#endif /* CVC5__OPTIONS__EXPR_H */