GCC Code Coverage Report
Directory: . Exec Total Coverage
File: build-coverage/src/options/options.cpp Lines: 52 52 100.0 %
Date: 2021-09-18 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/cvc5config.h"
20
#include "options/options_handler.h"
21
#include "options/options_listener.h"
22
23
// clang-format off
24
#include "options/arith_options.h"
25
#include "options/arrays_options.h"
26
#include "options/base_options.h"
27
#include "options/booleans_options.h"
28
#include "options/builtin_options.h"
29
#include "options/bv_options.h"
30
#include "options/datatypes_options.h"
31
#include "options/decision_options.h"
32
#include "options/expr_options.h"
33
#include "options/fp_options.h"
34
#include "options/main_options.h"
35
#include "options/parser_options.h"
36
#include "options/printer_options.h"
37
#include "options/proof_options.h"
38
#include "options/prop_options.h"
39
#include "options/quantifiers_options.h"
40
#include "options/sep_options.h"
41
#include "options/sets_options.h"
42
#include "options/smt_options.h"
43
#include "options/strings_options.h"
44
#include "options/theory_options.h"
45
#include "options/uf_options.h"
46
// clang-format on
47
48
namespace cvc5
49
{
50
  thread_local Options* Options::s_current = nullptr;
51
52
24136
  Options::Options()
53
      :
54
// clang-format off
55
        d_arith(std::make_unique<options::HolderARITH>()),
56
        d_arrays(std::make_unique<options::HolderARRAYS>()),
57
        d_base(std::make_unique<options::HolderBASE>()),
58
        d_booleans(std::make_unique<options::HolderBOOLEANS>()),
59
        d_builtin(std::make_unique<options::HolderBUILTIN>()),
60
        d_bv(std::make_unique<options::HolderBV>()),
61
        d_datatypes(std::make_unique<options::HolderDATATYPES>()),
62
        d_decision(std::make_unique<options::HolderDECISION>()),
63
        d_expr(std::make_unique<options::HolderEXPR>()),
64
        d_fp(std::make_unique<options::HolderFP>()),
65
        d_driver(std::make_unique<options::HolderDRIVER>()),
66
        d_parser(std::make_unique<options::HolderPARSER>()),
67
        d_printer(std::make_unique<options::HolderPRINTER>()),
68
        d_proof(std::make_unique<options::HolderPROOF>()),
69
        d_prop(std::make_unique<options::HolderPROP>()),
70
        d_quantifiers(std::make_unique<options::HolderQUANTIFIERS>()),
71
        d_sep(std::make_unique<options::HolderSEP>()),
72
        d_sets(std::make_unique<options::HolderSETS>()),
73
        d_smt(std::make_unique<options::HolderSMT>()),
74
        d_strings(std::make_unique<options::HolderSTRINGS>()),
75
        d_theory(std::make_unique<options::HolderTHEORY>()),
76
        d_uf(std::make_unique<options::HolderUF>()),
77
24136
        arith(*d_arith),
78
24136
        arrays(*d_arrays),
79
24136
        base(*d_base),
80
24136
        booleans(*d_booleans),
81
24136
        builtin(*d_builtin),
82
24136
        bv(*d_bv),
83
24136
        datatypes(*d_datatypes),
84
24136
        decision(*d_decision),
85
24136
        expr(*d_expr),
86
24136
        fp(*d_fp),
87
24136
        driver(*d_driver),
88
24136
        parser(*d_parser),
89
24136
        printer(*d_printer),
90
24136
        proof(*d_proof),
91
24136
        prop(*d_prop),
92
24136
        quantifiers(*d_quantifiers),
93
24136
        sep(*d_sep),
94
24136
        sets(*d_sets),
95
24136
        smt(*d_smt),
96
24136
        strings(*d_strings),
97
24136
        theory(*d_theory),
98
24136
        uf(*d_uf),
99
// clang-format on
100
555128
        d_handler(std::make_unique<options::OptionsHandler>(this))
101
  {
102
24136
  }
103
104
18840
  Options::~Options() {}
105
106
19787
  void Options::copyValues(const Options& options)
107
  {
108
19787
    if (this != &options)
109
    {
110
// clang-format off
111
19787
      *d_arith = *options.d_arith;
112
19787
      *d_arrays = *options.d_arrays;
113
19787
      *d_base = *options.d_base;
114
19787
      *d_booleans = *options.d_booleans;
115
19787
      *d_builtin = *options.d_builtin;
116
19787
      *d_bv = *options.d_bv;
117
19787
      *d_datatypes = *options.d_datatypes;
118
19787
      *d_decision = *options.d_decision;
119
19787
      *d_expr = *options.d_expr;
120
19787
      *d_fp = *options.d_fp;
121
19787
      *d_driver = *options.d_driver;
122
19787
      *d_parser = *options.d_parser;
123
19787
      *d_printer = *options.d_printer;
124
19787
      *d_proof = *options.d_proof;
125
19787
      *d_prop = *options.d_prop;
126
19787
      *d_quantifiers = *options.d_quantifiers;
127
19787
      *d_sep = *options.d_sep;
128
19787
      *d_sets = *options.d_sets;
129
19787
      *d_smt = *options.d_smt;
130
19787
      *d_strings = *options.d_strings;
131
19787
      *d_theory = *options.d_theory;
132
19787
      *d_uf = *options.d_uf;
133
// clang-format on
134
    }
135
19787
  }
136
137
29574
}  // namespace cvc5
138