GCC Code Coverage Report
Directory: . Exec Total Coverage
File: build-coverage/src/options/prop_options.cpp Lines: 1 37 2.7 %
Date: 2021-08-06 Branches: 2 22 9.1 %

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/prop_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 minisatDumpDimacs__option_t minisatDumpDimacs;
33
thread_local struct minisatUseElim__option_t minisatUseElim;
34
thread_local struct satRandomFreq__option_t satRandomFreq;
35
thread_local struct satRandomSeed__option_t satRandomSeed;
36
thread_local struct sat_refine_conflicts__option_t sat_refine_conflicts;
37
thread_local struct satRestartFirst__option_t satRestartFirst;
38
thread_local struct satRestartInc__option_t satRestartInc;
39
thread_local struct satClauseDecay__option_t satClauseDecay;
40
thread_local struct satVarDecay__option_t satVarDecay;
41
42
43
44
45
namespace prop
46
{
47
// clang-format off
48
void setDefaultMinisatDumpDimacs(Options& opts, bool value)
49
{
50
    if (!opts.prop.minisatDumpDimacsWasSetByUser) {
51
        opts.prop.minisatDumpDimacs = value;
52
    }
53
}
54
void setDefaultMinisatUseElim(Options& opts, bool value)
55
{
56
    if (!opts.prop.minisatUseElimWasSetByUser) {
57
        opts.prop.minisatUseElim = value;
58
    }
59
}
60
void setDefaultSatRandomFreq(Options& opts, double value)
61
{
62
    if (!opts.prop.satRandomFreqWasSetByUser) {
63
        opts.prop.satRandomFreq = value;
64
    }
65
}
66
void setDefaultSatRandomSeed(Options& opts, uint64_t value)
67
{
68
    if (!opts.prop.satRandomSeedWasSetByUser) {
69
        opts.prop.satRandomSeed = value;
70
    }
71
}
72
void setDefaultSat_refine_conflicts(Options& opts, bool value)
73
{
74
    if (!opts.prop.sat_refine_conflictsWasSetByUser) {
75
        opts.prop.sat_refine_conflicts = value;
76
    }
77
}
78
void setDefaultSatRestartFirst(Options& opts, uint64_t value)
79
{
80
    if (!opts.prop.satRestartFirstWasSetByUser) {
81
        opts.prop.satRestartFirst = value;
82
    }
83
}
84
void setDefaultSatRestartInc(Options& opts, double value)
85
{
86
    if (!opts.prop.satRestartIncWasSetByUser) {
87
        opts.prop.satRestartInc = value;
88
    }
89
}
90
void setDefaultSatClauseDecay(Options& opts, double value)
91
{
92
    if (!opts.prop.satClauseDecayWasSetByUser) {
93
        opts.prop.satClauseDecay = value;
94
    }
95
}
96
void setDefaultSatVarDecay(Options& opts, double value)
97
{
98
    if (!opts.prop.satVarDecayWasSetByUser) {
99
        opts.prop.satVarDecay = value;
100
    }
101
}
102
// clang-format on
103
}
104
105
}  // namespace options
106
29322
}  // namespace cvc5
107
// clang-format on