Solver Options

Murxla supports option fuzzing, that is, randomly configuring solver options based on the options model of the solver. This options model is advertised to Murxla via configuring a murxla::SolverOption for each option and adding it to the solver manager via murxla::Solver::configure_options() (for more details, see how to configure solver options).

Murxla supports Boolean options (murxla::SolverOptionBool), numeric options (murxla::SolverOptionNum) and options with multiple string values (murxla::SolverOptionList).

class SolverOption

Base class representing a solver option.

Subclassed by murxla::SolverOptionBool, murxla::SolverOptionList, murxla::SolverOptionNum< T >

Public Functions

virtual std::string pick_value(RNGenerator &rng) const = 0

Pick a random option value.

const std::string &get_name() const

Get the name of the option.

Private Members

std::string d_name

The name of the option.

class SolverOptionBool : public murxla::SolverOption

Public Functions

SolverOptionBool(const std::string &name, bool default_value)

Constructor for Boolean options.

virtual std::string pick_value(RNGenerator &rng) const override

Pick random Boolean value.

Private Members

bool d_default

The default Boolean value of the option.

template<typename T>
class SolverOptionNum : public murxla::SolverOption

Public Functions

inline SolverOptionNum(const std::string &name, T min, T max, T default_value)

Constructor for numeric options.

inline virtual std::string pick_value(RNGenerator &rng) const override

Picks a random numeric value between d_min and d_max.

Private Members

T d_min

The minimum numeric value of the option.

T d_max

The maximum numeric value of the option.

T d_default

The default numeric value of the option.

class SolverOptionList : public murxla::SolverOption

Public Functions

SolverOptionList(const std::string &name, const std::vector<std::string> &values, const std::string &default_value)

Constructor for list options.

virtual std::string pick_value(RNGenerator &rng) const override

Picks a random option value from the list of available values.

Private Members

std::vector<std::string> d_values

The list of valid option values.

std::string d_default

The default value of the option.