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::options { |
31 |
|
|
32 |
|
// clang-format off |
33 |
|
|
34 |
|
// clang-format on |
35 |
|
|
36 |
|
#if defined(CVC5_MUZZLED) || defined(CVC5_COMPETITION_MODE) |
37 |
|
# define DO_SEMANTIC_CHECKS_BY_DEFAULT false |
38 |
|
#else /* CVC5_MUZZLED || CVC5_COMPETITION_MODE */ |
39 |
|
# define DO_SEMANTIC_CHECKS_BY_DEFAULT true |
40 |
|
#endif /* CVC5_MUZZLED || CVC5_COMPETITION_MODE */ |
41 |
|
|
42 |
27412 |
struct HolderEXPR |
43 |
|
{ |
44 |
|
// clang-format off |
45 |
|
int64_t defaultDagThresh = 1; |
46 |
|
bool defaultDagThreshWasSetByUser = false; |
47 |
|
int64_t defaultExprDepth = 0; |
48 |
|
bool defaultExprDepthWasSetByUser = false; |
49 |
|
bool typeChecking = DO_SEMANTIC_CHECKS_BY_DEFAULT; |
50 |
|
bool typeCheckingWasSetByUser = false; |
51 |
|
// clang-format on |
52 |
|
}; |
53 |
|
|
54 |
|
#undef DO_SEMANTIC_CHECKS_BY_DEFAULT |
55 |
|
|
56 |
|
// clang-format off |
57 |
10110 |
inline int64_t defaultDagThresh() { return Options::current().expr.defaultDagThresh; } |
58 |
52569 |
inline int64_t defaultExprDepth() { return Options::current().expr.defaultExprDepth; } |
59 |
97228 |
inline bool typeChecking() { return Options::current().expr.typeChecking; } |
60 |
|
// clang-format on |
61 |
|
|
62 |
|
namespace expr |
63 |
|
{ |
64 |
|
// clang-format off |
65 |
|
static constexpr const char* defaultDagThresh__name = "dag-thresh"; |
66 |
|
static constexpr const char* defaultExprDepth__name = "expr-depth"; |
67 |
|
static constexpr const char* typeChecking__name = "type-checking"; |
68 |
|
|
69 |
|
void setDefaultDefaultDagThresh(Options& opts, int64_t value);void setDefaultDefaultExprDepth(Options& opts, int64_t value);void setDefaultTypeChecking(Options& opts, bool value); |
70 |
|
// clang-format on |
71 |
|
} |
72 |
|
|
73 |
|
} // namespace cvc5::options |
74 |
|
|
75 |
|
#endif /* CVC5__OPTIONS__EXPR_H */ |