summaryrefslogtreecommitdiff
path: root/src/options/options_public.cpp
blob: 7d72496aa94a43868797c0b9837e9cd11bae718c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
/******************************************************************************
 * Top contributors (to current version):
 *   Tim King, Gereon Kremer, Andrew Reynolds
 *
 * This file is part of the cvc5 project.
 *
 * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
 * in the top-level source directory and their institutional affiliations.
 * All rights reserved.  See the file COPYING in the top-level source
 * directory for licensing information.
 * ****************************************************************************
 *
 * Definitions of public facing interface functions for Options.
 *
 * These are all one line wrappers for accessing the internal option data.
 */

#include "options_public.h"

#include <fstream>
#include <ostream>
#include <string>
#include <vector>

#include "base/listener.h"
#include "base/modal_exception.h"
#include "options/base_options.h"
#include "options/language.h"
#include "options/main_options.h"
#include "options/option_exception.h"
#include "options/options.h"
#include "options/parser_options.h"
#include "options/printer_modes.h"
#include "options/printer_options.h"
#include "options/resource_manager_options.h"
#include "options/smt_options.h"
#include "options/uf_options.h"

namespace cvc5::options {

InputLanguage getInputLanguage(const Options& opts)
{
  return opts.base.inputLanguage;
}
InstFormatMode getInstFormatMode(const Options& opts)
{
  return opts.printer.instFormatMode;
}
OutputLanguage getOutputLanguage(const Options& opts)
{
  return opts.base.outputLanguage;
}
bool getUfHo(const Options& opts) { return opts.uf.ufHo; }
bool getDumpInstantiations(const Options& opts)
{
  return opts.smt.dumpInstantiations;
}
bool getDumpModels(const Options& opts) { return opts.smt.dumpModels; }
bool getDumpProofs(const Options& opts) { return opts.smt.dumpProofs; }
bool getDumpUnsatCores(const Options& opts)
{
  return opts.smt.dumpUnsatCores || opts.smt.dumpUnsatCoresFull;
}
bool getFilesystemAccess(const Options& opts)
{
  return opts.parser.filesystemAccess;
}
bool getForceNoLimitCpuWhileDump(const Options& opts)
{
  return opts.smt.forceNoLimitCpuWhileDump;
}
bool getIncrementalSolving(const Options& opts)
{
  return opts.smt.incrementalSolving;
}
bool getLanguageHelp(const Options& opts) { return opts.base.languageHelp; }
bool getMemoryMap(const Options& opts) { return opts.parser.memoryMap; }
bool getParseOnly(const Options& opts) { return opts.base.parseOnly; }
bool getProduceModels(const Options& opts) { return opts.smt.produceModels; }
bool getSemanticChecks(const Options& opts)
{
  return opts.parser.semanticChecks;
}
bool getStatistics(const Options& opts) { return opts.base.statistics; }
bool getStatsEveryQuery(const Options& opts)
{
  return opts.base.statisticsEveryQuery;
}
bool getStrictParsing(const Options& opts)
{
  return opts.parser.strictParsing;
}
uint64_t getCumulativeTimeLimit(const Options& opts)
{
  return opts.resman.cumulativeMillisecondLimit;
}
const std::string& getForceLogicString(const Options& opts)
{
  return opts.parser.forceLogicString;
}
int32_t getVerbosity(const Options& opts) { return opts.base.verbosity; }

std::istream* getIn(const Options& opts) { return opts.base.in; }
std::ostream* getErr(const Options& opts) { return opts.base.err; }
std::ostream* getOut(const Options& opts) { return opts.base.out; }
const std::string& getBinaryName(const Options& opts)
{
  return opts.base.binary_name;
}

void setInputLanguage(InputLanguage val, Options& opts)
{
  opts.base.inputLanguage = val;
}
void setOut(std::ostream* val, Options& opts) { opts.base.out = val; }
void setOutputLanguage(OutputLanguage val, Options& opts)
{
  opts.base.outputLanguage = val;
}

bool wasSetByUserEarlyExit(const Options& opts)
{
  return opts.driver.earlyExitWasSetByUser;
}
bool wasSetByUserForceLogicString(const Options& opts)
{
  return opts.parser.forceLogicStringWasSetByUser;
}
bool wasSetByUserIncrementalSolving(const Options& opts)
{
  return opts.smt.incrementalSolvingWasSetByUser;
}
bool wasSetByUserInteractive(const Options& opts)
{
  return opts.driver.interactiveWasSetByUser;
}

}  // namespace cvc5::options
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback