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__DECISION_H |
22 |
|
#define CVC5__OPTIONS__DECISION_H |
23 |
|
|
24 |
|
#include "options/options.h" |
25 |
|
|
26 |
|
// clang-format off |
27 |
|
#include "options/decision_weight.h" |
28 |
|
// clang-format on |
29 |
|
|
30 |
|
namespace cvc5::options { |
31 |
|
|
32 |
|
// clang-format off |
33 |
|
enum class DecisionMode |
34 |
|
{ |
35 |
|
STOPONLY_OLD, JUSTIFICATION, STOPONLY, INTERNAL, JUSTIFICATION_OLD, |
36 |
|
__MAX_VALUE = JUSTIFICATION_OLD |
37 |
|
}; |
38 |
|
std::ostream& operator<<(std::ostream& os, DecisionMode mode); |
39 |
|
DecisionMode stringToDecisionMode(const std::string& optarg); |
40 |
|
|
41 |
|
enum class DecisionWeightInternal |
42 |
|
{ |
43 |
|
SUM, OFF, USR1, MAX, |
44 |
|
__MAX_VALUE = MAX |
45 |
|
}; |
46 |
|
std::ostream& operator<<(std::ostream& os, DecisionWeightInternal mode); |
47 |
|
DecisionWeightInternal stringToDecisionWeightInternal(const std::string& optarg); |
48 |
|
|
49 |
|
enum class JutificationSkolemMode |
50 |
|
{ |
51 |
|
LAST, FIRST, |
52 |
|
__MAX_VALUE = FIRST |
53 |
|
}; |
54 |
|
std::ostream& operator<<(std::ostream& os, JutificationSkolemMode mode); |
55 |
|
JutificationSkolemMode stringToJutificationSkolemMode(const std::string& optarg); |
56 |
|
|
57 |
|
enum class JutificationSkolemRlvMode |
58 |
|
{ |
59 |
|
ASSERT, ALWAYS, |
60 |
|
__MAX_VALUE = ALWAYS |
61 |
|
}; |
62 |
|
std::ostream& operator<<(std::ostream& os, JutificationSkolemRlvMode mode); |
63 |
|
JutificationSkolemRlvMode stringToJutificationSkolemRlvMode(const std::string& optarg); |
64 |
|
|
65 |
|
// clang-format on |
66 |
|
|
67 |
|
#if defined(CVC5_MUZZLED) || defined(CVC5_COMPETITION_MODE) |
68 |
|
# define DO_SEMANTIC_CHECKS_BY_DEFAULT false |
69 |
|
#else /* CVC5_MUZZLED || CVC5_COMPETITION_MODE */ |
70 |
|
# define DO_SEMANTIC_CHECKS_BY_DEFAULT true |
71 |
|
#endif /* CVC5_MUZZLED || CVC5_COMPETITION_MODE */ |
72 |
|
|
73 |
30747 |
struct HolderDECISION |
74 |
|
{ |
75 |
|
// clang-format off |
76 |
|
DecisionMode decisionMode = DecisionMode::INTERNAL; |
77 |
|
bool decisionModeWasSetByUser = false; |
78 |
|
int64_t decisionRandomWeight = 0; |
79 |
|
bool decisionRandomWeightWasSetByUser = false; |
80 |
|
cvc5::decision::DecisionWeight decisionThreshold = 0; |
81 |
|
bool decisionThresholdWasSetByUser = false; |
82 |
|
bool decisionUseWeight = false; |
83 |
|
bool decisionUseWeightWasSetByUser = false; |
84 |
|
DecisionWeightInternal decisionWeightInternal = DecisionWeightInternal::OFF; |
85 |
|
bool decisionWeightInternalWasSetByUser = false; |
86 |
|
bool jhRlvOrder = false; |
87 |
|
bool jhRlvOrderWasSetByUser = false; |
88 |
|
JutificationSkolemMode jhSkolemMode = JutificationSkolemMode::FIRST; |
89 |
|
bool jhSkolemModeWasSetByUser = false; |
90 |
|
JutificationSkolemRlvMode jhSkolemRlvMode = JutificationSkolemRlvMode::ASSERT; |
91 |
|
bool jhSkolemRlvModeWasSetByUser = false; |
92 |
|
// clang-format on |
93 |
|
}; |
94 |
|
|
95 |
|
#undef DO_SEMANTIC_CHECKS_BY_DEFAULT |
96 |
|
|
97 |
|
// clang-format off |
98 |
15339 |
inline DecisionMode decisionMode() { return Options::current().decision.decisionMode; } |
99 |
|
inline int64_t decisionRandomWeight() { return Options::current().decision.decisionRandomWeight; } |
100 |
|
inline cvc5::decision::DecisionWeight decisionThreshold() { return Options::current().decision.decisionThreshold; } |
101 |
|
inline bool decisionUseWeight() { return Options::current().decision.decisionUseWeight; } |
102 |
|
inline DecisionWeightInternal decisionWeightInternal() { return Options::current().decision.decisionWeightInternal; } |
103 |
|
inline bool jhRlvOrder() { return Options::current().decision.jhRlvOrder; } |
104 |
|
inline JutificationSkolemMode jhSkolemMode() { return Options::current().decision.jhSkolemMode; } |
105 |
|
inline JutificationSkolemRlvMode jhSkolemRlvMode() { return Options::current().decision.jhSkolemRlvMode; } |
106 |
|
// clang-format on |
107 |
|
|
108 |
|
} // namespace cvc5::options |
109 |
|
|
110 |
|
#endif /* CVC5__OPTIONS__DECISION_H */ |