GCC Code Coverage Report
Directory: . Exec Total Coverage
File: build-coverage/src/options/proof_options.h Lines: 6 6 100.0 %
Date: 2021-09-10 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::options {
31
32
// clang-format off
33
34
enum class ProofCheckMode
35
{
36
  EAGER,
37
  LAZY,
38
  EAGER_SIMPLE,
39
  NONE
40
};
41
42
static constexpr size_t ProofCheckMode__numValues = 4;
43
44
std::ostream& operator<<(std::ostream& os, ProofCheckMode mode);
45
ProofCheckMode stringToProofCheckMode(const std::string& optarg);
46
47
enum class ProofFormatMode
48
{
49
  VERIT,
50
  NONE,
51
  TPTP,
52
  DOT
53
};
54
55
static constexpr size_t ProofFormatMode__numValues = 4;
56
57
std::ostream& operator<<(std::ostream& os, ProofFormatMode mode);
58
ProofFormatMode stringToProofFormatMode(const std::string& optarg);
59
60
enum class ProofGranularityMode
61
{
62
  THEORY_REWRITE,
63
  REWRITE,
64
  DSL_REWRITE,
65
  OFF
66
};
67
68
static constexpr size_t ProofGranularityMode__numValues = 4;
69
70
std::ostream& operator<<(std::ostream& os, ProofGranularityMode mode);
71
ProofGranularityMode stringToProofGranularityMode(const std::string& optarg);
72
// clang-format on
73
74
#if defined(CVC5_MUZZLED) || defined(CVC5_COMPETITION_MODE)
75
#  define DO_SEMANTIC_CHECKS_BY_DEFAULT false
76
#else /* CVC5_MUZZLED || CVC5_COMPETITION_MODE */
77
#  define DO_SEMANTIC_CHECKS_BY_DEFAULT true
78
#endif /* CVC5_MUZZLED || CVC5_COMPETITION_MODE */
79
80
24059
struct HolderPROOF
81
{
82
// clang-format off
83
  ProofCheckMode proofCheck = ProofCheckMode::LAZY;
84
  bool proofCheckWasSetByUser = false;
85
  ProofFormatMode proofFormatMode = ProofFormatMode::NONE;
86
  bool proofFormatModeWasSetByUser = false;
87
  ProofGranularityMode proofGranularityMode = ProofGranularityMode::THEORY_REWRITE;
88
  bool proofGranularityModeWasSetByUser = false;
89
  uint64_t proofPedantic = 0;
90
  bool proofPedanticWasSetByUser = false;
91
  bool proofPpMerge = true;
92
  bool proofPpMergeWasSetByUser = false;
93
  bool proofPrintConclusion = false;
94
  bool proofPrintConclusionWasSetByUser = false;
95
// clang-format on
96
};
97
98
#undef DO_SEMANTIC_CHECKS_BY_DEFAULT
99
100
// clang-format off
101
26080973
inline ProofCheckMode proofCheck() { return Options::current().proof.proofCheck; }
102
3795
inline ProofFormatMode proofFormatMode() { return Options::current().proof.proofFormatMode; }
103
6151
inline ProofGranularityMode proofGranularityMode() { return Options::current().proof.proofGranularityMode; }
104
inline uint64_t proofPedantic() { return Options::current().proof.proofPedantic; }
105
3781
inline bool proofPpMerge() { return Options::current().proof.proofPpMerge; }
106
272776
inline bool proofPrintConclusion() { return Options::current().proof.proofPrintConclusion; }
107
// clang-format on
108
109
namespace proof
110
{
111
// clang-format off
112
static constexpr const char* proofCheck__name = "proof-check";
113
static constexpr const char* proofFormatMode__name = "proof-format-mode";
114
static constexpr const char* proofGranularityMode__name = "proof-granularity";
115
static constexpr const char* proofPedantic__name = "proof-pedantic";
116
static constexpr const char* proofPpMerge__name = "proof-pp-merge";
117
static constexpr const char* proofPrintConclusion__name = "proof-print-conclusion";
118
119
void setDefaultProofCheck(Options& opts, ProofCheckMode value);void setDefaultProofFormatMode(Options& opts, ProofFormatMode value);void setDefaultProofGranularityMode(Options& opts, ProofGranularityMode value);void setDefaultProofPedantic(Options& opts, uint64_t value);void setDefaultProofPpMerge(Options& opts, bool value);void setDefaultProofPrintConclusion(Options& opts, bool value);
120
// clang-format on
121
}
122
123
}  // namespace cvc5::options
124
125
#endif /* CVC5__OPTIONS__PROOF_H */