GCC Code Coverage Report
Directory: . Exec Total Coverage
File: build-coverage/src/options/printer_options.h Lines: 2 3 66.7 %
Date: 2021-09-15 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__PRINTER_H
22
#define CVC5__OPTIONS__PRINTER_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 ModelFormatMode
34
{
35
  DEFAULT, TABLE
36
};
37
static constexpr size_t ModelFormatMode__numValues = 2;
38
std::ostream& operator<<(std::ostream& os, ModelFormatMode mode);
39
ModelFormatMode stringToModelFormatMode(const std::string& optarg);
40
41
enum class PrintInstMode
42
{
43
  LIST, NUM
44
};
45
static constexpr size_t PrintInstMode__numValues = 2;
46
std::ostream& operator<<(std::ostream& os, PrintInstMode mode);
47
PrintInstMode stringToPrintInstMode(const std::string& optarg);
48
49
// clang-format on
50
51
#if defined(CVC5_MUZZLED) || defined(CVC5_COMPETITION_MODE)
52
#  define DO_SEMANTIC_CHECKS_BY_DEFAULT false
53
#else /* CVC5_MUZZLED || CVC5_COMPETITION_MODE */
54
#  define DO_SEMANTIC_CHECKS_BY_DEFAULT true
55
#endif /* CVC5_MUZZLED || CVC5_COMPETITION_MODE */
56
57
24139
struct HolderPRINTER
58
{
59
// clang-format off
60
bool flattenHOChains = false;
61
  bool flattenHOChainsWasSetByUser = false;
62
  ModelFormatMode modelFormatMode = ModelFormatMode::DEFAULT;
63
  bool modelFormatModeWasSetByUser = false;
64
  PrintInstMode printInstMode = PrintInstMode::LIST;
65
  bool printInstModeWasSetByUser = false;
66
  bool printInstFull = true;
67
  bool printInstFullWasSetByUser = false;
68
// clang-format on
69
};
70
71
#undef DO_SEMANTIC_CHECKS_BY_DEFAULT
72
73
// clang-format off
74
inline bool flattenHOChains() { return Options::current().printer.flattenHOChains; }
75
inline ModelFormatMode modelFormatMode() { return Options::current().printer.modelFormatMode; }
76
inline PrintInstMode printInstMode() { return Options::current().printer.printInstMode; }
77
2
inline bool printInstFull() { return Options::current().printer.printInstFull; }
78
// clang-format on
79
80
namespace printer
81
{
82
// clang-format off
83
static constexpr const char* flattenHOChains__name = "flatten-ho-chains";
84
static constexpr const char* modelFormatMode__name = "model-format";
85
static constexpr const char* printInstMode__name = "print-inst";
86
static constexpr const char* printInstFull__name = "print-inst-full";
87
88
void setDefaultFlattenHOChains(Options& opts, bool value);
89
void setDefaultModelFormatMode(Options& opts, ModelFormatMode value);
90
void setDefaultPrintInstMode(Options& opts, PrintInstMode value);
91
void setDefaultPrintInstFull(Options& opts, bool value);
92
// clang-format on
93
}
94
95
}  // namespace cvc5::options
96
97
#endif /* CVC5__OPTIONS__PRINTER_H */