cvc4-1.3
options.h
Go to the documentation of this file.
1 /********************* */
17 #include "cvc4_public.h"
18 
19 #ifndef __CVC4__OPTIONS__OPTIONS_H
20 #define __CVC4__OPTIONS__OPTIONS_H
21 
22 #include <iostream>
23 #include <fstream>
24 #include <string>
25 #include <vector>
26 
28 #include "util/language.h"
29 #include "util/tls.h"
30 #include "util/sexpr.h"
31 
32 namespace CVC4 {
33 
34 namespace options {
35  struct OptionsHolder;
36 }/* CVC4::options namespace */
37 
38 class ExprStream;
39 class NodeManager;
40 class NodeManagerScope;
41 class SmtEngine;
42 
45  options::OptionsHolder* d_holder;
46 
48  static CVC4_THREADLOCAL(Options*) s_current;
49 
51  template <class T>
52  void assign(T, std::string option, std::string value, SmtEngine* smt);
54  template <class T>
55  void assignBool(T, std::string option, bool value, SmtEngine* smt);
56 
57  friend class NodeManager;
58  friend class NodeManagerScope;
59  friend class SmtEngine;
60 
61 public:
62 
64  static inline Options& current() {
65  return *s_current;
66  }
67 
68  Options();
69  Options(const Options& options);
70  ~Options();
71 
77  template <class T>
78  void set(T, const typename T::type&) {
79  // Flag a compile-time error. Write-able options specialize
80  // this template to provide an implementation.
81  T::you_are_trying_to_assign_to_a_read_only_option;
82  }
83 
85  template <class T>
86  const typename T::type& operator[](T) const;
87 
94  template <class T>
95  bool wasSetByUser(T) const;
96 
101  std::string getDescription() const;
102 
108  static void printUsage(const std::string msg, std::ostream& out);
109 
116  static void printShortUsage(const std::string msg, std::ostream& out);
117 
119  static void printLanguageHelp(std::ostream& out);
120 
127  static std::vector<std::string> suggestCommandLineOptions(const std::string& optionName) throw();
128 
135  static std::vector<std::string> suggestSmtOptions(const std::string& optionName) throw();
136 
142  std::vector<std::string> parseOptions(int argc, char* argv[]) throw(OptionException);
143 
147  SExpr getOptions() const throw();
148 
149 };/* class Options */
150 
151 }/* CVC4 namespace */
152 
153 #include "options/base_options.h"
154 
155 #endif /* __CVC4__OPTIONS__OPTIONS_H */
Header to define CVC4_THREAD whether or not TLS is supported by the compiler/runtime platform...
Class representing an option-parsing exception such as badly-typed or missing arguments, arguments out of bounds, etc.
Options-related exceptions.
Simple representation of S-expressions.
This is CVC4 release version For build and installation please see the INSTALL file included with this distribution This first official release of CVC4 is the result of more than three years of efforts by researchers at New York University and The University of Iowa The project leaders are Clark please refer to the AUTHORS file in the source distribution CVC4 is a tool for determining the satisfiability of a first order formula modulo a first order CVC CVC3 but does not directly incorporate code from any previous version CVC4 is intended to be an open and extensible SMT engine It can be used as a stand alone tool or as a library It has been designed to increase the performance and reduce the memory overhead of its predecessors It is written entirely in C and is released under a free software see the INSTALL file that comes with this distribution We recommend that you visit our CVC4 tutorials online please write to the cvc users cs nyu edu mailing list *if you need to report a bug with CVC4
Definition: README:39
#define CVC4_PUBLIC
Definition: cvc4_public.h:30
Definition of input and output languages.
A pure-virtual stream interface for expressions.
Definition: expr_stream.h:30
static Options & current()
Get the current Options in effect.
Definition: options.h:64
Macros that should be defined everywhere during the building of the libraries and driver binary...
struct CVC4::options::out__option_t out
void set(T, const typename T::type &)
Set the value of the given option.
Definition: options.h:78
#define CVC4_THREADLOCAL(__type...)
Definition: tls.h:30
A simple S-expression.
Definition: sexpr.h:51