GCC Code Coverage Report
Directory: . Exec Total Coverage
File: build-coverage/src/options/main_options.cpp Lines: 1 57 1.8 %
Date: 2021-08-06 Branches: 2 32 6.3 %

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/main_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 dumpInstantiations__option_t dumpInstantiations;
33
thread_local struct dumpInstantiationsDebug__option_t dumpInstantiationsDebug;
34
thread_local struct dumpModels__option_t dumpModels;
35
thread_local struct dumpProofs__option_t dumpProofs;
36
thread_local struct dumpUnsatCores__option_t dumpUnsatCores;
37
thread_local struct dumpUnsatCoresFull__option_t dumpUnsatCoresFull;
38
thread_local struct earlyExit__option_t earlyExit;
39
thread_local struct forceNoLimitCpuWhileDump__option_t forceNoLimitCpuWhileDump;
40
thread_local struct help__option_t help;
41
thread_local struct interactive__option_t interactive;
42
thread_local struct interactivePrompt__option_t interactivePrompt;
43
thread_local struct seed__option_t seed;
44
thread_local struct segvSpin__option_t segvSpin;
45
thread_local struct version__option_t version;
46
47
48
49
50
namespace driver
51
{
52
// clang-format off
53
void setDefaultDumpInstantiations(Options& opts, bool value)
54
{
55
    if (!opts.driver.dumpInstantiationsWasSetByUser) {
56
        opts.driver.dumpInstantiations = value;
57
    }
58
}
59
void setDefaultDumpInstantiationsDebug(Options& opts, bool value)
60
{
61
    if (!opts.driver.dumpInstantiationsDebugWasSetByUser) {
62
        opts.driver.dumpInstantiationsDebug = value;
63
    }
64
}
65
void setDefaultDumpModels(Options& opts, bool value)
66
{
67
    if (!opts.driver.dumpModelsWasSetByUser) {
68
        opts.driver.dumpModels = value;
69
    }
70
}
71
void setDefaultDumpProofs(Options& opts, bool value)
72
{
73
    if (!opts.driver.dumpProofsWasSetByUser) {
74
        opts.driver.dumpProofs = value;
75
    }
76
}
77
void setDefaultDumpUnsatCores(Options& opts, bool value)
78
{
79
    if (!opts.driver.dumpUnsatCoresWasSetByUser) {
80
        opts.driver.dumpUnsatCores = value;
81
    }
82
}
83
void setDefaultDumpUnsatCoresFull(Options& opts, bool value)
84
{
85
    if (!opts.driver.dumpUnsatCoresFullWasSetByUser) {
86
        opts.driver.dumpUnsatCoresFull = value;
87
    }
88
}
89
void setDefaultEarlyExit(Options& opts, bool value)
90
{
91
    if (!opts.driver.earlyExitWasSetByUser) {
92
        opts.driver.earlyExit = value;
93
    }
94
}
95
void setDefaultForceNoLimitCpuWhileDump(Options& opts, bool value)
96
{
97
    if (!opts.driver.forceNoLimitCpuWhileDumpWasSetByUser) {
98
        opts.driver.forceNoLimitCpuWhileDump = value;
99
    }
100
}
101
void setDefaultHelp(Options& opts, bool value)
102
{
103
    if (!opts.driver.helpWasSetByUser) {
104
        opts.driver.help = value;
105
    }
106
}
107
void setDefaultInteractive(Options& opts, bool value)
108
{
109
    if (!opts.driver.interactiveWasSetByUser) {
110
        opts.driver.interactive = value;
111
    }
112
}
113
void setDefaultInteractivePrompt(Options& opts, bool value)
114
{
115
    if (!opts.driver.interactivePromptWasSetByUser) {
116
        opts.driver.interactivePrompt = value;
117
    }
118
}
119
void setDefaultSeed(Options& opts, uint64_t value)
120
{
121
    if (!opts.driver.seedWasSetByUser) {
122
        opts.driver.seed = value;
123
    }
124
}
125
void setDefaultSegvSpin(Options& opts, bool value)
126
{
127
    if (!opts.driver.segvSpinWasSetByUser) {
128
        opts.driver.segvSpin = value;
129
    }
130
}
131
void setDefaultVersion(Options& opts, bool value)
132
{
133
    if (!opts.driver.versionWasSetByUser) {
134
        opts.driver.version = value;
135
    }
136
}
137
// clang-format on
138
}
139
140
}  // namespace options
141
29322
}  // namespace cvc5
142
// clang-format on