1 /******************************************************************************
2 * Top contributors (to current version):
3 * Tim King, Gereon Kremer, Andrew Reynolds
5 * This file is part of the cvc5 project.
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 * ****************************************************************************
13 * Definitions of public facing interface functions for Options.
15 * These are all one line wrappers for accessing the internal option data.
18 #include "options_public.h"
25 #include "base/listener.h"
26 #include "base/modal_exception.h"
27 #include "options/base_options.h"
28 #include "options/language.h"
29 #include "options/main_options.h"
30 #include "options/option_exception.h"
31 #include "options/options.h"
32 #include "options/parser_options.h"
33 #include "options/printer_modes.h"
34 #include "options/printer_options.h"
35 #include "options/resource_manager_options.h"
36 #include "options/smt_options.h"
37 #include "options/uf_options.h"
39 namespace cvc5::options
{
41 InputLanguage
getInputLanguage(const Options
& opts
)
43 return opts
.base
.inputLanguage
;
45 InstFormatMode
getInstFormatMode(const Options
& opts
)
47 return opts
.printer
.instFormatMode
;
49 OutputLanguage
getOutputLanguage(const Options
& opts
)
51 return opts
.base
.outputLanguage
;
53 bool getUfHo(const Options
& opts
) { return opts
.uf
.ufHo
; }
54 bool getDumpInstantiations(const Options
& opts
)
56 return opts
.smt
.dumpInstantiations
;
58 bool getDumpModels(const Options
& opts
) { return opts
.smt
.dumpModels
; }
59 bool getDumpProofs(const Options
& opts
) { return opts
.smt
.dumpProofs
; }
60 bool getDumpUnsatCores(const Options
& opts
)
62 return opts
.smt
.dumpUnsatCores
|| opts
.smt
.dumpUnsatCoresFull
;
64 bool getFilesystemAccess(const Options
& opts
)
66 return opts
.parser
.filesystemAccess
;
68 bool getForceNoLimitCpuWhileDump(const Options
& opts
)
70 return opts
.smt
.forceNoLimitCpuWhileDump
;
72 bool getIncrementalSolving(const Options
& opts
)
74 return opts
.smt
.incrementalSolving
;
76 bool getLanguageHelp(const Options
& opts
) { return opts
.base
.languageHelp
; }
77 bool getMemoryMap(const Options
& opts
) { return opts
.parser
.memoryMap
; }
78 bool getParseOnly(const Options
& opts
) { return opts
.base
.parseOnly
; }
79 bool getProduceModels(const Options
& opts
) { return opts
.smt
.produceModels
; }
80 bool getSemanticChecks(const Options
& opts
)
82 return opts
.parser
.semanticChecks
;
84 bool getStatistics(const Options
& opts
) { return opts
.base
.statistics
; }
85 bool getStatsEveryQuery(const Options
& opts
)
87 return opts
.base
.statisticsEveryQuery
;
89 bool getStrictParsing(const Options
& opts
)
91 return opts
.parser
.strictParsing
;
93 uint64_t getCumulativeTimeLimit(const Options
& opts
)
95 return opts
.resman
.cumulativeMillisecondLimit
;
97 const std::string
& getForceLogicString(const Options
& opts
)
99 return opts
.parser
.forceLogicString
;
101 int32_t getVerbosity(const Options
& opts
) { return opts
.base
.verbosity
; }
103 std::istream
* getIn(const Options
& opts
) { return opts
.base
.in
; }
104 std::ostream
* getErr(const Options
& opts
) { return opts
.base
.err
; }
105 std::ostream
* getOut(const Options
& opts
) { return opts
.base
.out
; }
106 const std::string
& getBinaryName(const Options
& opts
)
108 return opts
.base
.binary_name
;
111 void setInputLanguage(InputLanguage val
, Options
& opts
)
113 opts
.base
.inputLanguage
= val
;
115 void setOut(std::ostream
* val
, Options
& opts
) { opts
.base
.out
= val
; }
116 void setOutputLanguage(OutputLanguage val
, Options
& opts
)
118 opts
.base
.outputLanguage
= val
;
121 bool wasSetByUserEarlyExit(const Options
& opts
)
123 return opts
.driver
.earlyExitWasSetByUser
;
125 bool wasSetByUserForceLogicString(const Options
& opts
)
127 return opts
.parser
.forceLogicStringWasSetByUser
;
129 bool wasSetByUserIncrementalSolving(const Options
& opts
)
131 return opts
.smt
.incrementalSolvingWasSetByUser
;
133 bool wasSetByUserInteractive(const Options
& opts
)
135 return opts
.driver
.interactiveWasSetByUser
;
138 } // namespace cvc5::options