GCC Code Coverage Report
Directory: . Exec Total Coverage
File: build-coverage/src/options/expr_options.h Lines: 7 7 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__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
27390
struct HolderEXPR
44
{
45
// clang-format off
46
  int defaultDagThresh = 1;
47
  bool defaultDagThreshWasSetByUser = false;
48
  int defaultExprDepth = 0;
49
  bool defaultExprDepthWasSetByUser = false;
50
  bool typeChecking = DO_SEMANTIC_CHECKS_BY_DEFAULT;
51
  bool typeCheckingWasSetByUser = 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
88
// clang-format on
89
90
namespace options {
91
// clang-format off
92
10117
inline int defaultDagThresh__option_t::operator()() const
93
10117
{ return Options::current().expr.defaultDagThresh; }
94
52510
inline int defaultExprDepth__option_t::operator()() const
95
52510
{ return Options::current().expr.defaultExprDepth; }
96
97684
inline bool typeChecking__option_t::operator()() const
97
97684
{ return Options::current().expr.typeChecking; }
98
// clang-format on
99
100
namespace expr
101
{
102
// clang-format off
103
void setDefaultDefaultDagThresh(Options& opts, int value);
104
void setDefaultDefaultExprDepth(Options& opts, int value);
105
void setDefaultTypeChecking(Options& opts, bool value);
106
// clang-format on
107
}
108
109
}  // namespace options
110
}  // namespace cvc5
111
112
#endif /* CVC5__OPTIONS__EXPR_H */