summaryrefslogtreecommitdiff
path: root/src/main
AgeCommit message (Collapse)Author
2021-09-14Make `-o raw-benchmark` work with `--parse-only`Andres Noetzli
Before, cvc5 was returning with `--parse-only` before the code could reach the code responsible for dumping the raw benchmark. This moves the check for `--parse-only` to the appropriate place and updates the `run_regression.py` script to use `--parse-only`.
2021-09-14Turn sphinx generation into a function (#7181)Gereon Kremer
This PR refactors the generation of the command line help for sphinx to a function, just like all the other code generation methods.
2021-09-14Reimplement `--dump=raw-benchmark` as `-o raw-benchmark` (#7191)Andrew Reynolds
Printing the original benchmark is simple, as it is exactly the commands we execute. This removes the previous code from SmtEngine, which is currently broken.
2021-09-13Refactor options parsing (#7143)Gereon Kremer
This PR refactors the code for options parsing.
2021-09-10Refactor command-line help (#7157)Gereon Kremer
This PR refactors how we generate the command-line help message.
2021-09-02[Unit Tests] Fix shell test for Editline (#7117)Andres Noetzli
When using --editline, our interactive_shell_black unit test was not working because the unit test was redirecting std::cin and std::cout to std::stringstreams, which does not work with Editline. This commit refactors our InteractiveShell class to explicitly take the input and output streams as arguments, which fixes the issue because we do not use Editline for input streams that are not std::cin. Additionally, the commit updates the unit test to use SMT-LIB syntax instead of the deprecated CVC language.
2021-09-02Driver & Options cleanup (#7109)Gereon Kremer
This PR does some cleanup in the driver and the options. It removes the now obsolete public attribute that allowed using the options in the driver, and removes a bunch of includes from the driver that are no longer necessary.
2021-09-01Print response to get-model using the API (#7084)Andrew Reynolds
This changes our implementation of GetModelCommand so that we use the API to print the model. It simplifies smt::Model so that this is a pretty printing utility, and not a layer on top of TheoryModel. It adds getModel as an API method for returning the string representation of the model, analogous to our current support for getProof. This eliminates the last call to getSmtEngine() from the command layer.
2021-09-01Make driver::totalTime a TimerStat (#7089)Gereon Kremer
This makes the `driver::totalTime` statistic a `TimerStat`. This eliminates the need to obtain the overall runtime in the driver and write it to the statistics towards the end of the runtime. This not only eliminates some code in the driver, but also gets rid of the call to `getSmtEngine()` that goes around the API. One disclaimer: The statistics output changes from seconds as a double (i.e. `1.234`) to milliseconds (i.e. `1234ms`).
2021-09-01No longer use direct access to options in driver (#7094)Gereon Kremer
This PR refactors the driver to no longer directly access the Options object, but instead use Solver::getOption() or Solver::getOptionInfo().
2021-08-30Refactor filename handling (#7088)Gereon Kremer
This PR simplifies how we store the current input file name and handle setting and getting it. It is now an option, that can also be set and get via setInfo() and getInfo().
2021-08-27Add Driver options (#7078)Gereon Kremer
This PR adds a new API function Solver::getDriverOptions() which is used to communicate special options that (a) can not be properly communicated via getOption() and (b) need to be available in the driver (in a type-safe manner). As of now, this concerns the input stream and output streams. Furthermore, this PR refactors the driver to obtain them via the driver options instead of using the (deprecated) Solver::getOptions() method.
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-26Dump models for isNotEntailed results (#7071)Andrew Reynolds
This fixes a minor issue where models should be dumped for "not entailed" results. This fix was required when preparing the submission to CASC this year.
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-23Move options parsing code to main (#7054)Gereon Kremer
This PR moves the code responsible for parsing the command line to the main folder. Note that the options themselves, and converting strings to the options proper types, calling predicates etc, stays in libcvc5. The PR also slightly refactors the options code to get rid of the assign_* functions.
2021-08-23Use options correctly in competition mode (#7053)Gereon Kremer
Fix competition mode by accessing options in the correct way in main functions.
2021-08-20Make driver use options from the solver (#6930)Gereon Kremer
This PR removes explicit ownership of the options object from the main function and replaces it by an api::Solver object. To achieve this, it does a number of minor changes: - api::Solver not takes a unique_ptr<Options> in its constructor - CommandExecutor only holds a reference to (a unique ptr of) the api::Solver - the main functions accesses options via the solver
2021-08-20Add CVC5ApiOptionException (#6992)Gereon Kremer
This PR adds the new CVC5ApiOptionException. While the driver does not (and can not) do anything special for the two existing api exceptions, it can (and should) properly inform the user about incorrect command line option usage. The PR also removes the UnrecognizedOptionException. It is purely internal now, and immediately catched by the API wrapper. Having a separate exception for this is no longer useful. The additional catch block in main.cpp is only temporary until option parsing has been migrated to the driver and setting the options is done properly via the API.
2021-08-19Remove `--(no-)interactive-prompt` (#7022)Andres Noetzli
This option is mostly redundant: It offers a way to access the interactive shell without any copyright information or cvc5> prompt being printed. However, --no-interactive offers the same experience (except for the features offered by libedit).
2021-08-04Consolidate solver resets (#6986)Gereon Kremer
This PR consolidates the two different reset implementations into a single function.
2021-08-04Add optional debug information for dumping instantiations (#6950)Andrew Reynolds
This complete the implementation of dump-instantiations-debug. With this option, we can print the source of instantiations. For example: $ cvc5 regress1/quantifiers/dump-inst-proof.smt2 --dump-instantiations-debug --produce-proofs unsat (instantiations (forall ((x Int)) (or (P x) (Q x))) (! ( 2 ) :source QUANTIFIERS_INST_E_MATCHING_SIMPLE ((not (= (P x) true)))) ) (instantiations (forall ((x Int)) (or (not (S x)) (not (Q x)))) (! ( 2 ) :source QUANTIFIERS_INST_E_MATCHING_SIMPLE ((not (= (S x) false)))) )
2021-08-03Properly honor --stats-all and --stats-expert when printing statistics (#6967)Gereon Kremer
This PR fixes an issue that was introduced with fda4613 where printing the statistics would only show non-defaulted and non-expert options.
2021-07-31Perform statistics printing via the API (#6952)Gereon Kremer
This PR changes how the command executor prints the statistics by moving stuff around a bit, eventually using only proper API methods of api::Solver. This PR also removes the smt_engine.h include from command_executor.cpp.
2021-07-28Only use libedit on tty inputs (#6946)Gereon Kremer
This PR improves the check when we use libedit: only when the input is an interactive terminal. This is motivated by a change to the unit test for the interactive mode that now properly redirects standard input (and output).
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-14Clean up option usage in command executor (#6844)Gereon Kremer
This PR makes the CommandExecutor class use the options object from its SmtEngine instead of the driver one. This makes sure that options that are set via (set-option ...) are in effect for the CommandExecutor. It still stores the driver options, though, as they are used for resets. The PR also does some minor cleanups along the way (remove unused pOptions, make things const). Fixes #2376.
2021-06-23Remove `--tear-down-incremental` (#6745)Andres Noetzli
Recent experiments have shown that `--tear-down-incremental` is actually not really helping anymore and it has always been a bit of a workaround. It is also broken on current master. This commit removes the option.
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-09Push complex check inside GetInstantiationsCommand (#6715)Gereon Kremer
This PR pushes a rather complex check from the CommandExecutor inside the GetInstantiationsCommand. The aim is to only use the instFormatMode option in the library (command.cpp) but not the main driver (command_executor.cpp).
2021-06-08Remove `binary_name` option (#6693)Gereon Kremer
The binary_name is solely used as a temporary storage to pass the data from the options parser back to the runCvc5 method where it is put in a static variable. This PR gets rid of the option and the public option getter in favor of directly storing the program name in the static variable using an additional argument to parseOptions().
2021-06-06Support public option modules (#6691)Gereon Kremer
This PR adds the possibility to make option modules public. As shown on the example of the main driver options, this allows to get rid of the wrappers from options_public.h. We plan to make only very few option modules public (i.e. main and parser).
2021-06-04Add missing dereference (#6684)Gereon Kremer
2021-06-02Use proper variable name (#6670)Gereon Kremer
This PR fixes the driver which used an incorrect variable name in competition mode.
2021-06-02Move public wrapper functions out of options class (#6600)Gereon Kremer
This PR moves options wrapper functions out of the Options class. These wrapper functions are meant to be called by "external" code that should not access the options modules. This PR thereby significantly reduces the interface of the Options class.
2021-05-14Decouple parser creation from input selection (#6533)Andres Noetzli
This commit decouples the creation of a `Parser` instance from creating an `Input` and setting the `Input` on the parser. This is a first step in refactoring the parser infrastructure. A future PR will split the parser class into three classes: `Parser`, `ParserState`, and `InputParser`. The `Parser` and `InputParser` classes will be the public-facing classes. The new `Parser` class will have methods to create `InputParser`s from files, streams, and strings. `InputParser`s will have methods to get commands/exprs from a given input. The `ParserState` class will keep track of the state of the parser and will be the internal interface for the parsers. The current `Parser` class is used both publicly and internally, which is messy.
2021-05-13Always parse streams with line buffer (#6532)Andres Noetzli
When cvc5 was compiled in competition mode (but not for the application track), then it had a special behavior when reading from stdin. When it received input from stdin, it would read all of stdin and then parse the input as a string because it assumed that the full input is directly available on stdin. However, the non-application tracks of SMT-COMP do not use stdin anymore. They pass a filename to the solver. This special case is not used as a result. Usually, cvc5 parses from stdin using the line buffer, so this commit makes it so that this is always the case, which simplifies the code.
2021-05-12Use signal(sig, SIG_DFL); raise(sig); instead of abort() (#6518)Gereon Kremer
As discussed in #6484 (and https://www.gnu.org/software/libc/manual/html_node/Termination-in-Handler.html), simply calling std::abort at the end of a custom signal handler seems to be bad practice. As suggested, this PR changes these calls to instead first reset to the default signal handler for the given signal, and then calling it. Fixes #6484.
2021-04-28Remove exception headers from options.h (#6456)Gereon Kremer
This PR removes two headers for exceptions from options.h, and instead pushes the includes to a couple of source files.
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-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-14Refactor / reimplement statistics (#6162)Gereon Kremer
This PR refactors how we collect statistics. It splits the current statistic values into the values and a proxy object. The actual values now live inside the registry (making the ownership model way easier) while the proxy object are handed to whoever wants to collect a new statistic. It also extends the C++ API to obtain and inspect the statistics. To change the ownership, this PR needs to touch every single statistic in the whole codebase and change how it is registered.
2021-04-12Refactor and update copyright headers. (#6316)Aina Niemetz
2021-04-09Rename CVC4_ macros to CVC5_. (#6327)Aina Niemetz
2021-04-09Rename CVC4__ header guards to CVC5__. (#6326)Aina Niemetz
2021-04-05New C++ Api: Rename and move headers. (#6292)Aina Niemetz
2021-04-02cmake: Do not link against main object library. (#6269)Mathias Preiner
CMake 3.10.2 (default on Ubuntu 18.04) does not allow target_link_libraries on object libraries.
2021-04-02Minor refactoring (#6273)Gereon Kremer
This PR does some minor refactorings in preparation for the new statistics: some renamings, removal of now obsolete code and usage of references instead of pointers.
2021-04-01Refactor CLN dependency & Cleanup (#6251)Gereon Kremer
This PR migrates CLN to a new Find script and adds the possibility to install CLN if not found in the system. Also, it does a bit of cleanup.
2021-04-01Rename namespace CVC5 to cvc5. (#6258)Aina Niemetz
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback