GCC Code Coverage Report
Directory: . Exec Total Coverage
File: build-coverage/src/options/theory_options.h Lines: 7 7 100.0 %
Date: 2021-08-20 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__THEORY_H
22
#define CVC5__OPTIONS__THEORY_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
enum class EqEngineMode
35
{
36
  CENTRAL,
37
  DISTRIBUTED
38
};
39
40
static constexpr size_t EqEngineMode__numValues = 2;
41
42
std::ostream& operator<<(std::ostream& os, EqEngineMode mode);
43
EqEngineMode stringToEqEngineMode(const std::string& optarg);
44
45
enum class TcMode
46
{
47
  CARE_GRAPH
48
};
49
50
static constexpr size_t TcMode__numValues = 1;
51
52
std::ostream& operator<<(std::ostream& os, TcMode mode);
53
TcMode stringToTcMode(const std::string& optarg);
54
55
enum class TheoryOfMode
56
{
57
  THEORY_OF_TYPE_BASED,
58
  THEORY_OF_TERM_BASED
59
};
60
61
static constexpr size_t TheoryOfMode__numValues = 2;
62
63
std::ostream& operator<<(std::ostream& os, TheoryOfMode mode);
64
TheoryOfMode stringToTheoryOfMode(const std::string& optarg);
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
27444
struct HolderTHEORY
74
{
75
// clang-format off
76
  bool assignFunctionValues = true;
77
  bool assignFunctionValuesWasSetByUser = false;
78
  bool condenseFunctionValues = true;
79
  bool condenseFunctionValuesWasSetByUser = false;
80
  EqEngineMode eeMode = EqEngineMode::DISTRIBUTED;
81
  bool eeModeWasSetByUser = false;
82
  bool relevanceFilter = false;
83
  bool relevanceFilterWasSetByUser = false;
84
  TcMode tcMode = TcMode::CARE_GRAPH;
85
  bool tcModeWasSetByUser = false;
86
  TheoryOfMode theoryOfMode = TheoryOfMode::THEORY_OF_TYPE_BASED;
87
  bool theoryOfModeWasSetByUser = false;
88
// clang-format on
89
};
90
91
#undef DO_SEMANTIC_CHECKS_BY_DEFAULT
92
93
// clang-format off
94
26343
inline bool assignFunctionValues() { return Options::current().theory.assignFunctionValues; }
95
4609
inline bool condenseFunctionValues() { return Options::current().theory.condenseFunctionValues; }
96
17384762
inline EqEngineMode eeMode() { return Options::current().theory.eeMode; }
97
9856
inline bool relevanceFilter() { return Options::current().theory.relevanceFilter; }
98
9856
inline TcMode tcMode() { return Options::current().theory.tcMode; }
99
174262230
inline TheoryOfMode theoryOfMode() { return Options::current().theory.theoryOfMode; }
100
// clang-format on
101
102
namespace theory
103
{
104
// clang-format off
105
static constexpr const char* assignFunctionValues__name = "assign-function-values";
106
static constexpr const char* condenseFunctionValues__name = "condense-function-values";
107
static constexpr const char* eeMode__name = "ee-mode";
108
static constexpr const char* relevanceFilter__name = "relevance-filter";
109
static constexpr const char* tcMode__name = "tc-mode";
110
static constexpr const char* theoryOfMode__name = "theoryof-mode";
111
112
void setDefaultAssignFunctionValues(Options& opts, bool value);void setDefaultCondenseFunctionValues(Options& opts, bool value);void setDefaultEeMode(Options& opts, EqEngineMode value);void setDefaultRelevanceFilter(Options& opts, bool value);void setDefaultTcMode(Options& opts, TcMode value);void setDefaultTheoryOfMode(Options& opts, TheoryOfMode value);
113
// clang-format on
114
}
115
116
}  // namespace cvc5::options
117
118
#endif /* CVC5__OPTIONS__THEORY_H */