OptionInfo

The configuration data of an option.

Bitwuzla offers a compact way to retrieve all information about a configuration option bitwuzla::Option as a bitwuzla::OptionInfo object via bitwuzla::OptionInfo::OptionInfo(). This object is created per option and can be queried for

  • long and short names

  • option description

  • default value

  • minimum/maximum/default values (for numeric options)

  • available option modes (for options with modes).



namespace bitwuzla {

struct OptionInfo

The struct holding all information about an option.

Public Types

enum class Kind

The kind of the associated option.

Values:

enumerator BOOL

Boolean option (Boolean configuration value).

enumerator NUMERIC

Numeric option (uint64_t configuration value).

enumerator MODE

Option with configuration modes.

Public Functions

OptionInfo(const Options &options, Option option)

Constructor.

Parameters:
  • options – The option configuration to query for the given option.

  • option – The option to query.

inline OptionInfo()

Default constructor.

inline ~OptionInfo()

Destructor.

template<class T>
T value() const

Additionall getter for values.

Note

This is mainly needed for Cython.

Returns:

The value wrapper of this option info.

template<>
OptionInfo::Bool value() const

Get Bool option info wrapper.

Returns:

The option info wrapper.

template<>
OptionInfo::Numeric value() const

Get Numeric option info wrapper.

Returns:

The option info wrapper.

template<>
OptionInfo::Mode value() const

Get Mode option info wrapper.

Returns:

The option info wrapper.

Public Members

Option opt

The associated option.

Kind kind

The kind of the option.

const char *shrt

Short option name.

const char *lng

Long option name.

const char *description

Option description.

std::variant<Bool, Numeric, Mode> values

The values.

struct Bool

The option value data of a Boolean option.

Public Members

bool cur

Current Boolean option value.

bool dflt

Default Boolean option value.

struct Mode

The option value data of an option with modes.

Public Members

std::string cur

Current mode option value.

std::string dflt

Default mode option value.

std::vector<std::string> modes

List of available modes.

struct Numeric

The option value data of a numeric option.

Public Members

uint64_t cur

Current numeric option value.

uint64_t dflt

Default numeric option value.

uint64_t min

Minimum numeric option value.

uint64_t max

Maximum numeric option value.

}