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 |
|
* Option template for option modules. |
14 |
|
* |
15 |
|
* For each <module>_options.toml configuration file, mkoptions.py |
16 |
|
* expands this template and generates a <module>_options.cpp file. |
17 |
|
*/ |
18 |
|
#include "options/expr_options.h" |
19 |
|
|
20 |
|
#include <iostream> |
21 |
|
|
22 |
|
#include "base/check.h" |
23 |
|
#include "options/option_exception.h" |
24 |
|
|
25 |
|
// clang-format off |
26 |
|
namespace cvc5 { |
27 |
|
|
28 |
|
|
29 |
|
|
30 |
|
namespace options { |
31 |
|
|
32 |
|
thread_local struct defaultDagThresh__option_t defaultDagThresh; |
33 |
|
thread_local struct defaultExprDepth__option_t defaultExprDepth; |
34 |
|
thread_local struct typeChecking__option_t typeChecking; |
35 |
|
|
36 |
|
|
37 |
|
|
38 |
|
|
39 |
|
namespace expr |
40 |
|
{ |
41 |
|
// clang-format off |
42 |
|
void setDefaultDefaultDagThresh(Options& opts, int64_t value) |
43 |
|
{ |
44 |
|
if (!opts.expr.defaultDagThreshWasSetByUser) { |
45 |
|
opts.expr.defaultDagThresh = value; |
46 |
|
} |
47 |
|
} |
48 |
|
void setDefaultDefaultExprDepth(Options& opts, int64_t value) |
49 |
|
{ |
50 |
|
if (!opts.expr.defaultExprDepthWasSetByUser) { |
51 |
|
opts.expr.defaultExprDepth = value; |
52 |
|
} |
53 |
|
} |
54 |
|
void setDefaultTypeChecking(Options& opts, bool value) |
55 |
|
{ |
56 |
|
if (!opts.expr.typeCheckingWasSetByUser) { |
57 |
|
opts.expr.typeChecking = value; |
58 |
|
} |
59 |
|
} |
60 |
|
// clang-format on |
61 |
|
} |
62 |
|
|
63 |
|
} // namespace options |
64 |
29322 |
} // namespace cvc5 |
65 |
|
// clang-format on |