GCC Code Coverage Report
Directory: . Exec Total Coverage
File: build-coverage/src/options/parser_options.cpp Lines: 1 25 4.0 %
Date: 2021-08-06 Branches: 2 16 12.5 %

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
 * Option template for option modules.
14
 *
15
 * For each <module>_options.toml configuration file, mkoptions.py
16
 * expands this template and generates a <module>_options.cpp file.
17
 */
18
#include "options/parser_options.h"
19
20
#include <iostream>
21
22
#include "base/check.h"
23
#include "options/option_exception.h"
24
25
// clang-format off
26
namespace cvc5 {
27
28
29
30
namespace options {
31
32
thread_local struct filesystemAccess__option_t filesystemAccess;
33
thread_local struct forceLogicString__option_t forceLogicString;
34
thread_local struct globalDeclarations__option_t globalDeclarations;
35
thread_local struct memoryMap__option_t memoryMap;
36
thread_local struct semanticChecks__option_t semanticChecks;
37
thread_local struct strictParsing__option_t strictParsing;
38
39
40
41
42
namespace parser
43
{
44
// clang-format off
45
void setDefaultFilesystemAccess(Options& opts, bool value)
46
{
47
    if (!opts.parser.filesystemAccessWasSetByUser) {
48
        opts.parser.filesystemAccess = value;
49
    }
50
}
51
void setDefaultForceLogicString(Options& opts, std::string value)
52
{
53
    if (!opts.parser.forceLogicStringWasSetByUser) {
54
        opts.parser.forceLogicString = value;
55
    }
56
}
57
void setDefaultGlobalDeclarations(Options& opts, bool value)
58
{
59
    if (!opts.parser.globalDeclarationsWasSetByUser) {
60
        opts.parser.globalDeclarations = value;
61
    }
62
}
63
void setDefaultMemoryMap(Options& opts, bool value)
64
{
65
    if (!opts.parser.memoryMapWasSetByUser) {
66
        opts.parser.memoryMap = value;
67
    }
68
}
69
void setDefaultSemanticChecks(Options& opts, bool value)
70
{
71
    if (!opts.parser.semanticChecksWasSetByUser) {
72
        opts.parser.semanticChecks = value;
73
    }
74
}
75
void setDefaultStrictParsing(Options& opts, bool value)
76
{
77
    if (!opts.parser.strictParsingWasSetByUser) {
78
        opts.parser.strictParsing = value;
79
    }
80
}
81
// clang-format on
82
}
83
84
}  // namespace options
85
29322
}  // namespace cvc5
86
// clang-format on