GCC Code Coverage Report
Directory: . Exec Total Coverage
File: build-coverage/src/options/options.cpp Lines: 52 52 100.0 %
Date: 2021-08-16 Branches: 25 50 50.0 %

Line Exec Source
1
/******************************************************************************
2
 * Top contributors (to current version):
3
 *   Morgan Deters, Tim King, Andrew Reynolds
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
 * Contains code for handling command-line options.
14
 */
15
16
#include "options/options.h"
17
18
#include "base/check.h"
19
#include "base/exception.h"
20
#include "base/output.h"
21
#include "options/language.h"
22
#include "options/options_handler.h"
23
#include "options/options_listener.h"
24
25
// clang-format off
26
#include "options/arith_options.h"
27
#include "options/arrays_options.h"
28
#include "options/base_options.h"
29
#include "options/booleans_options.h"
30
#include "options/builtin_options.h"
31
#include "options/bv_options.h"
32
#include "options/datatypes_options.h"
33
#include "options/decision_options.h"
34
#include "options/expr_options.h"
35
#include "options/fp_options.h"
36
#include "options/main_options.h"
37
#include "options/parser_options.h"
38
#include "options/printer_options.h"
39
#include "options/proof_options.h"
40
#include "options/prop_options.h"
41
#include "options/quantifiers_options.h"
42
#include "options/sep_options.h"
43
#include "options/sets_options.h"
44
#include "options/smt_options.h"
45
#include "options/strings_options.h"
46
#include "options/theory_options.h"
47
#include "options/uf_options.h"
48
49
#include "base/cvc5config.h"
50
51
52
53
using namespace cvc5;
54
using namespace cvc5::options;
55
// clang-format on
56
57
namespace cvc5
58
{
59
  thread_local Options* Options::s_current = nullptr;
60
61
27407
  Options::Options()
62
      :
63
// clang-format off
64
        d_arith(std::make_unique<options::HolderARITH>()),
65
        d_arrays(std::make_unique<options::HolderARRAYS>()),
66
        d_base(std::make_unique<options::HolderBASE>()),
67
        d_booleans(std::make_unique<options::HolderBOOLEANS>()),
68
        d_builtin(std::make_unique<options::HolderBUILTIN>()),
69
        d_bv(std::make_unique<options::HolderBV>()),
70
        d_datatypes(std::make_unique<options::HolderDATATYPES>()),
71
        d_decision(std::make_unique<options::HolderDECISION>()),
72
        d_expr(std::make_unique<options::HolderEXPR>()),
73
        d_fp(std::make_unique<options::HolderFP>()),
74
        d_driver(std::make_unique<options::HolderDRIVER>()),
75
        d_parser(std::make_unique<options::HolderPARSER>()),
76
        d_printer(std::make_unique<options::HolderPRINTER>()),
77
        d_proof(std::make_unique<options::HolderPROOF>()),
78
        d_prop(std::make_unique<options::HolderPROP>()),
79
        d_quantifiers(std::make_unique<options::HolderQUANTIFIERS>()),
80
        d_sep(std::make_unique<options::HolderSEP>()),
81
        d_sets(std::make_unique<options::HolderSETS>()),
82
        d_smt(std::make_unique<options::HolderSMT>()),
83
        d_strings(std::make_unique<options::HolderSTRINGS>()),
84
        d_theory(std::make_unique<options::HolderTHEORY>()),
85
        d_uf(std::make_unique<options::HolderUF>()),
86
27407
        arith(*d_arith),
87
27407
        arrays(*d_arrays),
88
27407
        base(*d_base),
89
27407
        booleans(*d_booleans),
90
27407
        builtin(*d_builtin),
91
27407
        bv(*d_bv),
92
27407
        datatypes(*d_datatypes),
93
27407
        decision(*d_decision),
94
27407
        expr(*d_expr),
95
27407
        fp(*d_fp),
96
27407
        driver(*d_driver),
97
27407
        parser(*d_parser),
98
27407
        printer(*d_printer),
99
27407
        proof(*d_proof),
100
27407
        prop(*d_prop),
101
27407
        quantifiers(*d_quantifiers),
102
27407
        sep(*d_sep),
103
27407
        sets(*d_sets),
104
27407
        smt(*d_smt),
105
27407
        strings(*d_strings),
106
27407
        theory(*d_theory),
107
27407
        uf(*d_uf),
108
// clang-format on
109
630361
        d_handler(std::make_unique<options::OptionsHandler>(this))
110
  {
111
27407
  }
112
113
24778
  Options::~Options() {}
114
115
17001
void Options::copyValues(const Options& options){
116
17001
  if(this != &options) {
117
// clang-format off
118
17001
      *d_arith = *options.d_arith;
119
17001
      *d_arrays = *options.d_arrays;
120
17001
      *d_base = *options.d_base;
121
17001
      *d_booleans = *options.d_booleans;
122
17001
      *d_builtin = *options.d_builtin;
123
17001
      *d_bv = *options.d_bv;
124
17001
      *d_datatypes = *options.d_datatypes;
125
17001
      *d_decision = *options.d_decision;
126
17001
      *d_expr = *options.d_expr;
127
17001
      *d_fp = *options.d_fp;
128
17001
      *d_driver = *options.d_driver;
129
17001
      *d_parser = *options.d_parser;
130
17001
      *d_printer = *options.d_printer;
131
17001
      *d_proof = *options.d_proof;
132
17001
      *d_prop = *options.d_prop;
133
17001
      *d_quantifiers = *options.d_quantifiers;
134
17001
      *d_sep = *options.d_sep;
135
17001
      *d_sets = *options.d_sets;
136
17001
      *d_smt = *options.d_smt;
137
17001
      *d_strings = *options.d_strings;
138
17001
      *d_theory = *options.d_theory;
139
17001
      *d_uf = *options.d_uf;
140
// clang-format on
141
  }
142
17001
}
143
144
29340
}  // namespace cvc5
145