MikolasJanota [Fri, 3 Sep 2021 22:59:46 +0000 (00:59 +0200)]
Avoiding duplicate search in maps (#7055)
This commit identifies a couple of scenarios where an operation required
2 searches into a map/hashmap and replaces them with a single search.
This also makes the code shorter.
Signed-off-by: Mikolas Janota <mikolas.janota@gmail.com>
Aina Niemetz [Fri, 3 Sep 2021 22:36:44 +0000 (15:36 -0700)]
sygus: Make more classes derive from EnvObj. (#7140)
Gereon Kremer [Fri, 3 Sep 2021 19:12:13 +0000 (12:12 -0700)]
Refactor option sanitizations (#7129)
This PR refactors the code that performs sanity checks on the parsed option data.
Andrew Reynolds [Fri, 3 Sep 2021 18:42:18 +0000 (13:42 -0500)]
Standardize Rewriter::rewriteViaMethod call (#7119)
This moves the standard method for rewrites in proofs from TheoryBuiltinProofRuleChecker to Rewriter. The motivation for this change is to make various kinds of rewrite methods (standard rewrite, extended rewrite, extended equality rewrite, evaluate) accessible throughout the code in a standard way. After this PR, it is possible to know variants of the REWRITE proof rule application by having access to the rewriter, instead of having to get the builtin proof rule checker. Note that TheoryBuiltinProofRuleChecker::applyRewrite *cannot* be static since access to the rewriter is not longer permitted to be static.
It also removes some unused infrastructure from Rewriter.
Followup PRs will remove applyRewrite for TheoryBuiltinProofRuleChecker in favor of calling the rewriter directly.
Gereon Kremer [Fri, 3 Sep 2021 18:26:29 +0000 (11:26 -0700)]
Check that alternate is only set for bool (#7125)
This PR slightly changes how the alternate option property is handled and explicitly checks that alternate is only set for bool options.
Gereon Kremer [Fri, 3 Sep 2021 18:02:58 +0000 (11:02 -0700)]
Refactor options::get() and options::getNames() (#7135)
This PR refactors the code generation and the generated code for options::get() and options::getNames().
Andrew Reynolds [Fri, 3 Sep 2021 17:09:57 +0000 (12:09 -0500)]
Make quantifier module classes derive from EnvObj (#7132)
Aina Niemetz [Fri, 3 Sep 2021 16:54:41 +0000 (09:54 -0700)]
sygus: Make CeSingleInv derive from EnvObj. (#7136)
This further reorders the header according to the code style guidelines.
Andrew Reynolds [Fri, 3 Sep 2021 16:33:27 +0000 (11:33 -0500)]
Eliminate backwards ref to SmtEngine from abduction and interpol solvers (#7133)
Aina Niemetz [Fri, 3 Sep 2021 12:34:27 +0000 (05:34 -0700)]
theory: Have more classes in theory with reference to Env derive from EnvObj. (#7130)
Aina Niemetz [Fri, 3 Sep 2021 01:27:30 +0000 (18:27 -0700)]
theory: Have Theory and TheoryArith* derive from EnvObj. (#7128)
Note: the diff in theory.h is only huge because of small changes that caused huge reformat. The effective change is only that it now derives from EnvObj, does not have a member d_env (because it inherits it) and does not need getLogicInfo (because that's in EnvObj).
Gereon Kremer [Fri, 3 Sep 2021 00:42:00 +0000 (17:42 -0700)]
Remove "experimental" options (#7124)
This PR changes all options from experimental to expert and adds a check that only the well-defined option categories are used (common, regular, expert, undocumented).
Aina Niemetz [Fri, 3 Sep 2021 00:31:25 +0000 (17:31 -0700)]
pp: Have PreprocessingPassContext derive from EnvObj. (#7127)
Andrew Reynolds [Thu, 2 Sep 2021 22:32:49 +0000 (17:32 -0500)]
Add LFSC node converter (#6944)
This utility converts from terms used in the internal calculus to terms that capture how they should be printed in LFSC.
Gereon Kremer [Thu, 2 Sep 2021 21:34:40 +0000 (14:34 -0700)]
Refactor options handlers (#7080)
This PR does a major refactoring to the default option handlers (i.e. the piece of code that converts strings to the respective option types). It gets rid of the current multi-layer template specialization in favor of a simple overloaded template function.
Andres Noetzli [Thu, 2 Sep 2021 20:05:59 +0000 (13:05 -0700)]
[Unit Tests] Fix shell test for Editline (#7117)
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.
Aina Niemetz [Thu, 2 Sep 2021 19:55:08 +0000 (12:55 -0700)]
Disable sygus-inst for regression close to time limit. (#7122)
Aina Niemetz [Thu, 2 Sep 2021 19:04:11 +0000 (12:04 -0700)]
EnvObj: Restrict access. (#7121)
This makes all members of EnvObj protected in order to prevent creating
EnvObj instances and call member functions. It further uses protected
inheritance (instead of public) for derived classes in order to disallow
`EnvObj* a = new DerivedObj();`.
Gereon Kremer [Thu, 2 Sep 2021 18:50:18 +0000 (11:50 -0700)]
Add API check whether option in getOptionInfo() exists (#7093)
This PR adds a missing check in the API for getOptionInfo().
Gereon Kremer [Thu, 2 Sep 2021 18:21:56 +0000 (11:21 -0700)]
Driver & Options cleanup (#7109)
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.
Andrew Reynolds [Thu, 2 Sep 2021 18:06:46 +0000 (13:06 -0500)]
Remove more instances of ufHo (#7087)
Towards replacing that option with a logic check throughout.
Gereon Kremer [Thu, 2 Sep 2021 17:46:47 +0000 (10:46 -0700)]
Remove options::getAll() (#7111)
options::getAll() returns a list of all options and their current values as strings. The same functionality can be obtained by using options::getNames() and options::get(). This PR does exactly this replacement, getting rid of a large chunk of generated code. Calling getInfo("all-options") may suffer a minor performance hit, but not noticeable in practice.
Andres Noetzli [Thu, 2 Sep 2021 17:19:35 +0000 (10:19 -0700)]
[CI] Add step for running unit/API tests (#7116)
Currently, we configure one of our builds to include unit tests but then
do not compile and run them. This commit adds a step to compile and run
the unit/API tests.
Andrew Reynolds [Thu, 2 Sep 2021 17:02:46 +0000 (12:02 -0500)]
Implement lazy proof checking modes (#7106)
This implements several variants of lazy proof checking in the core proof checker.
Note this extends the ProofNode class with an additional Boolean d_provenChecked indicating whether the d_proven field was checked by the underlying proof checker.
This PR updates the default proof checking mode to lazy. The previous default can now be enabled by --proof-check=eager-simple.
Aina Niemetz [Thu, 2 Sep 2021 16:43:29 +0000 (09:43 -0700)]
Remove PreprocessingPassContext::getSmt(). (#7118)
Andres Noetzli [Thu, 2 Sep 2021 12:26:28 +0000 (05:26 -0700)]
Remove unused `Backtracker` (#7115)
backtrackable.h was defining a datastructure Backtracker, which was
a member in ArrayInfo and Info but it was not doing anything.
Andres Noetzli [Thu, 2 Sep 2021 04:14:56 +0000 (21:14 -0700)]
[Unit Tests] Fix bags rewrite test (#7114)
PR #7103 did not quite fix the unit test: The types of the lambda and
the expected bags were still off. This fixes the unit test.
Aina Niemetz [Thu, 2 Sep 2021 03:44:06 +0000 (20:44 -0700)]
pp: Derive PreprocessingPass from EnvObj. (#7112)
Aina Niemetz [Thu, 2 Sep 2021 03:22:57 +0000 (20:22 -0700)]
Enable sygus-inst for FP, NIA and NRA. (#7098)
Aina Niemetz [Thu, 2 Sep 2021 02:57:21 +0000 (19:57 -0700)]
rewriter: Make rewriteEqualityExt non-static. (#7110)
More work towards getting rid of SmtEngine::currentSmtEngine and
closing #3468.
Aina Niemetz [Thu, 2 Sep 2021 02:10:42 +0000 (19:10 -0700)]
Add class EnvObj. (#7113)
This class will serve as base class for classes that need access to the
environment. This does not yet have classes derive from this base class.
Will update #7110 and #7112 to use this after this is in.
Andres Noetzli [Thu, 2 Sep 2021 00:42:59 +0000 (17:42 -0700)]
Update CI to macOS 11 (#7104)
`macos-latest` is currently using macOS 10.15, so this updates the CI to use `mac-11` (Big Sur).
Aina Niemetz [Wed, 1 Sep 2021 23:54:47 +0000 (16:54 -0700)]
Clean up and document PP context. (#7102)
This marks methods const where possible and adds missing documentation.
Aina Niemetz [Wed, 1 Sep 2021 19:24:03 +0000 (12:24 -0700)]
Clean up TheoryEngine header according to code style guidelines. (#7107)
Haniel Barbosa [Wed, 1 Sep 2021 18:31:56 +0000 (15:31 -0300)]
[proof] [sat] Fix lost reference to reason when processing redundant literals (#7108)
Similarly to the issue when explaining literals, it's necassary to save the
reference to the reason for propagating a redundant literal, as adding
explanations that may be added to the SAT solver during the recursive
elimination of redundant literals may change the original reference.
Andrew Reynolds [Wed, 1 Sep 2021 18:05:48 +0000 (13:05 -0500)]
Print response to get-model using the API (#7084)
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.
Aina Niemetz [Wed, 1 Sep 2021 14:24:02 +0000 (07:24 -0700)]
rewriter: Make registerTheoryRewriter non-static. (#7101)
More work towards getting rid of SmtEngine::currentSmtEngine and
closing #3468.
mudathirmahgoub [Wed, 1 Sep 2021 13:47:26 +0000 (08:47 -0500)]
Fixed TestTheoryWhiteBagsRewriter.map failure (#7103)
Fixed TestTheoryWhiteBagsRewriter.map failure
Andrew Reynolds [Wed, 1 Sep 2021 02:51:46 +0000 (21:51 -0500)]
Fix issues with cyclic proofs due to double SYMM applications (#7083)
Our way of constructing proofs from the equality engine in very rare cases may cause cyclic proofs due to constructing double applications of SYMM, which are not recognized as assumptions in CDProof. This is due to an interplay between LazyProofChain using an underlying CDProof as its default proof generator, where the proof chain would use the proofs from the CDProof to form a cyclic proof.
This was encountered in 9 SMT-LIB benchmarks in QF_SLIA.
This makes us safer in several places related to double SYMM steps.
Gereon Kremer [Wed, 1 Sep 2021 02:00:58 +0000 (19:00 -0700)]
Make driver::totalTime a TimerStat (#7089)
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`).
Gereon Kremer [Wed, 1 Sep 2021 01:17:24 +0000 (18:17 -0700)]
No longer use direct access to options in driver (#7094)
This PR refactors the driver to no longer directly access the Options object, but instead use Solver::getOption() or Solver::getOptionInfo().
Aina Niemetz [Wed, 1 Sep 2021 00:35:58 +0000 (17:35 -0700)]
rewriter: Make clearCaches non-static. (#7100)
This works towards getting rid of SmtEngine::currentSmtEngine and
closing #3468.
Andrew Reynolds [Wed, 1 Sep 2021 00:05:29 +0000 (19:05 -0500)]
Lazy proof reconstruction for strings theory solver (#7096)
This makes it so that we call the strings::InferProofCons::convert lazily, instead deferring to a temporary, trusted STRING_INFERENCE rule.
This decreases our average proof overhead on commonly solved instances from 64% to 58% on QF_S + QF_SLIA. It also reduces timeouts significantly, from 2010 to 1460. (Note these numbers were with a slightly extended version of this branch that includes other pending PRs for proofs).
Also fixes one subtle issue where proof reconstruction was misusing sequential substitutions (leading to warnings during proof post-processing).
Aina Niemetz [Tue, 31 Aug 2021 22:26:25 +0000 (15:26 -0700)]
bv: Remove dump=bv-rewrites. (#7099)
This is work towards eliminating calls to currentSmtEngine.
This dump mode will become obsolete with the DSL, and is thus now
removed.
Gereon Kremer [Tue, 31 Aug 2021 19:27:55 +0000 (12:27 -0700)]
Make sure modes are sorted in ModeInfo (#7097)
This PR ensures that the possible modes returned in getOptionInfo() are always sorted. Their order would depend on the python dictionary ordering, which changed with a somewhat recent python version and thereby breaks our tests.
yoni206 [Tue, 31 Aug 2021 16:45:48 +0000 (19:45 +0300)]
bv-to-int-module: implementations and stubs for translating operators (#7086)
This PR introduces most of the code for the translation of terms with operators. Some methods are left as stubs for future PRs.
A unit test is added with sanity checks for all implemented operators.
Andrew Reynolds [Tue, 31 Aug 2021 14:07:48 +0000 (09:07 -0500)]
Fix normal forms context-dependent simplification for strings (#7090)
This corrects an issue in our context-dependent simplification which limited the cases it was applied.
Previously, we were using a best content heuristic when it was applicable to compute the substitution, even if we were in an effort where normal forms had been computed. The latter should always be used if possible, since normal forms always have at least as much or more concrete components.
Andrew Reynolds [Tue, 31 Aug 2021 12:43:05 +0000 (07:43 -0500)]
Make regular expression sort not closed enumerable (#7092)
This ensures we don't try to apply e.g. enumerative instantiation to quantified formulas over regular expressions, since no type enumerator exists for RE.
Fixes #6750.
Gereon Kremer [Mon, 30 Aug 2021 23:55:58 +0000 (16:55 -0700)]
Add API function to obtain information about a single option (#6980)
This PR adds api::Solver::getOptionInfo() that returns information about a single option, including its name, aliases, current and default value and its domain.
mudathirmahgoub [Mon, 30 Aug 2021 23:26:43 +0000 (18:26 -0500)]
Add kind BAG_MAP and its type rule to bags (#6503)
This PR adds kind BAG_MAP to bags.
Andrew Reynolds [Mon, 30 Aug 2021 22:36:15 +0000 (17:36 -0500)]
Further refactoring of set defaults for incompatibility methods (#7072)
This introduces standard methods for checking incompatible with models, unsat-cores, incremental, proofs.
There is one minor change in behavior in this PR.When bitblast=eager and models were enabled in combined logics, then the set defaults would change the bitblast mode to lazy. However, it would then in the same block complain that eager cannot be used in combination with incremental. After this PR, we won't complain in this case since we've already decided to change the bitblast mode to lazy.
Gereon Kremer [Mon, 30 Aug 2021 21:23:29 +0000 (14:23 -0700)]
Refactor filename handling (#7088)
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().
Andrew Reynolds [Mon, 30 Aug 2021 20:44:32 +0000 (15:44 -0500)]
Fix proof equality engine for "no-explain" premises (#7079)
There was an inconsistency between when the equality engine would explain a literal and when we would provide a proof for it. This led to rare cases where we over zealously provided a proof for a fact that should have been an assumption in the theory lemma proof.
This corrects the issue by ensuring that no-explain premises are explicitly marked via a new helper proof generator "AssumptionProofGenerator" which always supplies (ASSUME f) as the proof for f.
This corrects some proof checking errors on string benchmarks.
yoni206 [Mon, 30 Aug 2021 19:32:24 +0000 (22:32 +0300)]
python docs for Datatype-related classes (#7058)
Andrew Reynolds [Mon, 30 Aug 2021 19:10:27 +0000 (14:10 -0500)]
Fix quantifiers dynamic split module for parametric datatypes (#7085)
Fixes #6838.
Gereon Kremer [Fri, 27 Aug 2021 18:51:02 +0000 (11:51 -0700)]
Add Driver options (#7078)
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.
Gereon Kremer [Fri, 27 Aug 2021 18:23:15 +0000 (11:23 -0700)]
Handle languages as strings in driver (#7074)
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.
Andrew Reynolds [Fri, 27 Aug 2021 18:03:41 +0000 (13:03 -0500)]
Expand definitions in sygus operators at the SMT level (#7077)
Eliminates another call to currentSmtEngine.
This PR ensures we remember the mapping between operators that are embedded in sygus datatypes during preprocessing, instead of computing this within the sygus datatypes utilities when solving.
Andrew Reynolds [Fri, 27 Aug 2021 17:28:31 +0000 (12:28 -0500)]
Add n-ary match trie utility (#6909)
Towards rewrite rule reconstruction
Andrew Reynolds [Fri, 27 Aug 2021 15:36:27 +0000 (10:36 -0500)]
Add missing methods to Solver API for models (#7052)
This adds the last two remaining API methods required for implementing the text output of get-model on the API side.
A followup PR will implement GetModelCommand on the API side and eliminate the (last remaining) call to getSmtEngine() from the command layer.
This PR does some minor reorganization of the model cores code to account for the new interface. It also removes a deprecated interface from TheoryModel.
yoni206 [Fri, 27 Aug 2021 00:34:12 +0000 (03:34 +0300)]
Add `isNull` to cpp api tests, python api, and python api tests (#7059)
While working on API documentation for python, I noticed that isNull is not wrapped
by the python API. It is also not tested in the cpp API tests. This PR fixes both issues,
and also updates the python api tests accordingly.
Gereon Kremer [Thu, 26 Aug 2021 21:03:05 +0000 (14:03 -0700)]
Fix a subtle issues with squashing the docs-ci history (#7075)
The docs-cleanup job squashes all commits from the docs-ci repository that are older than one month. The current solution to retrieve the newest commit older than this one month erroneously relied on the commit date. As the script cherry-picks all newer commits, it should rather use the author date, though. Unfortunately, rev-list does not support filtering by author date, hence we use awk now...
Andrew Reynolds [Thu, 26 Aug 2021 16:55:59 +0000 (11:55 -0500)]
Eliminate currentSmtEngine for subsolver calls (#7068)
This eliminates another occurrence of smt::currentSmtEngine by making it required to pass options + logic for all subsolver calls.
Andrew Reynolds [Thu, 26 Aug 2021 16:32:09 +0000 (11:32 -0500)]
Dump models for isNotEntailed results (#7071)
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.
Andrew Reynolds [Thu, 26 Aug 2021 16:20:43 +0000 (11:20 -0500)]
Make datatype selector expansion to its own accessible method (#7069)
This eliminates another call to currentSmtEngine.
After this, there are only two remaining calls (one for normalizing sygus grammars wrt user define-funs, and the other for Rewriter::rewrite).
Gereon Kremer [Thu, 26 Aug 2021 14:19:56 +0000 (07:19 -0700)]
Improve integration of nonlinear arithmetic into the arithmetic theory. (#6956)
The nonlinear extension used to be called only during model construction, a rather atypical place which lead to a series of subtle issues. This PR moves it into the postCheck method. To do that, a few other changes are necessary, most notably collectAssertedTerms and collectTerms are moved back from the model manager into the theory class.
Mathias Preiner [Thu, 26 Aug 2021 00:50:53 +0000 (17:50 -0700)]
int2bv: Fix conversion of signed bit-vector values. (#7061)
This commit fixes the conversion of signed bit-vector values to integers in the int-to-bv preprocessing pass.
Gereon Kremer [Thu, 26 Aug 2021 00:19:41 +0000 (17:19 -0700)]
Consolidate language types (#7065)
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.
Gereon Kremer [Wed, 25 Aug 2021 18:01:26 +0000 (11:01 -0700)]
Add missing include (#7067)
This adds a missing include. Compilation fails right now, if libpoly is disabled.
Andrew Reynolds [Wed, 25 Aug 2021 16:27:03 +0000 (11:27 -0500)]
Eliminate calls to currentSmtEngine (#7060)
Work towards supporting multiple solvers running in parallel.
There are now only 5 remaining internal calls to smt::currentSmtEngine.
More will be eliminated on future PRs.
Andrew Reynolds [Tue, 24 Aug 2021 20:54:31 +0000 (15:54 -0500)]
Split higher-order term database (#7045)
This splits higher-order term database as a derived class of term database, thus separating higher-order specific things out of our core term database.
This eliminates many of the references to the deprecated option uf-ho.
This is work towards eliminating that option.
Andrew Reynolds [Tue, 24 Aug 2021 17:26:35 +0000 (12:26 -0500)]
Refactor enumerator management in synth conjecture (#6942)
This moves the method SynthConjecture::getEnumeratedValue to its own class, EnumManager.
It also integrates the sygus enumerator callback into the fast enumerator.
yoni206 [Tue, 24 Aug 2021 01:20:56 +0000 (04:20 +0300)]
bv-to-int: more implementations (#7051)
This PR introduces more implementations for the bv-to-int module. Once all implementations are in, this module will be called from the bv-to-int preprocessing pass, and the code there will be deleted.
Here we focus on the translation of nodes without children.
Unit tests are included.
Andrew Reynolds [Tue, 24 Aug 2021 01:09:31 +0000 (20:09 -0500)]
Top-level structure for set defaults (#7047)
This breaks setDefaults into three functions that summarize the high-level behavior of setDefaults.
Andrew Reynolds [Tue, 24 Aug 2021 00:33:18 +0000 (19:33 -0500)]
Uniform treatment of trusted theory inferences in proofs (#7044)
Makes it so that all theory-specific proof rules for this purpose are replaced by the generic THEORY_INFERENCE.
Andrew Reynolds [Tue, 24 Aug 2021 00:00:16 +0000 (19:00 -0500)]
Miscellaneous changes from proof-new (#7042)
Andrew Reynolds [Mon, 23 Aug 2021 22:15:41 +0000 (17:15 -0500)]
Fix non-deterministism in quantified datatypes expansion rewrite (#7036)
Required for properly checking proofs for quantifiers rewrites.
Andrew Reynolds [Mon, 23 Aug 2021 21:57:13 +0000 (16:57 -0500)]
Purify substitutions in strings proof reconstruction (#7035)
This fixes an issue in strings proof reconstruction where sequential substitutions are used over possibly non-atomic terms like (str.replace x a b) and x simultaneously.
This leads to cases where we failed to reconstruct proofs, since a substitution x -> c, (str.replace x a b) -> d may unintentionally generate the term (str.replace c a b), after which the second substitution fails to apply.
Andrew Reynolds [Mon, 23 Aug 2021 21:42:14 +0000 (16:42 -0500)]
Generalize inequality elimination in quantifiers rewriter (#7030)
This generalizes our inequality elimination technique to handle disequalities as well as inequalities.
#6999 is an example where a variable can be eliminated: if a variable x occurs only in an equality with negative required polarity, then the variable and that literal can be eliminated.
Fixes #6999.
Andrew Reynolds [Mon, 23 Aug 2021 20:45:38 +0000 (15:45 -0500)]
Fix single invocation partition for higher-order (#7046)
It was not robust to cases where a function-to-synthesize occurred in a higher-order context.
Also does general clean up of the single invocation utility.
Gereon Kremer [Mon, 23 Aug 2021 19:11:13 +0000 (12:11 -0700)]
Move options parsing code to main (#7054)
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.
yoni206 [Mon, 23 Aug 2021 17:01:39 +0000 (20:01 +0300)]
Adding parameters to Datatype python API documentation (#7027)
Aina Niemetz [Mon, 23 Aug 2021 16:50:06 +0000 (09:50 -0700)]
api: Require size argument for mkBitVector. (#6998)
This removes support for creating bit-vectors from a string without a
size argument. We further also now require that the base argument is
always given (it has no default value).
Gereon Kremer [Mon, 23 Aug 2021 15:37:47 +0000 (08:37 -0700)]
Use options correctly in competition mode (#7053)
Fix competition mode by accessing options in the correct way in main functions.
Andrew Reynolds [Sun, 22 Aug 2021 20:03:08 +0000 (15:03 -0500)]
Simplify model printing modes (#7049)
This removes the model printing mode options::ModelUninterpPrintMode::DtEnum which was previously used to print uninterpreted sorts as enumeration datatypes in the model. This mode was to my knowledge never used and moreover will not be easy to implement in the API.
This is work towards finalizing the API for models.
This PR also removes a file that I failed to delete in a recent PR.
Andrew Reynolds [Sun, 22 Aug 2021 19:37:50 +0000 (14:37 -0500)]
Prenex quantified formulas with user annotations by default (#7048)
Our policy is now accurate to the help message on prenexUserQuant: we only prenex quantified formulas if they do not have user-provided patterns. Previously we also did not prenex any quantified formulas with any annotations.
This should avoid some more "unknown" responses on facebook benchmarks.
Also fixes a minor issue with when we print warnings about quantified formulas with no triggers.
FYI @barrettcw .
Gereon Kremer [Fri, 20 Aug 2021 21:47:04 +0000 (14:47 -0700)]
Make driver use options from the solver (#6930)
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
Andrew Reynolds [Fri, 20 Aug 2021 21:08:52 +0000 (16:08 -0500)]
Simplify how user-provided quantifier attributes are handled (#6963)
This makes INST_ATTRIBUTE (optionally) take multiple children, giving a way for the user to set attributes on quantified formulas, which does not require a new API command.
This is a special case of term annotations that occur as the body of a quantified formula.
If we need to extend our API to support further user-provided attributes, we should use a similar approach, e.g. a new kind ANNOTATE.
mudathirmahgoub [Fri, 20 Aug 2021 19:30:29 +0000 (14:30 -0500)]
Add Term.java to the Java API (#6330)
This commit adds `Term.java`, `TermTest.java`, and `cvc5_Term.cpp` to the Java API.
Andrew Reynolds [Fri, 20 Aug 2021 19:19:30 +0000 (14:19 -0500)]
More refactoring of set defaults (#7043)
A few minor changes to which options are enabled for sygus, otherwise no intended changes.
Andrew Reynolds [Fri, 20 Aug 2021 02:34:45 +0000 (21:34 -0500)]
Support sygus standard command syntax set-feature (#7040)
This currently has no effect other than giving an unsupported warning.
In the future, set-feature will be implemented via the appropriate call to Solver::setOption if necessary.
Fixes #6182.
Andrew Reynolds [Fri, 20 Aug 2021 01:51:33 +0000 (20:51 -0500)]
Eliminate eager model building (#7038)
Previously, we had a special case to support users who directly accessed the model object pointer in the old API.
The special case ensure that the information in the model was eagerly updated after each "sat" response, in the case that the user did not re-request a pointer to the model.
Since users no longer can access the internal model pointer (apart from GetModelCommand), this special case is no longer necessary.
This PR should make us slightly faster for incremental benchmarks where the user asks for the model on some but not all "sat" responses.
Gereon Kremer [Fri, 20 Aug 2021 01:30:31 +0000 (18:30 -0700)]
Use Env class in nonlinear extension (#7039)
This PR refactors the nonlinear extension(s) to access options only via the environment class.
Gereon Kremer [Fri, 20 Aug 2021 00:31:58 +0000 (17:31 -0700)]
Add CVC5ApiOptionException (#6992)
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.
yoni206 [Thu, 19 Aug 2021 23:43:13 +0000 (02:43 +0300)]
Make the python quickstart example run using ctest (#7023)
yoni206 [Thu, 19 Aug 2021 23:32:57 +0000 (02:32 +0300)]
Add python quick start guide (#7024)
Andres Noetzli [Thu, 19 Aug 2021 23:03:13 +0000 (16:03 -0700)]
Remove `--(no-)interactive-prompt` (#7022)
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).
Andrew Reynolds [Thu, 19 Aug 2021 22:40:05 +0000 (17:40 -0500)]
Catch cases where recursive functions reference functions-to-synthesize (#6993)
We previously incorrectly allowed this, leading to problems that were unsolvable but where we would not warn the user this combination is not supported.
FYI @polgreen
Andrew Reynolds [Thu, 19 Aug 2021 18:48:42 +0000 (13:48 -0500)]
Split proof final callback to its own file (#6984)
Andrew Reynolds [Thu, 19 Aug 2021 18:32:50 +0000 (13:32 -0500)]
Refactor proof output for TPTP (#7029)
This eliminates the old option "inst format mode" and makes proof output for TPTP organized as an ordinary proof output format.