Andrew Reynolds [Thu, 9 Dec 2021 14:38:28 +0000 (08:38 -0600)]
Do not make SyGuS subsolver in unsat state after solving (#7759)
This makes subsolvers answer "unknown" instead of "unsat" when solving SyGuS inputs, by setting unknown when a SyGuS input is solved instead of asserting the negation of the input. Knowing whether the call was successful is simply obtained by calling getSynthSolutions.
This will allow for multiple solutions for the same conjecture.
Aina Niemetz [Thu, 9 Dec 2021 06:02:10 +0000 (22:02 -0800)]
api: Add note to Sort::getTesterCodomainSort(). (#7776)
Mathias Preiner [Thu, 9 Dec 2021 03:20:28 +0000 (19:20 -0800)]
test: Remove CDList memory limit test. (#7777)
This test is of little usefulness and has issues with different platforms (mac) and architectures (arm64).
Andrew Reynolds [Wed, 8 Dec 2021 23:48:30 +0000 (17:48 -0600)]
Return bool for lemmaTheoryInference (#7773)
Gereon Kremer [Wed, 8 Dec 2021 23:25:19 +0000 (15:25 -0800)]
Remove rewrites from iand and pow2 solvers (#7775)
This PR removes some more static calls to the rewriter from the iand and pow2 solvers.
Gereon Kremer [Wed, 8 Dec 2021 22:48:36 +0000 (14:48 -0800)]
Eliminate rewriter from transcendental solver (#7772)
This PR eliminates all static calls to the rewriter from the transcendental solver. We now either use the rewriter from the Env object or the theory evaluator. For this to work, the evaluator is extended to support division. In some places, the rewriting was removed altogether.
Gereon Kremer [Wed, 8 Dec 2021 22:15:18 +0000 (14:15 -0800)]
Static options acceses again (#7771)
This PR removes some more static accesses to options from strings and solver engine.
Andrew Reynolds [Wed, 8 Dec 2021 19:25:37 +0000 (13:25 -0600)]
Make several regressions faster (#7769)
This makes several slow regressions faster, mostly by changing options. It changes a strings regression to be faster by making it smaller.
This should avoid timeouts on https://cvc5-buildbot.stanford.edu/.
Andrew Reynolds [Wed, 8 Dec 2021 17:17:51 +0000 (11:17 -0600)]
Fix type rule for datatype updater for parametric sorts (#7762)
Fixes cvc5/cvc5-projects#379.
Fixes cvc5/cvc5-projects#378.
Gereon Kremer [Wed, 8 Dec 2021 04:16:03 +0000 (20:16 -0800)]
Turn kinds in python API into a proper Enum (#7686)
This PR does multiple things:
- the kinds are changed from custom objects to a proper enum.Enum class
(including according changes to the cython code and the kind generation scripts)
- all examples and tests are modified to account for the change how to use kinds
(Kind instead of kinds)
- add docstrings to the kind enum values
- add a custom documenter that properly renders enums via autodoc
- extend doxygen setup so that we can write comments as rst (allowing us to copy
the documentation for kinds from the cpp api to the other apis)
Aina Niemetz [Wed, 8 Dec 2021 03:51:47 +0000 (19:51 -0800)]
api: Improve documentation for getDatatypeParamSorts(). (#7763)
Aina Niemetz [Wed, 8 Dec 2021 03:22:04 +0000 (19:22 -0800)]
api: Fix Sort::getDatatypeArity() for non-parametric datatypes. (#7766)
Fixes cvc5/cvc5-projects#380
Aina Niemetz [Wed, 8 Dec 2021 02:51:40 +0000 (18:51 -0800)]
FP: Remove static call to Rewriter. (#7765)
Gereon Kremer [Wed, 8 Dec 2021 00:14:55 +0000 (16:14 -0800)]
Improve options tests (#7761)
This PR adds unit tests for a few more corners of the options code.
Gereon Kremer [Tue, 7 Dec 2021 23:47:15 +0000 (15:47 -0800)]
Remove more static accesses to options (#7764)
This PR removes a bunch of the remaining places where options are accessed statically.
Gereon Kremer [Tue, 7 Dec 2021 23:26:52 +0000 (15:26 -0800)]
Simpler versioning if release flag is set (#7758)
Following some discussion, this PR introduces a simpler versioning scheme if the CVC5_IS_RELEASE flag is set.
In our regular versioning scheme, the first commit after release x.y.z has the version x.y.(z+1)-dev.1.
abcdef0. Some users however may want to apply some patches, and still have cvc5 show the release version.
With this PR, the version printed (if any commits are present since the tag) is x.y.z-modified if the CVC5_IS_RELEASE flag is still true. We always set it to false immediately after the tagged commit, so it does not change the versions printed by mainline cvc5.
Andrew Reynolds [Tue, 7 Dec 2021 22:40:40 +0000 (16:40 -0600)]
Add proof annotation option (#7750)
Adds --proof-annotate which enables a useful stat in which we count the number of times a lemma with a given inference id appears in a final proof.
This can be used to determine which lemma schemas are the most useful for showing a problem unsat.
mudathirmahgoub [Tue, 7 Dec 2021 22:16:33 +0000 (16:16 -0600)]
Fix some java documentation links (#7757)
Lachnitt [Tue, 7 Dec 2021 20:52:13 +0000 (12:52 -0800)]
[proofs] Alethe: Add ARITH_TRICHOTOMY to updater (#7753)
Translation of the ARITH_TRICHOTOMY rule into the Alethe calculus.
Co-authored-by: Haniel Barbosa <hanielbbarbosa@gmail.com>
Lachnitt [Tue, 7 Dec 2021 20:25:03 +0000 (12:25 -0800)]
[proofs] Alethe: Fix Bug in Finalize (#7746)
Assumptions in Alethe are printed as (or F1 ... Fn) but should be treated as if they are printed as (cl (or F1 ... Fn)). Thus, if in the post visit it is checked whether an additional or step is needed this has to be treated as a special case.
Andrew Reynolds [Tue, 7 Dec 2021 19:01:11 +0000 (13:01 -0600)]
Allow sygus in incremental mode (#7756)
This allows the basic use of SyGuS in incremental mode, where constraints can be pushed/popped.
It does not yet support getting multiple solutions for the same set of constraints, which will require more significant changes.
Andrew Reynolds [Tue, 7 Dec 2021 17:28:39 +0000 (11:28 -0600)]
Make data structures in relevance manager SAT-context dependent (#7733)
This PR significantly improves the quality of values in get-difficulty. It fixes several bugs related to get-difficulty, including over-pruning values in ProofManager, and not tracking explanations for certain literals. It also improves performance by tracking justifications in relevance manager in a SAT-context dependent manner.
This is to support difficulty measurements based on lemmas sent at STANDARD effort.
It also adds 2 simple regressions.
A further PR will further improve the quality by being more careful about the relationships between literals and the assertions that entail that they are relevant.
Andrew Reynolds [Tue, 7 Dec 2021 17:01:05 +0000 (11:01 -0600)]
Eliminate more static calls to Rewriter::rewrite (#7755)
Andrew Reynolds [Tue, 7 Dec 2021 15:46:49 +0000 (09:46 -0600)]
Towards support for incremental sygus (#7736)
This makes several key changes to smt::SygusSolver in preparation for incremental mode.
The key idea is to use a subsolver that:
may take multiple check-sat commands for an encoded synthesis conjecture
does not push/pop
is reconstructed when the SyGuS conjecture becomes stale.
This is motivated by 2 use cases of incremental SyGuS:
Where constraints are push/pop, in which case we should start from scratch, since the SyGuS solver uses symmetry breaking techniques that become unsound when new constraints are added.
Where multiple solutions are needed for the same set of constraints, in which the state of the subsolver should be preserved.
This functionality is still guarded by an exception.
A follow up PR will make several further changes to allow for the above use cases.
Andrew Reynolds [Tue, 7 Dec 2021 14:56:12 +0000 (08:56 -0600)]
Eliminate more static calls to Rewriter::rewrite (#7740)
makaimann [Tue, 7 Dec 2021 02:16:09 +0000 (18:16 -0800)]
Add bitwise option to IntBlaster (#7721)
This is part of a series of PRs by @yoni206 to add full int-blasting support to the master branch of `cvc5`. This adds support for the bitwise encoding to `IntBlaster`. Future PRs would unify the `bv2int` and `IntBlaster` helper functions.
Gereon Kremer [Tue, 7 Dec 2021 01:46:54 +0000 (17:46 -0800)]
Fix 32bit issue in sep_log_api test (#7752)
This uses the proper `t.getInt64Value()` getter instead of `std::stoll(t.toString())`, fixing an issue on 32bit platforms.
mudathirmahgoub [Tue, 7 Dec 2021 01:31:47 +0000 (19:31 -0600)]
Add documentation for QuickStart.java (#7730)
Improve java documentation: add QuickStart and a java API overview.
Gereon Kremer [Mon, 6 Dec 2021 20:30:53 +0000 (12:30 -0800)]
Disable option regression for competition build (#7751)
This disables a regression that checks the didyoumean output for an invalid output on competition builds. On competition builds, we simply print "unknown" instead of shown any exceptions.
Gereon Kremer [Mon, 6 Dec 2021 18:42:29 +0000 (10:42 -0800)]
Use unique_ptr instead of raw pointers (#7749)
This PR fixes a memory leak when invalid values are supplied to the stream options err, in or out. Whenever opening the stream would fail, we throw an exception and the created (though not properly opened) stream is leaked.
We now properly wrap the streams in unqiue_ptrs directly on creation.
Andrew Reynolds [Mon, 6 Dec 2021 18:27:11 +0000 (12:27 -0600)]
Add regressions for fixed projects issues (#7739)
Fixes cvc5/cvc5-projects#164.
Fixes cvc5/cvc5-projects#172.
Fixes cvc5/cvc5-projects#175.
Fixes cvc5/cvc5-projects#178.
Fixes cvc5/cvc5-projects#181.
Fixes cvc5/cvc5-projects#183.
Fixes cvc5/cvc5-projects#185.
Gereon Kremer [Sat, 4 Dec 2021 01:40:40 +0000 (17:40 -0800)]
More robust fix for 32bit issues. (#7735)
This PR implements a more robust fix for the 32bit issues with GMP. Relying on mpz_sizeinbase proves to be very tricky for the corner cases. This PR instead does a simple comparison against the min and max values of the respective types.
Lachnitt [Fri, 3 Dec 2021 23:39:38 +0000 (15:39 -0800)]
[proofs] Alethe: Implementation of Process Function (#7745)
Add call to updater and finalizer to process function of the AlethePostProcessor.
Co-authored-by: Haniel Barbosa <hanielbbarbosa@gmail.com>
Aina Niemetz [Fri, 3 Dec 2021 22:12:14 +0000 (14:12 -0800)]
api: Fix docs for TUPLE_PROJECT. (#7741)
Andres Noetzli [Fri, 3 Dec 2021 21:36:16 +0000 (13:36 -0800)]
Faster hasing for `cvc5::String` (#7742)
Previously, our hashing algorithm for cvc5::String would create an
std::string representation of the string and then call
std::hash<std::string> on the result. Creating the temporary
std::string is quite expensive and can be avoided by computing the
hash directly on the elements of the vector of characters in
cvc5::String.
This change improves our solving time on an industrial benchmark from
about 59s to 55s.
Gereon Kremer [Fri, 3 Dec 2021 19:07:46 +0000 (11:07 -0800)]
Fix a few broken links (#7734)
This PR fixes a few broken links in our documentation.
Andrew Reynolds [Fri, 3 Dec 2021 18:38:40 +0000 (12:38 -0600)]
Check constructor is used in APPLY_CONSTRUCTOR (#7737)
Fixes cvc5/cvc5-projects#373.
Andrew Reynolds [Fri, 3 Dec 2021 17:57:11 +0000 (11:57 -0600)]
Proper error for using constructor in multiple datatypes (#7738)
Now gives error cannot use a constructor for multiple datatypes.
Fixes cvc5/cvc5-projects#372.
Gereon Kremer [Thu, 2 Dec 2021 22:33:04 +0000 (14:33 -0800)]
Add explicit 64bit getters for Integer class (#7728)
This PR addresses a few issues on our 32bit builds. Most importantly, it adds int64_t Integer::getSigned64() and uint64_t Integer::getUnsigned64().
Gereon Kremer [Thu, 2 Dec 2021 21:19:15 +0000 (13:19 -0800)]
Remove void as possible option type (#7731)
This PR removes the possibility to have void options. While there are (very) few options that may legitimately be considered void (they do not actually hold a value, but merely trigger a handler or predicate), the type being void introduces a number of special cases in the options setup. Their only real benefit was to avoid having data members that would never be used.
As it turns out, though, the same can be achieved by not specifying a name, which already supported as well.
Gereon Kremer [Thu, 2 Dec 2021 19:48:21 +0000 (11:48 -0800)]
Check docs for broken links before uploading (#7729)
We currently have a few broken links in our documentation. This PR make our CI check for broken links before uploading it. Note that it will not fail any job, so we still need to check the output occasionally for now.
Andrew Reynolds [Thu, 2 Dec 2021 17:12:10 +0000 (11:12 -0600)]
Fixes for sygus-rr-synth-input (#7716)
Includes aborting when no non-constant subterms exist, a spurious assertion failure, and bad variable names.
Fixes cvc5/cvc5-projects#351
Fixes cvc5/cvc5-projects#353
Haniel Barbosa [Thu, 2 Dec 2021 16:43:10 +0000 (13:43 -0300)]
[proofs] Fix a trace in SAT proof manager (#7732)
mudathirmahgoub [Thu, 2 Dec 2021 02:12:30 +0000 (20:12 -0600)]
add bag.fold operator (#7718)
Gereon Kremer [Thu, 2 Dec 2021 00:30:09 +0000 (16:30 -0800)]
Add unit tests for api::Solver::setOption() (#7708)
This PR adds a generic unit test for api::Solver::setOption(). It iterates over all options and calls setOption() with somewhat cleverly chosen values according to getOptionInfo().
While building this, it occurred to me that calling std::exit() in an option handler is weird (for example for version) and we should do this in the driver instead. This PR also refactors this issue, moving all calls to std::exit() from the option handlers into the driver.
Mathias Preiner [Wed, 1 Dec 2021 22:28:37 +0000 (14:28 -0800)]
api: Add missing bit-width 0 check to mkBVFromStrHelper. (#7727)
Haniel Barbosa [Wed, 1 Dec 2021 19:41:11 +0000 (16:41 -0300)]
[proofs] Add method to CDProof to obtain number of proof nodes (#7725)
Useful for example to easily see by how much a proof grew after some reconstruction expansion.
Lachnitt [Wed, 1 Dec 2021 19:12:37 +0000 (11:12 -0800)]
[proofs] Alethe: Add finalize function to insert missing OR steps (#7724)
A post visit that adds an OR step is needed in case a premise is printed as a singleton (cl (or F1 ... Fn)) but used as a clause (cl F1 ... Fn).
Co-authored-by: Haniel Barbosa <hanielbbarbosa@gmail.com>
Andrew Reynolds [Wed, 1 Dec 2021 17:16:42 +0000 (11:16 -0600)]
Improvements for get-difficulty (#7720)
This makes 2 improvements for get-difficulty:
(1) Ensures that we recompute relevance info for lemmas sent at STANDARD effort.
(2) An open proof error was reported by Certora using --produce-difficulty.
This makes get-difficulty more robust by ensuring that lemmas are not marked as having a difficulty. It also minimizes the cases where we mark lemmas as having a difficulty internally.
Gereon Kremer [Wed, 1 Dec 2021 16:32:16 +0000 (08:32 -0800)]
Add the first example for z3pycompat (#7722)
This PR adds the first example for the z3py compat API.
mudathirmahgoub [Wed, 1 Dec 2021 15:08:31 +0000 (09:08 -0600)]
Enable Java examples (#7702)
Lachnitt [Wed, 1 Dec 2021 02:46:26 +0000 (18:46 -0800)]
Alethe: Add function that adds final steps to proof (#7710)
There are some cases when the result has to be transformed, e.g. when it was printed as (cl false) which is correct everywhere except in the last step. This function then transforms the result into (cl).
Should be merged after PR #7675.
Co-authored-by: Haniel Barbosa hanielbbarbosa@gmail.com
yoni206 [Wed, 1 Dec 2021 01:38:45 +0000 (03:38 +0200)]
Translating API tests to Python — part 2 (#7651)
This PR translates the remaining cpp API tests to python.
Gereon Kremer [Wed, 1 Dec 2021 01:08:19 +0000 (17:08 -0800)]
Use new token for docs-release (#7709)
This PR uses the new CVC5_DOCS_RELEASE_TOKEN to make uploads to docs-release actually work.
Andrew Reynolds [Wed, 1 Dec 2021 00:40:33 +0000 (18:40 -0600)]
Remove spurious assertion in parser (#7713)
When global declarations are true, we do not push/pop the context of the symbol manager. This removes a spurious assertion that checked whether a pop in this case was greater than the actual context level of the symbol manager.
Fixes cvc5/cvc5-projects#370.
Andrew Reynolds [Wed, 1 Dec 2021 00:11:54 +0000 (18:11 -0600)]
Define sort undeclared (#7714)
Fixes cvc5/cvc5-projects#369.
Now gives:
(error "Parse Error: proj-369.smt2:3.22: Symbol 'Bool' previously declared as a type
(define-sort _s0 (Bool Bool Bool Bool Bool Bool Bool Bool Bool) Bool)
^
")
yoni206 [Tue, 30 Nov 2021 23:38:44 +0000 (01:38 +0200)]
Translating more cpp API unit tests to python (#7669)
This translates the majority of the tests from https://github.com/cvc5/cvc5/blob/master/test/unit/api/cpp/solver_black.cpp that were not translated yet, to python.
Additionally, some minor renames and `yapf` formatting is done the the existing tests.
Gereon Kremer [Tue, 30 Nov 2021 23:10:30 +0000 (15:10 -0800)]
Always run update-pr (#7719)
This removes the event condition on the `update-pr` ci job. Right now, it is not run although it should.
Gereon Kremer [Tue, 30 Nov 2021 22:37:30 +0000 (14:37 -0800)]
Extend docs example extension (#7717)
This PR extends the custom sphinx extension for examples. It now allows for simple patterns in the file names and matches the file types using arbitrary regular expressions instead of just looking at the file extensions. This is necessary to integrate examples from the z3pycompat API: the examples live at a nontrivial place (in the build folder), which we inject via the file name patterns; we will have two separate examples which both end in .py but can be distinguished via the pattern used in the beginning.
Mathias Preiner [Tue, 30 Nov 2021 22:17:42 +0000 (14:17 -0800)]
Change CVC4 urls to cvc5. (#7706)
This commit will change the URLs to the new cvc5 nightly builds and coverage
information.
Andrew Reynolds [Tue, 30 Nov 2021 21:25:20 +0000 (15:25 -0600)]
Add rewrite for is_int pi (#7711)
Fixes cvc5/cvc5-projects#365.
Fixes cvc5/cvc5-projects#356.
Alex Ozdemir [Tue, 30 Nov 2021 21:06:30 +0000 (13:06 -0800)]
Scaffold the idiomatic API's documentation (#7715)
Scaffolding the documentation, and fleshing it out for the Boolean functions and terms.
Andrew Reynolds [Tue, 30 Nov 2021 20:30:45 +0000 (14:30 -0600)]
Generalize eager length bound conflicts for regular expression memberships (#7633)
This generalizes eager length bound conflicts to take into account regular expression memberships.
For example:
If `(str.in_re x (re.++ (re.* re.allchar) (str.to_re "abc") (re.* re.allchar))` is asserted, then we know `(str.len x) >= 3`.
If e.g. equivalence class of `x` is merged with `(str.substr y 0 2)`, we get the conflict
`(and (str.in_re x (re.++ (re.* re.allchar) (str.to_re "abc") (re.* re.allchar)) (= x (str.substr y 0 2))`
since `(str.len (str.substr y 0 2)) <= 2`.
This also does some minor refactoring to eager prefix conflicts to make it more analogous to our implementation of length conflicts.
Andrew Reynolds [Tue, 30 Nov 2021 20:13:47 +0000 (14:13 -0600)]
Proper check for first-class types in datatype subfields (#7712)
Fixes two issues with our check for datatype subfields (isFunctionLike -> isFirstClass): functions should be allowed, RegLan should not.
Fixes cvc5/cvc5-projects#368. That issue now throws an error:
(error "Parse Error: proj-368.smt2:3.39: cannot use fields in datatypes that are not first class types
(declare-datatype x ((_x (x8 RegLan))))
^
")
This adds a regression showing we allow functions as subfields.
Lachnitt [Tue, 30 Nov 2021 17:45:31 +0000 (09:45 -0800)]
Alethe: Further Printer Implementation (#7675)
Adds implementation of PrintInternal a function to print a proof node after the first step has been printed.
Should be merged after PR #7674.
Co-authored-by: Haniel Barbosa hanielbbarbosa@gmail.com
Lachnitt [Tue, 30 Nov 2021 16:54:31 +0000 (08:54 -0800)]
[proofs] Alethe: Implementation of Printer (#7674)
Adds an implementation file of the Alethe printer with function stubs to be filled in in further PRs.
Co-authored-by: Haniel Barbosa <hanielbbarbosa@gmail.com>
Gereon Kremer [Tue, 30 Nov 2021 15:37:38 +0000 (07:37 -0800)]
Remove now unused dumping infrastructure (#7703)
This PR removes the old dumping infrastructure. All dumping has already been migrated to -o.
Lachnitt [Tue, 30 Nov 2021 14:50:54 +0000 (06:50 -0800)]
[proofs] Alethe: Printer Specification (#7673)
Header of the Alethe printer
Co-authored-by: Haniel Barbosa <hanielbbarbosa@gmail.com>
Gereon Kremer [Mon, 29 Nov 2021 21:51:17 +0000 (13:51 -0800)]
Fix minor issues (#7704)
This fixes a few minor coverity issues.
Mathias Preiner [Mon, 29 Nov 2021 21:26:25 +0000 (13:26 -0800)]
Start post-release for 0.0.4
Mathias Preiner [Mon, 29 Nov 2021 21:26:25 +0000 (13:26 -0800)]
Bump version to 0.0.4
Sujit Kumar Muduli [Mon, 29 Nov 2021 16:37:36 +0000 (22:07 +0530)]
Bug in printing parameter list in define_fun_to_string (#7700)
Signed-off-by: Sujit Muduli <smuduli@cse.iitk.ac.in>
Gereon Kremer [Thu, 25 Nov 2021 04:31:09 +0000 (20:31 -0800)]
Consolidate CI jobs (#7697)
This PR integrates the cancel and update-pr jobs into the main CI jobs. This not only looks nicer in the actions menu (less jobs) but also improves which jobs we cancel: this now also allows to cancel jobs in forks by getting rid of the magic workflow number.
Mathias Preiner [Thu, 25 Nov 2021 04:15:00 +0000 (20:15 -0800)]
Guard regression tests that require libpoly to pass. (#7698)
Regression tests either timeout or return unknown if cvc5 is configured with --no-poly.
Aina Niemetz [Thu, 25 Nov 2021 02:39:39 +0000 (18:39 -0800)]
api: Refactor mkTerm for kinds with arity = 0. (#7699)
This refactors mkTerm to allow creation of terms of kinds with arity = 0
via Op and/or empty children vector.
Aina Niemetz [Wed, 24 Nov 2021 22:17:43 +0000 (14:17 -0800)]
examples: Update python api datatypes example. (#7692)
The C++ datatypes example was extended in #7689. This updates the Python
API datatypes example accordingly.
Andres Noetzli [Wed, 24 Nov 2021 22:02:05 +0000 (14:02 -0800)]
Always enable API black box unit tests (#7696)
Currently, when assertions are disabled, we do not enable any unit
tests. However, we have decided that it would be beneficial to do black
box unit testing of the API even when building cvc5 without assertions,
because the API is user facing. This commit makes the following changes:
- Always enables API black box unit tests
- Adds a test to check whether a buggy version of Clang is being used,
which prevents the use of `-fno-access-control` for white box tests
- Fixes a spooky variable name in a Python unit test
Mathias Preiner [Wed, 24 Nov 2021 19:29:11 +0000 (11:29 -0800)]
cmake: Add option --[no]-static-binary. (#7695)
Allows to disable linking against static system libraries explicitly.
Mathias Preiner [Wed, 24 Nov 2021 19:15:28 +0000 (11:15 -0800)]
Fix ANTLR3 config for i386 and aarch64 builds. (#7694)
This fixes the i386 and aarch64 nightly builds.
Aina Niemetz [Wed, 24 Nov 2021 17:53:29 +0000 (09:53 -0800)]
examples: Update Java datatypes example with recent extensions. (#7693)
The C++ datatypes example was extended in #7689. This updates the Java
API datatypes example accordingly.
Andres Noetzli [Wed, 24 Nov 2021 05:53:01 +0000 (21:53 -0800)]
Remove dependency of `TypeNode` on `Node` (#7690)
This is further work towards breaking cyclic dependencies in the `expr`
folder.
Andrew Reynolds [Wed, 24 Nov 2021 05:34:25 +0000 (23:34 -0600)]
Fix potential for cycles in trust substitutions (#7687)
This ensures we use only the prefix of substitutions for the *first* time a formula is proven in a substitution map.
This avoids the possibility for cycles in proof generators during non-clausal simplification, where we may reprove a formula F later at a point where later substitutions depend on F.
Aina Niemetz [Wed, 24 Nov 2021 04:54:09 +0000 (20:54 -0800)]
examples: Extend DT api example with APPLY_TESTER and APPLY_UPDATER application. (#7689)
Andres Noetzli [Wed, 24 Nov 2021 04:30:47 +0000 (20:30 -0800)]
Minor fixes (#7691)
Aina Niemetz [Wed, 24 Nov 2021 00:50:44 +0000 (16:50 -0800)]
api: Fix creation of nary term kinds via Op. (#7688)
Fixes cvc5/cvc5-projects#367.
Andrew Reynolds [Tue, 23 Nov 2021 23:24:01 +0000 (17:24 -0600)]
Make difficulty manager only consider lemmas at full effort (#7685)
Fixes cvc5/cvc5-projects#350
Andrew Reynolds [Tue, 23 Nov 2021 22:47:09 +0000 (16:47 -0600)]
Enable model-based reduction technique for strings (#7680)
This changes our default strategy for deferring (some) reductions until after the model is constructed. It introduces the option `--strings-mbr` (model-based reduction) which is enabled by default.
When using model-based reductions, only *negatIve* contains and negative memberships are deferred for reduction/unfolding until LAST_CALL effort, where a candidate model is available. These steps are performed only if the constraints are not already satisfied in the model. The intuition is that negative contains/membership are the *most* expensive constraints to process and are moreover the *least* likely to be false in the model.
It makes a few fixes to the extended/RE solvers:
- 2 kinds of inferences in `checkExtfEval` should not be performed for substitutions based on models
- The regular expression solver should not use inclusion tests to justify reduction of memberships when the basis for the reduction is an unfolded membership, due to the reasoning being potentially cyclic. This led to a bogus model on a regression when the new strategy was enabled.
It also does minor refactoring of those solvers that was required for implementing the new policy.
This branch is +446-1 on SMT-LIB, with all gains coming on "sat" benchmarks, mostly from pyex. It also solves 2 previously unsolved challenge Amazon benchmarks quickly.
Gereon Kremer [Tue, 23 Nov 2021 20:59:26 +0000 (12:59 -0800)]
Add kinds to python docs (#7672)
This PR adds the kinds to the documentation for the regular python docs.
Gereon Kremer [Tue, 23 Nov 2021 19:04:46 +0000 (11:04 -0800)]
Push output language inside the printing code (#7683)
This PR pushes the explicit specification of the output language further inside the printing methods.
The general way to specify the output language is to attach it to the output stream. The changes simplify the interface, while we still allow printing in another output language via using a scope (as used in the lfsc and tptp printers).
mudathirmahgoub [Tue, 23 Nov 2021 18:10:37 +0000 (12:10 -0600)]
Add rewrite rule for bag.card operator using bag.map and lambda (#7643)
Add rewrite rule for bag.card operator using bag.map and lambda
yoni206 [Tue, 23 Nov 2021 17:34:14 +0000 (19:34 +0200)]
Python API documentation: terms (#7659)
This PR adds documentation for the Terms class in the python API.
Co-authored-by: Gereon Kremer gereon.kremer@cs.rwth-aachen.de
Andres Noetzli [Tue, 23 Nov 2021 16:57:28 +0000 (08:57 -0800)]
Make `node_value.h` not depend on `node_manager.h` (#7676)
This commit breaks a circular dependency by making `node_value.h` not
depend on `node_manager.h`. As a result, we can remove the hack-y
include of `node_manager.h` in the middle of the `node_value.h` file.
Gereon Kremer [Mon, 22 Nov 2021 22:31:31 +0000 (14:31 -0800)]
Refactor IO stream manipulators (#7555)
This PR consolidates SetLanguage, ExprSetDepth and ExprDag into a single consistent utility. Also, it makes it play more nicely with users setting these options and removes some obsolete code.
Andrew Reynolds [Mon, 22 Nov 2021 21:43:17 +0000 (15:43 -0600)]
Add rewrite for repeated re.allchar (#7681)
This solves 4 more challenge Amazon benchmarks.
Gereon Kremer [Mon, 22 Nov 2021 18:54:19 +0000 (10:54 -0800)]
Set proper system processor for arm64 toolchain (#7665)
Haniel Barbosa [Mon, 22 Nov 2021 18:37:44 +0000 (15:37 -0300)]
[prop] Remove unused #define in theory proxy (#7670)
Andrew Reynolds [Mon, 22 Nov 2021 00:49:57 +0000 (18:49 -0600)]
Improve error for check theory assertions with model (#7679)
Makes it so that we report *all* unsatisfied assertions, not just the first one.
Andrew Reynolds [Mon, 22 Nov 2021 00:35:52 +0000 (18:35 -0600)]
Fix const RE test for internal regexp rv kind (#7678)
Fixes #7677.
yoni206 [Sat, 20 Nov 2021 00:05:03 +0000 (02:05 +0200)]
bv2int module: translation of more cases (#7653)
This commit adds the implementation of the translation from BV to Int for the remaining operators. Some cases are left for the next PR. Corresponding unit tests are added. Notice that in the new module, the following issues do not occur. They will be added as tests in the following PRs:
https://github.com/cvc5/cvc5-projects/issues/345
https://github.com/cvc5/cvc5-projects/issues/344
https://github.com/cvc5/cvc5-projects/issues/343
Andres Noetzli [Fri, 19 Nov 2021 23:04:25 +0000 (15:04 -0800)]
[API] Avoid copying values (#7666)