GCC Code Coverage Report
Directory: . Exec Total Coverage
File: build-coverage/src/options/proof_options.h Lines: 11 11 100.0 %
Date: 2021-08-06 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__PROOF_H
22
#define CVC5__OPTIONS__PROOF_H
23
24
#include "options/options.h"
25
26
// clang-format off
27
28
// clang-format on
29
30
namespace cvc5 {
31
namespace options {
32
33
// clang-format off
34
35
enum class ProofFormatMode
36
{
37
  DOT,
38
  NONE,
39
  VERIT
40
};
41
42
static constexpr size_t ProofFormatMode__numValues = 3;
43
44
std::ostream& operator<<(std::ostream& os, ProofFormatMode mode);
45
ProofFormatMode stringToProofFormatMode(const std::string& optarg);
46
enum class ProofGranularityMode
47
{
48
  THEORY_REWRITE,
49
  OFF,
50
  DSL_REWRITE,
51
  REWRITE
52
};
53
54
static constexpr size_t ProofGranularityMode__numValues = 4;
55
56
std::ostream& operator<<(std::ostream& os, ProofGranularityMode mode);
57
ProofGranularityMode stringToProofGranularityMode(const std::string& optarg);
58
// clang-format on
59
60
#if defined(CVC5_MUZZLED) || defined(CVC5_COMPETITION_MODE)
61
#  define DO_SEMANTIC_CHECKS_BY_DEFAULT false
62
#else /* CVC5_MUZZLED || CVC5_COMPETITION_MODE */
63
#  define DO_SEMANTIC_CHECKS_BY_DEFAULT true
64
#endif /* CVC5_MUZZLED || CVC5_COMPETITION_MODE */
65
66
27401
struct HolderPROOF
67
{
68
// clang-format off
69
  bool proofEagerChecking = false;
70
  bool proofEagerCheckingWasSetByUser = false;
71
  ProofFormatMode proofFormatMode = ProofFormatMode::NONE;
72
  bool proofFormatModeWasSetByUser = false;
73
  ProofGranularityMode proofGranularityMode = ProofGranularityMode::THEORY_REWRITE;
74
  bool proofGranularityModeWasSetByUser = false;
75
  uint64_t proofPedantic = 0;
76
  bool proofPedanticWasSetByUser = false;
77
  bool proofPrintConclusion = false;
78
  bool proofPrintConclusionWasSetByUser = false;
79
// clang-format on
80
};
81
82
#undef DO_SEMANTIC_CHECKS_BY_DEFAULT
83
84
// clang-format off
85
extern struct proofEagerChecking__option_t
86
{
87
  typedef bool type;
88
  type operator()() const;
89
} thread_local proofEagerChecking;
90
extern struct proofFormatMode__option_t
91
{
92
  typedef ProofFormatMode type;
93
  type operator()() const;
94
} thread_local proofFormatMode;
95
extern struct proofGranularityMode__option_t
96
{
97
  typedef ProofGranularityMode type;
98
  type operator()() const;
99
} thread_local proofGranularityMode;
100
extern struct proofPedantic__option_t
101
{
102
  typedef uint64_t type;
103
  type operator()() const;
104
} thread_local proofPedantic;
105
extern struct proofPrintConclusion__option_t
106
{
107
  typedef bool type;
108
  type operator()() const;
109
} thread_local proofPrintConclusion;
110
// clang-format on
111
112
namespace proof
113
{
114
// clang-format off
115
static constexpr const char* proofEagerChecking__name = "proof-eager-checking";
116
static constexpr const char* proofFormatMode__name = "proof-format-mode";
117
static constexpr const char* proofGranularityMode__name = "proof-granularity";
118
static constexpr const char* proofPedantic__name = "proof-pedantic";
119
static constexpr const char* proofPrintConclusion__name = "proof-print-conclusion";
120
// clang-format on
121
}
122
123
}  // namespace options
124
125
// clang-format off
126
127
// clang-format on
128
129
namespace options {
130
// clang-format off
131
14406554
inline bool proofEagerChecking__option_t::operator()() const
132
14406554
{ return Options::current().proof.proofEagerChecking; }
133
3777
inline ProofFormatMode proofFormatMode__option_t::operator()() const
134
3777
{ return Options::current().proof.proofFormatMode; }
135
6122
inline ProofGranularityMode proofGranularityMode__option_t::operator()() const
136
6122
{ return Options::current().proof.proofGranularityMode; }
137
3768
inline uint64_t proofPedantic__option_t::operator()() const
138
3768
{ return Options::current().proof.proofPedantic; }
139
241849
inline bool proofPrintConclusion__option_t::operator()() const
140
241849
{ return Options::current().proof.proofPrintConclusion; }
141
// clang-format on
142
143
namespace proof
144
{
145
// clang-format off
146
void setDefaultProofEagerChecking(Options& opts, bool value);
147
void setDefaultProofFormatMode(Options& opts, ProofFormatMode value);
148
void setDefaultProofGranularityMode(Options& opts, ProofGranularityMode value);
149
void setDefaultProofPedantic(Options& opts, uint64_t value);
150
void setDefaultProofPrintConclusion(Options& opts, bool value);
151
// clang-format on
152
}
153
154
}  // namespace options
155
}  // namespace cvc5
156
157
#endif /* CVC5__OPTIONS__PROOF_H */