GCC Code Coverage Report
Directory: . Exec Total Coverage
File: build-coverage/src/options/arrays_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/arrays_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 arraysConfig__option_t arraysConfig;
33
thread_local struct arraysEagerIndexSplitting__option_t arraysEagerIndexSplitting;
34
thread_local struct arraysEagerLemmas__option_t arraysEagerLemmas;
35
thread_local struct arraysExp__option_t arraysExp;
36
thread_local struct arraysModelBased__option_t arraysModelBased;
37
thread_local struct arraysOptimizeLinear__option_t arraysOptimizeLinear;
38
thread_local struct arraysPropagate__option_t arraysPropagate;
39
thread_local struct arraysReduceSharing__option_t arraysReduceSharing;
40
thread_local struct arraysWeakEquivalence__option_t arraysWeakEquivalence;
41
42
43
44
45
namespace arrays
46
{
47
// clang-format off
48
void setDefaultArraysConfig(Options& opts, int64_t value)
49
{
50
    if (!opts.arrays.arraysConfigWasSetByUser) {
51
        opts.arrays.arraysConfig = value;
52
    }
53
}
54
void setDefaultArraysEagerIndexSplitting(Options& opts, bool value)
55
{
56
    if (!opts.arrays.arraysEagerIndexSplittingWasSetByUser) {
57
        opts.arrays.arraysEagerIndexSplitting = value;
58
    }
59
}
60
void setDefaultArraysEagerLemmas(Options& opts, bool value)
61
{
62
    if (!opts.arrays.arraysEagerLemmasWasSetByUser) {
63
        opts.arrays.arraysEagerLemmas = value;
64
    }
65
}
66
void setDefaultArraysExp(Options& opts, bool value)
67
{
68
    if (!opts.arrays.arraysExpWasSetByUser) {
69
        opts.arrays.arraysExp = value;
70
    }
71
}
72
void setDefaultArraysModelBased(Options& opts, bool value)
73
{
74
    if (!opts.arrays.arraysModelBasedWasSetByUser) {
75
        opts.arrays.arraysModelBased = value;
76
    }
77
}
78
void setDefaultArraysOptimizeLinear(Options& opts, bool value)
79
{
80
    if (!opts.arrays.arraysOptimizeLinearWasSetByUser) {
81
        opts.arrays.arraysOptimizeLinear = value;
82
    }
83
}
84
void setDefaultArraysPropagate(Options& opts, int64_t value)
85
{
86
    if (!opts.arrays.arraysPropagateWasSetByUser) {
87
        opts.arrays.arraysPropagate = value;
88
    }
89
}
90
void setDefaultArraysReduceSharing(Options& opts, bool value)
91
{
92
    if (!opts.arrays.arraysReduceSharingWasSetByUser) {
93
        opts.arrays.arraysReduceSharing = value;
94
    }
95
}
96
void setDefaultArraysWeakEquivalence(Options& opts, bool value)
97
{
98
    if (!opts.arrays.arraysWeakEquivalenceWasSetByUser) {
99
        opts.arrays.arraysWeakEquivalence = value;
100
    }
101
}
102
// clang-format on
103
}
104
105
}  // namespace options
106
29322
}  // namespace cvc5
107
// clang-format on