options.h
Go to the documentation of this file.
/********************* */
#include "cvc4_public.h"
#ifndef __CVC4__OPTIONS__OPTIONS_H
#define __CVC4__OPTIONS__OPTIONS_H
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include "options/option_exception.h"
#include "util/language.h"
#include "util/tls.h"
#include "util/sexpr.h"
namespace CVC4 {
namespace options {
struct OptionsHolder;
}/* CVC4::options namespace */
class ExprStream;
class NodeManager;
class NodeManagerScope;
class SmtEngine;
class CVC4_PUBLIC Options {
options::OptionsHolder* d_holder;
static CVC4_THREADLOCAL(Options*) s_current;
template <class T>
void assign(T, std::string option, std::string value, SmtEngine* smt);
template <class T>
void assignBool(T, std::string option, bool value, SmtEngine* smt);
friend class NodeManager;
friend class NodeManagerScope;
friend class SmtEngine;
public:
static inline Options& current() {
return *s_current;
}
Options();
Options(const Options& options);
~Options();
template <class T>
void set(T, const typename T::type&) {
// Flag a compile-time error. Write-able options specialize
// this template to provide an implementation.
T::you_are_trying_to_assign_to_a_read_only_option;
}
template <class T>
const typename T::type& operator[](T) const;
template <class T>
bool wasSetByUser(T) const;
std::string getDescription() const;
static void printUsage(const std::string msg, std::ostream& out);
static void printShortUsage(const std::string msg, std::ostream& out);
static void printLanguageHelp(std::ostream& out);
static std::string suggestCommandLineOptions(const std::string& optionName) throw();
static std::vector<std::string> suggestSmtOptions(const std::string& optionName) throw();
std::vector<std::string> parseOptions(int argc, char* argv[]) throw(OptionException);
SExpr getOptions() const throw();
};/* class Options */
}/* CVC4 namespace */
#include "options/base_options.h"
#endif /* __CVC4__OPTIONS__OPTIONS_H */
CVC4::OptionException
Class representing an option-parsing exception such as badly-typed or missing arguments,...
Definition option_exception.h:32
CVC4::Options
Definition options.h:43
CVC4::Options::current
static Options & current()
Get the current Options in effect.
Definition options.h:64
CVC4::Options::Options
Options()
CVC4::Options::operator[]
const T::type & operator[](T) const
Get the value of the given option.
CVC4::Options::printUsage
static void printUsage(const std::string msg, std::ostream &out)
Print overall command-line option usage message, prefixed by "msg"—which could be an error message ca...
CVC4::Options::printShortUsage
static void printShortUsage(const std::string msg, std::ostream &out)
Print command-line option usage message for only the most-commonly used options.
CVC4::Options::~Options
~Options()
CVC4::Options::parseOptions
std::vector< std::string > parseOptions(int argc, char *argv[])
Initialize the options based on the given command-line arguments.
CVC4::Options::getDescription
std::string getDescription() const
Get a description of the command-line flags accepted by parseOptions.
CVC4::Options::wasSetByUser
bool wasSetByUser(T) const
Returns true iff the value of the given option was set by the user via a command-line option or SmtEn...
CVC4::Options::getOptions
SExpr getOptions() const
Get the setting for all options.
CVC4::Options::Options
Options(const Options &options)
CVC4::Options::suggestCommandLineOptions
static std::string suggestCommandLineOptions(const std::string &optionName)
Look up long command-line option names that bear some similarity to the given name.
CVC4::Options::set
void set(T, const typename T::type &)
Set the value of the given option.
Definition options.h:78
CVC4::Options::suggestSmtOptions
static std::vector< std::string > suggestSmtOptions(const std::string &optionName)
Look up SMT option names that bear some similarity to the given name.
CVC4::Options::printLanguageHelp
static void printLanguageHelp(std::ostream &out)
Print help for the –lang command line option.
CVC4::SExpr
A simple S-expression.
Definition sexpr.h:51
CVC4::SmtEngine
Definition smt_engine.h:113
cvc4_public.h
Macros that should be defined everywhere during the building of the libraries and driver binary,...
CVC4_PUBLIC
#define CVC4_PUBLIC
Definition cvc4_public.h:30
language.h
Definition of input and output languages.
CVC4
Definition expr.h:106
option_exception.h
Options-related exceptions.
sexpr.h
Simple representation of S-expressions.
tls.h
CVC4_THREADLOCAL
#define CVC4_THREADLOCAL(__type...)
Definition tls.h:35