clingo
|
#include <clasp_options.h>
Classes | |
struct | ParseContext |
class | ProgOption |
Public Member Functions | |
ClaspCliConfig () | |
~ClaspCliConfig () | |
Raw interface | |
void | init (uint32 solverId, ConfigKey config=config_asp_default) |
Initializes the i'th solver with the given configuration. More... | |
void | initTester (uint32 solverId, ConfigKey config=config_default) |
Initializes the i'th tester solver with the given configuration. More... | |
bool | set (OptionKey o, const char *value) |
Sets the given option in the master configuration. More... | |
bool | set (uint32 solverId, OptionKey o, const char *value) |
Sets the given option in the i'th solver. More... | |
bool | setTester (uint32 solverId, OptionKey o, const char *value) |
Sets the given option in the i'th tester solver. More... | |
bool | finalize () |
Validates and finalizes this configuration. More... | |
App interface | |
void | addOptions (ProgramOptions::OptionContext &root) |
Adds all available options to root. More... | |
void | addDisabled (ProgramOptions::ParsedOptions &parsed) |
Adds options that are disabled by the options contained in parsed to parsed. More... | |
bool | finalize (const ProgramOptions::ParsedOptions &parsed, ProblemType type, bool applyDefaults) |
Applies the options in parsed and calls finalize(). More... | |
template<class IT > | |
bool | setConfig (IT first, IT last, ProblemType t) |
Populates this configuration with the options given in [first, last) and finalizes it. More... | |
Public Member Functions inherited from Clasp::ClaspConfig | |
ClaspConfig () | |
~ClaspConfig () | |
void | prepare (SharedContext &) |
Prepares this configuration for the usage in the given context. More... | |
void | reset () |
UserConfig * | testerConfig () const |
UserConfig * | addTesterConfig () |
void | setSolvers (uint32 n) |
Public Member Functions inherited from Clasp::BasicSatConfig | |
BasicSatConfig () | |
void | prepare (SharedContext &) |
Prepares this configuration for the usage in the given context. More... | |
const CtxOpts & | context () const |
Returns the options for the shared context. More... | |
uint32 | numSolver () const |
Returns the number of solver options in this config. More... | |
uint32 | numSearch () const |
Returns the number of search options in this config. More... | |
const SolverOpts & | solver (uint32 i) const |
Returns the solver options for the i'th solver to be attached to the SharedContext. More... | |
const SearchOpts & | search (uint32 i) const |
Returns the search options for the i'th solver of the SharedContext. More... | |
DecisionHeuristic * | heuristic (uint32 i) const |
Returns the heuristic to be used in the i'th solver. More... | |
SolverOpts & | addSolver (uint32 i) |
Returns the (modifiable) solver options for the i'th solver. More... | |
SearchOpts & | addSearch (uint32 i) |
Returns the (modifiable) search options for the i'th solver. More... | |
virtual void | resize (uint32 numSolver, uint32 numSearch) |
Public Member Functions inherited from Clasp::UserConfiguration | |
virtual bool | addPost (Solver &s) const |
Adds post propagators to the given solver. More... | |
Public Member Functions inherited from Clasp::Configuration | |
virtual | ~Configuration () |
Public Member Functions inherited from Clasp::ContextParams | |
ContextParams () | |
Static Public Member Functions | |
static ConfigKey | allocConfig () |
Registers a new empty configuration and returns its key. More... | |
static void | appendConfig (ConfigKey k, const char *name, const char *cmd) |
Appends cmd to the given configuration. More... | |
static ConfigKey | loadConfig (const char *fileName) |
Loads the configuration file with the given name and returns a configuration key for accessing it. More... | |
static ConfigIter | getConfig (ConfigKey key) |
Returns the configuration with the given key as a double-null-terminated string list. More... | |
static bool | releaseConfig (ConfigKey key) |
Discards the configuration with the given key. More... | |
static const char * | getDefaults (ProblemType f) |
Returns defaults for the given problem type. More... | |
Additional Inherited Members | |
Public Types inherited from Clasp::ClaspConfig | |
typedef BasicSatConfig | UserConfig |
typedef Solver ** | SolverIt |
typedef Asp::LogicProgram::AspOptions | AspOptions |
Public Types inherited from Clasp::Configuration | |
typedef SolverParams | SolverOpts |
typedef SolveParams | SearchOpts |
typedef ContextParams | CtxOpts |
Public Types inherited from Clasp::ContextParams | |
enum | ShortMode { short_implicit = 0, short_explicit = 1 } |
How to handle short learnt clauses. More... | |
enum | ShareMode { share_no = 0, share_problem = 1, share_learnt = 2, share_all = 3, share_auto = 4 } |
How to handle physical sharing of (explicit) constraints. More... | |
Public Attributes inherited from Clasp::ClaspConfig | |
SolveOptions | solve |
EnumOptions | enumerate |
AspOptions | asp |
Public Attributes inherited from Clasp::ContextParams | |
SatPreParams | satPre |
uint8 | shareMode: 3 |
uint8 | stats: 2 |
uint8 | shortMode: 1 |
uint8 | seed: 1 |
uint8 | reserved: 1 |
uint8 | cliConfig |
uint8 | cliId |
uint8 | cliMode |
Clasp::Cli::ClaspCliConfig::ClaspCliConfig | ( | ) |
Clasp::Cli::ClaspCliConfig::~ClaspCliConfig | ( | ) |
void Clasp::Cli::ClaspCliConfig::addDisabled | ( | ProgramOptions::ParsedOptions & | parsed | ) |
Adds options that are disabled by the options contained in parsed to parsed.
void Clasp::Cli::ClaspCliConfig::addOptions | ( | ProgramOptions::OptionContext & | root | ) |
Adds all available options to root.
Once options are added, an option source (e.g. the command-line) can be used to populate this object.
|
static |
Registers a new empty configuration and returns its key.
|
static |
Appends cmd to the given configuration.
k | The config to append to. |
name | The name of the new config. |
cmd | A space separated option-list in long-format (i.e. '–opt=value'). |
bool Clasp::Cli::ClaspCliConfig::finalize | ( | ) |
Validates and finalizes this configuration.
bool Clasp::Cli::ClaspCliConfig::finalize | ( | const ProgramOptions::ParsedOptions & | parsed, |
ProblemType | type, | ||
bool | applyDefaults | ||
) |
|
static |
Returns the configuration with the given key as a double-null-terminated string list.
|
static |
Returns defaults for the given problem type.
void Clasp::Cli::ClaspCliConfig::init | ( | uint32 | solverId, |
ConfigKey | config = config_asp_default |
||
) |
Initializes the i'th solver with the given configuration.
void Clasp::Cli::ClaspCliConfig::initTester | ( | uint32 | solverId, |
ConfigKey | config = config_default |
||
) |
Initializes the i'th tester solver with the given configuration.
|
static |
Loads the configuration file with the given name and returns a configuration key for accessing it.
|
static |
Discards the configuration with the given key.
bool Clasp::Cli::ClaspCliConfig::set | ( | OptionKey | o, |
const char * | value | ||
) |
Sets the given option in the master configuration.
bool Clasp::Cli::ClaspCliConfig::set | ( | uint32 | solverId, |
OptionKey | o, | ||
const char * | value | ||
) |
Sets the given option in the i'th solver.
|
inline |
Populates this configuration with the options given in [first, last) and finalizes it.
[first,last) | a range of options in argv format. |
bool Clasp::Cli::ClaspCliConfig::setTester | ( | uint32 | solverId, |
OptionKey | o, | ||
const char * | value | ||
) |
Sets the given option in the i'th tester solver.