GCC Code Coverage Report
Directory: . Exec Total Coverage
File: build-coverage/src/options/parser_options.h Lines: 1 1 100.0 %
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__PARSER_H
22
#define CVC5__OPTIONS__PARSER_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
// clang-format on
35
36
#if defined(CVC5_MUZZLED) || defined(CVC5_COMPETITION_MODE)
37
#  define DO_SEMANTIC_CHECKS_BY_DEFAULT false
38
#else /* CVC5_MUZZLED || CVC5_COMPETITION_MODE */
39
#  define DO_SEMANTIC_CHECKS_BY_DEFAULT true
40
#endif /* CVC5_MUZZLED || CVC5_COMPETITION_MODE */
41
42
62772
struct HolderPARSER
43
{
44
// clang-format off
45
bool filesystemAccess = true;
46
  bool filesystemAccessWasSetByUser = false;
47
  std::string forceLogicString;
48
  bool forceLogicStringWasSetByUser = false;
49
  bool globalDeclarations = false;
50
  bool globalDeclarationsWasSetByUser = false;
51
  bool memoryMap;
52
  bool memoryMapWasSetByUser = false;
53
  bool semanticChecks = DO_SEMANTIC_CHECKS_BY_DEFAULT;
54
  bool semanticChecksWasSetByUser = false;
55
  bool strictParsing;
56
  bool strictParsingWasSetByUser = false;
57
// clang-format on
58
};
59
60
#undef DO_SEMANTIC_CHECKS_BY_DEFAULT
61
62
// clang-format off
63
inline bool filesystemAccess() { return Options::current().parser.filesystemAccess; }
64
inline std::string forceLogicString() { return Options::current().parser.forceLogicString; }
65
inline bool globalDeclarations() { return Options::current().parser.globalDeclarations; }
66
inline bool memoryMap() { return Options::current().parser.memoryMap; }
67
inline bool semanticChecks() { return Options::current().parser.semanticChecks; }
68
inline bool strictParsing() { return Options::current().parser.strictParsing; }
69
// clang-format on
70
71
namespace parser
72
{
73
// clang-format off
74
static constexpr const char* filesystemAccess__name = "filesystem-access";
75
static constexpr const char* forceLogicString__name = "force-logic";
76
static constexpr const char* globalDeclarations__name = "global-declarations";
77
static constexpr const char* memoryMap__name = "mmap";
78
static constexpr const char* semanticChecks__name = "semantic-checks";
79
static constexpr const char* strictParsing__name = "strict-parsing";
80
81
void setDefaultFilesystemAccess(Options& opts, bool value);
82
void setDefaultForceLogicString(Options& opts, std::string value);
83
void setDefaultGlobalDeclarations(Options& opts, bool value);
84
void setDefaultMemoryMap(Options& opts, bool value);
85
void setDefaultSemanticChecks(Options& opts, bool value);
86
void setDefaultStrictParsing(Options& opts, bool value);
87
// clang-format on
88
}
89
90
}  // namespace cvc5::options
91
92
#endif /* CVC5__OPTIONS__PARSER_H */