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