GCC Code Coverage Report
Directory: . Exec Total Coverage
File: build-coverage/src/options/proof_options.h Lines: 6 6 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__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
enum class ProofCheckMode
34
{
35
  EAGER, EAGER_SIMPLE, NONE, LAZY
36
};
37
static constexpr size_t ProofCheckMode__numValues = 4;
38
std::ostream& operator<<(std::ostream& os, ProofCheckMode mode);
39
ProofCheckMode stringToProofCheckMode(const std::string& optarg);
40
41
enum class ProofFormatMode
42
{
43
  TPTP, ALETHE, NONE, DOT
44
};
45
static constexpr size_t ProofFormatMode__numValues = 4;
46
std::ostream& operator<<(std::ostream& os, ProofFormatMode mode);
47
ProofFormatMode stringToProofFormatMode(const std::string& optarg);
48
49
enum class ProofGranularityMode
50
{
51
  REWRITE, OFF, DSL_REWRITE, THEORY_REWRITE
52
};
53
static constexpr size_t ProofGranularityMode__numValues = 4;
54
std::ostream& operator<<(std::ostream& os, ProofGranularityMode mode);
55
ProofGranularityMode stringToProofGranularityMode(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 HolderPROOF
66
{
67
// clang-format off
68
ProofCheckMode proofCheck = ProofCheckMode::LAZY;
69
  bool proofCheckWasSetByUser = false;
70
  ProofFormatMode proofFormatMode = ProofFormatMode::NONE;
71
  bool proofFormatModeWasSetByUser = false;
72
  ProofGranularityMode proofGranularityMode = ProofGranularityMode::THEORY_REWRITE;
73
  bool proofGranularityModeWasSetByUser = false;
74
  uint64_t proofPedantic = 0;
75
  bool proofPedanticWasSetByUser = false;
76
  bool proofPpMerge = true;
77
  bool proofPpMergeWasSetByUser = false;
78
  bool proofPrintConclusion = false;
79
  bool proofPrintConclusionWasSetByUser = false;
80
// clang-format on
81
};
82
83
#undef DO_SEMANTIC_CHECKS_BY_DEFAULT
84
85
// clang-format off
86
346848
inline ProofCheckMode proofCheck() { return Options::current().proof.proofCheck; }
87
162
inline ProofFormatMode proofFormatMode() { return Options::current().proof.proofFormatMode; }
88
165
inline ProofGranularityMode proofGranularityMode() { return Options::current().proof.proofGranularityMode; }
89
inline uint64_t proofPedantic() { return Options::current().proof.proofPedantic; }
90
143
inline bool proofPpMerge() { return Options::current().proof.proofPpMerge; }
91
27747
inline bool proofPrintConclusion() { return Options::current().proof.proofPrintConclusion; }
92
// clang-format on
93
94
namespace proof
95
{
96
// clang-format off
97
static constexpr const char* proofCheck__name = "proof-check";
98
static constexpr const char* proofFormatMode__name = "proof-format-mode";
99
static constexpr const char* proofGranularityMode__name = "proof-granularity";
100
static constexpr const char* proofPedantic__name = "proof-pedantic";
101
static constexpr const char* proofPpMerge__name = "proof-pp-merge";
102
static constexpr const char* proofPrintConclusion__name = "proof-print-conclusion";
103
104
void setDefaultProofCheck(Options& opts, ProofCheckMode value);
105
void setDefaultProofFormatMode(Options& opts, ProofFormatMode value);
106
void setDefaultProofGranularityMode(Options& opts, ProofGranularityMode value);
107
void setDefaultProofPedantic(Options& opts, uint64_t value);
108
void setDefaultProofPpMerge(Options& opts, bool value);
109
void setDefaultProofPrintConclusion(Options& opts, bool value);
110
// clang-format on
111
}
112
113
}  // namespace cvc5::options
114
115
#endif /* CVC5__OPTIONS__PROOF_H */