GCC Code Coverage Report
Directory: . Exec Total Coverage
File: build-coverage/src/options/main_options.cpp Lines: 1 53 1.9 %
Date: 2021-08-01 Branches: 2 30 6.7 %

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