summaryrefslogtreecommitdiff
path: root/src/options/options_handler.cpp
AgeCommit message (Collapse)Author
2021-10-07Add new versioning scheme (#7253)Gereon Kremer
This introduces a new versioning mechanism that allows for better automation.
2021-10-05Finish refactoring on option handlers (#7295)Gereon Kremer
This PR finishes refactoring on the option handlers.
2021-10-01Clean options handlers (#7201)Gereon Kremer
Some cleanup on the option handlers, starting with handlers for base and main options.
2021-09-18Refactor tag suggestion mechanism (#7199)Gereon Kremer
This refactors the internal tag suggestion mechanism to no longer rely on C-style char arrays, but use a C++ vector of strings instead.
2021-08-27Handle languages as strings in driver (#7074)Gereon Kremer
This PR moves the first chunk of code in the driver to use the proper options API for the language options. It is now handled as a string.
2021-08-26Consolidate language types (#7065)Gereon Kremer
This PR combines the two enums InputLanguage and OutputLanguage into a single Language type. It makes sure that AST is not used as input language using a predicate whenever the option is set.
2021-08-19Refactor proof output for TPTP (#7029)Andrew Reynolds
This eliminates the old option "inst format mode" and makes proof output for TPTP organized as an ordinary proof output format.
2021-08-06Clear options manager (#6991)Gereon Kremer
This PR moves the remaining responsibilities from the options manager into option predicates. They belong there anyway, given that this code shall be executed immediately when an option is set. This also allows to remove the infrastructure for an options listener.
2021-08-04Refactor managed streams (#6934)Gereon Kremer
This PR introduces a new ManagedStream class that replaces the previous ManagedOstream. It allows to directly store the (wrapped) stream objects in the options. Handling the stream options is moved from the options manager to option predicates and the different options for input and output streams are combined into a single one. Some associated utilities (open_ostream.h and update_ostream.h) are now obsolete and thus removed.
2021-07-26Move public options functions to separate file (#6671)Gereon Kremer
This PR moves the remaining special purpose functions out of the Options class. This set of functions is only used to implement API functions in the smt engine (getting and setting options by string), and by the main driver for parsing and printing usage information.
2021-07-09Implement stop-only for new justification heuristic (#6847)Andrew Reynolds
This also refactors decision engine so that we use inheritance instead of a dummy flag + members to determine which implementation to use.
2021-07-03Add output tags -o, --output. (#6826)Mathias Preiner
Output tags are similar to debug/trace tags, but are always enabled (except for muzzled builds) to provide useful information for users. Available output tags can be queried via -o help/--output help and are specified in the base options module via enum values. Co-authored-by: Gereon Kremer <nafur42@gmail.com>
2021-06-21Make CaDiCaL a required dependency. (#6761)Mathias Preiner
Since the new BV solver is enabled by default and uses CaDiCaL (and optionally CryptoMiniSat) we make CaDiCaL a required dependency.
2021-06-16Make symfpu a required dependency. (#6749)Aina Niemetz
2021-06-16Properly consider aliases in option handlers (#6683)Gereon Kremer
This PR makes sure that option handlers have access to both the canonical option name and the option name that was actually used. It also updates the options README and gets rid of the base_handlers.h of which only a fraction was used.
2021-06-15Remove public option wrappers (#6716)Gereon Kremer
This PR gets rid of almost all remaining public option wrappers. It does so by - making base, main and parser options public such that they can directly be used from the driver and the parser - moving incremental and the resource limiting options to base - moving dumping options to main After this PR, the only option wrapper left is becoming obsolete as well after (the follow-up of) #6697.
2021-06-08Fix statistics option handler (#6703)Gereon Kremer
This PR fixes a typo in the option handler for the statistics options, which lead to options not properly propagating.
2021-06-07Remove `Options::wasSetByUser()` (#6682)Gereon Kremer
This PR removes the next heavily specialized template function Options::wasSetByUser() in favor of direct access to the *WasSetByUser flags.
2021-05-29Remove `Options::set()` method (#6556)Gereon Kremer
This PR gets rid of the Options::set() method, replacing it by direct access to the options data. This method was only used internally and did nothing except for resolving the options data from the option tag type via template specializations (via ref()), which is no longer necessary.
2021-05-28Add non-templated method to set option defaults (#6540)Gereon Kremer
This PR replaces the templated Options::setDefault() methods by new non-templated free functions options::{module}::setDefault{option}(). These methods should be used instead of the common if (!set by user) { set option value } pattern.
2021-05-26Use references instead of getter functions (#6597)Gereon Kremer
This PR follows a suggestions of @ajreynol to use public references instead of getter functions to access the individual option modules.
2021-05-21Move option names out of struct (#6554)Gereon Kremer
This PR moves the option names out of the option struct (which will be removed) to free constexpr string constants.
2021-05-13Split options holder class (#6527)Gereon Kremer
This PR splits the OptionsHolder class into separate holder classes for every options module and makes them directly accessible via appropriate Options::<module>() methods. We forward declare these new holder classes and thereby retain that we only need to recompile when we change an option module that is explicitly included. All (generated) methods that previously accessed the old holder object are changed to instead use the new holder objects. This PR does the bare minimum to do this change, further PRs will eventually get rid of all template specializations that currently surround our options class.
2021-04-26First part of options refactoring (#6428)Gereon Kremer
This PR does a first round of refactoring and gets rid of a significant portion of generated code. In particular - it removes options::optionName.wasSetByUser() (we still have Options::wasSetByUser()) - it removes options::optionName.set() (we still have Options::set()) - it removes options::optionName.getName() in favor of options::optionName.name - it removes the specializations of Options::assign() and Options::assignBool() from the headers - it eliminates runHandlerAndPredicates() and runBoolPredicates() The removed methods are only used in few places with are changed to using Options::current().X() instead. In the future, we also want to get rid of options::optionName() and use Options::operator[]() instead, and furthermore not use Options::current() but use the options from the Env object. This PR already adds Env::getOption() as a shorthand for Env::getOptions()[...] and uses it as a proof of concept within SmtEngine.
2021-04-21Goodbye CVC4, hello cvc5! (#6371)Mathias Preiner
This commits changes the build system to cvc5 and removes the remaining occurrences of CVC4. It further cleans up outdated/unused scripts in contrib/.
2021-04-16Fix dependencies for stats options (#6378)Gereon Kremer
A last-minute edit in a previous PR broke the handling of dependencies between the statistic options.
2021-04-15Rename occurrences of CVC4 to CVC5. (#6351)Aina Niemetz
This renames everything but GitHub links and build system related macros. Switching the build system to cvc5 will be the last step in the renaming process.
2021-04-15Fix printing of stats when aborted. (#6362)Gereon Kremer
This PR improves/fixes printing of statistics when the solver has been aborted, i.e. when we use printSafe(), and a few other minor issues with the new statistics setup. add toString() methods for TypeConstant, api::Kind to allow for automatic printing by print_safe<>() improve kindToString() to avoid std::stringstream fix newlines between statistics in printSafe() make printing of histograms consistent make --stats-all, --stats-expert and --stats-every-check automatically enable --stats (and vice versa)
2021-04-12Refactor resource manager (#6322)Gereon Kremer
This PR does another round of refactoring of the resource manager and related code. - it moves the Resource enum out of the ResourceManager class - it treats the resources in a generic way (storing the statistics in a vector) instead of the manual treatment we had before - weights no longer live in the options, but in the ResourceManager and are changed accordingly in the ResourceManager constructor - following the generic treatment of resources, it also removes all the resource-specific options --x-step in favor of a generic --rweight name=weight - removed several unused methods from the ResourceManager Note that we handle the Resource enum in a way that allows to easily use other enums as additional resources, for example InferenceId. The general idea is that we will at some point have sensible default weights (so that the cumulative resources somewhat simulate the solver runtime) and users (almost) never need to modify them.
2021-04-12Refactor and update copyright headers. (#6316)Aina Niemetz
2021-04-09Rename CVC4_ macros to CVC5_. (#6327)Aina Niemetz
2021-04-01Rename namespace CVC5 to cvc5. (#6258)Aina Niemetz
2021-03-31Rename namespace CVC4 to CVC5. (#6249)Aina Niemetz
2021-03-23Removing unused build options and deprecated proof compile flag (#6195)Haniel Barbosa
2021-03-09Update copyright headers to 2021. (#6081)Aina Niemetz
2021-02-03Add BV solver bitblast. (#5851)Mathias Preiner
This PR adds a new bit-blasting BV solver, which can be enabled via --bv-solver=bitblast. The new bit-blast solver can be used instead of the lazy BV solver and currently supports CaDiCaL and CryptoMiniSat as SAT back end.
2020-09-22Update copyright header script to support CMake and Python files (#5067)Mathias Preiner
This PR updates the update-copyright.pl script to also update/add copyright headers to CMake specific files. It further fixes a small typo in the header.
2020-08-21Remove BV equality slicer (#4928)Andrew Reynolds
This class is not used based on our coverage tests (although it appears to be possibly enabled based on non-standard runtime checking of assertions), and uses the equality engine in a highly nonstandard way that will be a burden to the new standardization of equality engine in theory solvers. FYI @aniemetz @mpreiner
2020-08-14correctly parse sygus lang option (#4884)E Polgreen
--lang sygus is a synonym for --lang sygus2 also fixes typo in error message for language options parsing Signed-off-by: polgreen <epolgreen@gmail.com>
2020-07-17Replace options listener infrastructure (#4764)Andrew Reynolds
This replaces the old options listener infrastructure with the OptionsManager introduced in cb8d041. It eliminates a "beforeSearchListener", which was a custom way of some options throwing a modal exception if they were set after initialization. Now all options are consistent: no option can be set after initialization. It also moves managed ostream objects to the OptionsManager. @mpreiner The next step will be to remove the "notifies" field from the Options build system and then proceed with cleaning src/options/.
2020-07-17Support for using 'libedit' over 'readline' #4571 (#4579)Andrew V. Jones
Signed-off-by: Andrew V. Jones <andrew.jones@vector.com>
2020-07-17Integration of libpoly (#4679)Gereon Kremer
This commit integrates LibPoly into CVC4. It adds `contrib/get-poly`, adds it to the configure script, cmake and places where CVC4 inspects its own build configuration. Furthermore, it adds `CVC4::RealAlgebraicNumber` (which wraps `poly::AlgebraicNumber`) including some basic unit tests and some utilities.
2020-07-07Transfer ownership of internal Options from NodeManager to SmtEngine (#4682)Andrew Reynolds
This PR decouples Options from NodeManager. Instead, options now live in SmtEngine. The changes that were required for this PR include: The main internal options object is now owned by SmtEngine instead of ExprManager. The ownership resource manager is moved from NodeManager to SmtEngine. Node manager listeners are deleted, timeouts and resource limits are set during SmtEngine::finishInit. A temporary hack was added to make the last constructed SmtEngine to be the one in scope. This ensures that options are in scope whenever an SmtEngine is created. The methods for invoking "subsolvers" (theory/smt_engine_subsolver.h,cpp) was simplified, as versions of these calls that change options do not have to clone a new copy of the ExprManager anymore. Resource manager was removed from the smt2 parser. Minor refactoring was done in SmtEngine to copy "original options" so that options are restored to their state after parsing command line options on reset. Updates to unit tests to ensure conformance to new options scoping.
2020-06-16Update copyright headers.Aina Niemetz
2020-05-22Add support for SAT solver Kissat. (#4514)Aina Niemetz
2020-04-15Change option names --default-dag-thresh and --default-expr-depth (#4309)Andrew Reynolds
2020-03-31Remove replay and use-theory options and idl (#4186)Andrew Reynolds
Towards disentangling Options / NodeManager / SmtEngine. This PR removes options --use-theory=NAME and --replay/--replay-log. Both of these options are highly complex, unused, and lead to complications when implementing the way options and our build system work. The first is motivated by making TheoryEngine use an "alternate" theory, which appears to e.g. make it so that TheoryIdl could entirely replace TheoryArith. I believe this is too heavy handed of a solution: there should a consistent TheoryArith class, and options should be used to enable/disable alternate modules within it. The second attempts to replay low level decisions from the SAT solver. It is documented as not working (in 1.0). I do not believe this is worth salvaging. It also removes the solver in src/theory/idl, which cannot be enabled after this commit.
2020-02-21Adding checks to the validation of 'bv-sat-solver' to ensure that the ↵Andrew V. Jones
selected SAT solver is compiled-in (#3771)
2019-12-17Generate code for options with modes. (#3561)Mathias Preiner
This commit adds support for code generation of options with modes (enums). From now on option enums can be specified in the corresponding *.toml files without the need of extra code. All option enums are now in the options namespace.
2019-12-05Refactor mode options for Unif+PI (#3531)Andrew Reynolds
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback