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