Andrew Reynolds [Fri, 13 Dec 2019 15:53:02 +0000 (09:53 -0600)]
Add support for set comprehension (#3312)
Andrew Reynolds [Fri, 13 Dec 2019 13:18:29 +0000 (07:18 -0600)]
Disable check-synth-sol in regression with recursive functions (#3560)
Aina Niemetz [Fri, 13 Dec 2019 05:05:49 +0000 (21:05 -0800)]
FP converter: convert: Use std::vector as instead of std::stack. (#3563)
The word-blasting function `FpConverter::convert` used a `std::stack` with `deque` as an underlying data structure (default) for node traversal. Previous experiments suggested that using `std::stack<T, std::deque<T>>` performs worse than using `std::vector<T>`, and we decided, as a guideline, to always use `std::vector` for stacks: https://github.com/CVC4/CVC4/wiki/Code-Style-Guidelines#stack.
This PR refactors `FpConverter::convert` to use `std::vector`. Runs on all incremental and non-incremental FP logics in SMT-LIB showed a slight improvement over the previous (`std::stack<T, std::deque<T>>`) implementation, and an even greater (albeit still slight) improvement over using `std::stack<T, std::vector<T>>`.
Andrew Reynolds [Thu, 12 Dec 2019 21:43:36 +0000 (15:43 -0600)]
Make CEGIS sampling robust to non-vanilla CEGIS (#3559)
Haniel Barbosa [Thu, 12 Dec 2019 21:19:05 +0000 (18:19 -0300)]
Fix Unif+PI algorithm with symbolic unfolding (#3558)
Andrew Reynolds [Thu, 12 Dec 2019 20:38:42 +0000 (14:38 -0600)]
Use the node-level datatypes API (#3556)
Andrew Reynolds [Thu, 12 Dec 2019 16:01:53 +0000 (10:01 -0600)]
Fixes for regressions (#3557)
Andrew Reynolds [Thu, 12 Dec 2019 03:24:43 +0000 (21:24 -0600)]
Fix CEGIS refinement for recursive functions evaluation (#3555)
Andrew Reynolds [Thu, 12 Dec 2019 00:09:16 +0000 (18:09 -0600)]
Activate node-level datatype API (#3540)
Andrew Reynolds [Wed, 11 Dec 2019 17:58:53 +0000 (11:58 -0600)]
Do not substitute beneath arithmetic terms in the non-linear solver (#3324)
Andrew Reynolds [Wed, 11 Dec 2019 16:07:25 +0000 (10:07 -0600)]
Support symbolic unfolding in UNIF+PI (#3553)
Andrew Reynolds [Tue, 10 Dec 2019 23:42:31 +0000 (17:42 -0600)]
Incorporate rewriting on demand in the evaluator (#3549)
Haniel Barbosa [Tue, 10 Dec 2019 20:17:00 +0000 (17:17 -0300)]
Fix ufho issues (#3551)
Andrew Reynolds [Tue, 10 Dec 2019 15:07:47 +0000 (09:07 -0600)]
Allow unsat cores with sygus inference (#3550)
Andrew Reynolds [Mon, 9 Dec 2019 22:17:46 +0000 (16:17 -0600)]
Disable sygus inference when combined with incremental and proofs (#3539)
Andrew Reynolds [Mon, 9 Dec 2019 20:32:32 +0000 (14:32 -0600)]
Fix case of uninterpreted constant instantiation in FMF (#3543)
Fixes #3537.
This benchmark triggers a potential unsoundness caused by instantiating with an uninterpreted constant (which is unsound).
Andres Noetzli [Mon, 9 Dec 2019 19:19:10 +0000 (11:19 -0800)]
Make theory rewriters non-static (#3547)
This commit changes theory rewriters to be non-static. This refactoring
is needed as a stepping stone to making our rewriter configurable: If we
have multiple solver objects with different rewrite configurations, we
cannot use `static` variables for the rewriter table in the BV rewriter
for example. It is also in line with our goal of getting rid of
singletons in general. Note that the `Rewriter` class is still a
singleton, which will be changed in a future commit.
Andres Noetzli [Sun, 8 Dec 2019 19:56:50 +0000 (11:56 -0800)]
[Regressions] Require proof support for abduction (#3546)
Andres Noetzli [Sat, 7 Dec 2019 03:01:43 +0000 (19:01 -0800)]
Simplify rewrite for character matching (#3545)
Andres Noetzli [Sat, 7 Dec 2019 00:06:19 +0000 (16:06 -0800)]
Use str.subtr in str.to.int/int.to.str reduction (#3544)
Previously, we were using UFs to encode substrings in the
`str.to.int`/`int.to.str` reductions. Our experiments have shown,
however, that using `str.substr` is more efficient instead.
Andrew Reynolds [Fri, 6 Dec 2019 20:23:21 +0000 (14:23 -0600)]
Throw exception instead of warning for approximate models (#3542)
Andres Noetzli [Fri, 6 Dec 2019 19:33:51 +0000 (11:33 -0800)]
Add lemma for str.to.int/int.to.str (#3541)
This commit adds a lemma to our encoding of `str.to.int` and
`int.to.str` that relates the integer value in the encodings to the
value of partial results.
Andrew Reynolds [Fri, 6 Dec 2019 19:12:12 +0000 (13:12 -0600)]
Optimize the rewriter for DT_SYGUS_EVAL (#3529)
This makes it so that we don't construct intermediate unfoldings of applications of DT_SYGUS_EVAL, which wastes time in node construction. It makes the sygusToBuiltin utility in TermDbSygus use this implementation.
Andrew Reynolds [Fri, 6 Dec 2019 18:03:40 +0000 (12:03 -0600)]
New algorithm for interpolation and abduction based on unsat cores (#3255)
Andrew Reynolds [Fri, 6 Dec 2019 17:00:33 +0000 (11:00 -0600)]
Add ExprManager as argument to Datatype (#3535)
Alex Ozdemir [Fri, 6 Dec 2019 15:51:54 +0000 (07:51 -0800)]
[proof] Eliminate side-condition from ER signature (#3230)
* [proof] Eliminate the side condition in er.plf
By tweaking the axioms a bit, I got rid of the lone SC in the Extended
Resolution signature.
* [proof] Changed er_proof.cpp in line with signature
The new signature requires slightly different proof printing.
* [proof] clang-format er_proof.cpp
* Fix tests
* [proof] Actually delete the SC
* Apply suggestions from code review
Co-Authored-By: yoni206 <yoni206@users.noreply.github.com>
* Add LFSC-checking unit test for ER proof
* Gate the lfsc invocation on the build system
* Properly gate the lfsc check on the build system
* gate the plf_signatures forward def on the build system
Mathias Preiner [Fri, 6 Dec 2019 14:48:04 +0000 (06:48 -0800)]
contrib: Setup all dependencies in deps/ directory. (#3534)
Andrew Reynolds [Fri, 6 Dec 2019 07:22:01 +0000 (01:22 -0600)]
Introduce the Node-level Datatypes API (#3462)
This adds classes corresponding to the Node-level Datatype API "DType", which is a specification for a datatype type. It does not enable the use of this layer yet. A followup PR will update the Expr-level Datatype to use the Node-level code, which is currently verified to be functional on this branch: https://github.com/ajreynol/CVC4/tree/dtype-integrate. Futher PRs will make the internal (Node-level) code forgo the use of the Expr-layer datatype, which will then enable the Expr-layer to be replaced by the Term-layer datatype.
Most of the documentation for the methods in DType/DTypeConstructor/DTypeSelector was copied from Datatype/DatatypeConstructor/DatatypeConstructorArg.
Andrew Reynolds [Thu, 5 Dec 2019 20:23:16 +0000 (14:23 -0600)]
Make nonlinear solver intercept model assignments from the linear arithmetic solver (#3525)
Andrew Reynolds [Thu, 5 Dec 2019 15:19:56 +0000 (09:19 -0600)]
Refactor mode options for Unif+PI (#3531)
Andres Noetzli [Thu, 5 Dec 2019 14:39:32 +0000 (06:39 -0800)]
Bi-directional unrolling of R* regular expressions (#3532)
makaimann [Thu, 5 Dec 2019 02:59:44 +0000 (18:59 -0800)]
Add mkOp for a single Kind (#3522)
Andrew Reynolds [Thu, 5 Dec 2019 01:13:08 +0000 (19:13 -0600)]
Fix the subtyping relation for functions (#3494)
Andrew Reynolds [Wed, 4 Dec 2019 23:18:06 +0000 (17:18 -0600)]
New grammar construction modes for SyGuS (#3486)
Andrew Reynolds [Wed, 4 Dec 2019 22:43:02 +0000 (16:43 -0600)]
Fix (#3530)
Andrew Reynolds [Wed, 4 Dec 2019 21:52:28 +0000 (15:52 -0600)]
Fixes for SyGuS PBE + templated string concatenations + datatypes (#3492)
Andrew Reynolds [Wed, 4 Dec 2019 20:34:46 +0000 (14:34 -0600)]
Fix single invocation solution construction for multiple function case (#3516)
Andres Noetzli [Wed, 4 Dec 2019 00:20:13 +0000 (16:20 -0800)]
Fix corner case in model construction of strings (#3524)
This commit fixes a corner case in the model construction of strings:
For a given length, we were assuming that for each equivalence class, we
could always find an initial guess for a constant to assign to it. This
was not always true, however, because a preceding equivalence class
could use up all constants and get assigned the last remaining one, so
we wouldn't have a constant remaining for the current class. This
resulted in an assertion failure (in debug) or a crash (in production).
This commit fixes the issue by checking whether we've run out of
constants before assigning an initial constant for an equivalence class.
Andrew Reynolds [Tue, 3 Dec 2019 22:51:22 +0000 (16:51 -0600)]
Improve flexibility of lemma output in non-linear solver (#3518)
Aina Niemetz [Tue, 3 Dec 2019 18:24:20 +0000 (10:24 -0800)]
Fix clang-format file for brace wrapping with case labels. (#3523)
More recent clang version introduce an extra flag AfterCaseLabel for brace wrapping after case labels. Default is false, with the effect opening braces after case labels will be aligned on the same line as the label. Our style requires it to be set to true.
Andres Noetzli [Tue, 3 Dec 2019 18:05:01 +0000 (10:05 -0800)]
Rewrite `str.contains` used for character matching (#3519)
makaimann [Tue, 3 Dec 2019 14:58:47 +0000 (06:58 -0800)]
Add isNullHelper to avoid calling API function isNull with CVC4_API_CHECK_NOT_NULL (#3520)
makaimann [Tue, 3 Dec 2019 00:53:27 +0000 (16:53 -0800)]
Minor refactor: rename opterm_black to op_black (#3521)
Andres Noetzli [Mon, 2 Dec 2019 22:21:05 +0000 (14:21 -0800)]
[SMT2 Printer] Quote symbols starting with digit (#3517)
makaimann [Mon, 2 Dec 2019 21:36:19 +0000 (13:36 -0800)]
OpTerm Refactor: Allow retrieving OpTerm used to create Term in public C++ API (#3355)
* Treat uninterpreted functions as a child in Term iteration
* Remove unnecessary const_iterator constructor
* Add parameter comments to const_iterator constructor
* Use operator[] instead of storing a vector of Expr children
* Switch pos member variable from int to uint32_t
* Add comment about how UFs are treated in iteration
* Allow OpTerm to contain a single Kind, update OpTerm construction
* Update mkTerm to use only an OpTerm (and not also a Kind)
* Remove unnecessary function checkMkOpTerm
* Update mkOpTerm comments to not use _OP Kinds
* Update examples to use new mkTerm
* First pass on fixing unit test
* Override kind for Constructor and Selector Terms
* More fixes to unit tests
* Updates to parser
* Remove old assert (for Kind, OpTerm pattern which was removed)
* Remove *_OP kinds from public API
* Add hasOpTerm and getOpTerm methods to Term
* Add test for UF iteration
* Add unit test for getOpTerm
* Move OpTerm implementation above Term implemenation to match header file
Moved in header because Term::getOpTerm() returns an OpTerm and the compiler complains
if OpTerm is not defined earlier. Simply moving the declaration is easier/cleaner than
forward declaring within the same file that it's declared.
* Fix mkTerm in datatypes-new.cpp example
* Use helper function for creating term from Kind to avoid nested API calls
* Rename: OpTerm->Op in API
* Update OpTerm->Op in examples/tests/parser
* Add case for APPLY_TESTER
* operator term -> operator
* Update src/api/cvc4cpp.h
Co-Authored-By: Aina Niemetz <aina.niemetz@gmail.com>
* Comment comment suggestion
Co-Authored-By: Aina Niemetz <aina.niemetz@gmail.com>
* Add not-null checks and implement Op from a single Kind constructor
* Undo sed mistake for OpTerm replacement
* Add 'd_' prefix to member vars
* Fix comment and remove old commented-out code
* Formatting
* Revert "Formatting"
This reverts commit
d1d5fc1fb71496daeba668e97cad84c213200ba9.
* More fixes for sed mistakes
* Minor formatting
* Undo changes in CVC parser
* Add isIndexed and prefix with d_
* Create helper function for isIndexed to avoid calling API functions in other API functions
Andrew Reynolds [Mon, 2 Dec 2019 19:02:01 +0000 (13:02 -0600)]
Update ownership policy for dynamic quantifiers splitting (#3493)
Andrew Reynolds [Mon, 2 Dec 2019 17:15:16 +0000 (11:15 -0600)]
Fix case of higher-order + sygus inference (#3509)
Andrew Reynolds [Mon, 2 Dec 2019 05:34:18 +0000 (23:34 -0600)]
Ensure quantifiers options are set with --no-strings-lazy-pp (#3515)
Andres Noetzli [Sun, 1 Dec 2019 22:57:25 +0000 (14:57 -0800)]
Prevent ref count from reaching zero in BV instantiator (#3512)
Haniel Barbosa [Sat, 30 Nov 2019 02:46:55 +0000 (23:46 -0300)]
improving parsing error messages related to HOL (#3510)
Andres Noetzli [Sat, 30 Nov 2019 01:01:19 +0000 (17:01 -0800)]
Competition build: Skip parsing error regression (#3511)
Andrew Reynolds [Sat, 30 Nov 2019 00:24:30 +0000 (18:24 -0600)]
Fix fast SyGuS enumeration for interpreted constants (#3501)
Andrew Reynolds [Fri, 29 Nov 2019 15:31:54 +0000 (09:31 -0600)]
Check free variables in assertions when using SyGuS (#3504)
Andrew Reynolds [Wed, 27 Nov 2019 21:59:36 +0000 (15:59 -0600)]
Fix sygus inference for choice functions introduced at preprocess (#3500)
Haniel Barbosa [Wed, 27 Nov 2019 20:52:36 +0000 (17:52 -0300)]
Enable sygusRecFun by default and fixes SyGuS+RecFun+HO issues (#3502)
Andrew Reynolds [Wed, 27 Nov 2019 17:03:49 +0000 (11:03 -0600)]
Fix indexof range lemma (#3499)
Andrew Reynolds [Mon, 25 Nov 2019 23:59:51 +0000 (17:59 -0600)]
Better front-end type checking for SyGuS (#3496)
Andrew Reynolds [Fri, 22 Nov 2019 18:09:19 +0000 (12:09 -0600)]
Minor refactoring of compute model value for nl (#3489)
* Refactor compute model value for nl
* Format
Haniel Barbosa [Fri, 22 Nov 2019 14:50:12 +0000 (11:50 -0300)]
fixing stupid typo (#3488)
Haniel Barbosa [Thu, 21 Nov 2019 18:17:16 +0000 (15:17 -0300)]
hard limit for rec-fun eval (#3485)
Andrew Reynolds [Thu, 21 Nov 2019 15:54:12 +0000 (09:54 -0600)]
Evaluation unfolding for symbolic SyGuS constructors (#3483)
Haniel Barbosa [Wed, 20 Nov 2019 19:42:58 +0000 (16:42 -0300)]
Lazy evaluation via rec-funs of ITE expressions (#3482)
Andres Noetzli [Tue, 19 Nov 2019 01:59:22 +0000 (17:59 -0800)]
Fix reduction of `sqrt` (#3478)
Alex Ozdemir [Tue, 19 Nov 2019 01:07:52 +0000 (17:07 -0800)]
Add a few comments to ProofManager (#3477)
Alex Ozdemir [Tue, 19 Nov 2019 00:41:07 +0000 (16:41 -0800)]
Signature documentation update (#3476)
This comment was slightly out-of-date.
Andres Noetzli [Mon, 18 Nov 2019 20:28:54 +0000 (12:28 -0800)]
Use -Wimplicit-fallthrough (#3464)
This commit enables compiler warnings for implicit fallthroughs in
switch statements that are not explicitly marked as such. The commit
introduces a new macro `CVC4_FALLTHROUGH` that can be used to indicate
that a fallthrough is intentional. The commit fixes existing warnings
and a bug in the arithmetic rewriter for `abs` (the bug likely couldn't
be triggered easily because we rewrite `abs` to an `ite` while expanding
definitions).
To have the new macro also available in the parser, the commit changes
`src/base/check.h` to be visible to the parser (it includes
`cvc4_private_library.h` now instead of `cvc4_private.h`).
Andrew Reynolds [Mon, 18 Nov 2019 19:52:18 +0000 (13:52 -0600)]
Use standard sygus interface for abduction and rewrite rule synthesis (#3471)
Andrew Reynolds [Mon, 18 Nov 2019 19:13:14 +0000 (13:13 -0600)]
Improve interface for sygus datatype, fix utilities (#3473)
Andrew Reynolds [Mon, 18 Nov 2019 02:19:24 +0000 (20:19 -0600)]
Updates to the unit tests, api, and examples for datatypes (#3459)
* Updates to the unit tests, api, and examples for datatypes
* Format
Andres Noetzli [Sun, 17 Nov 2019 06:38:34 +0000 (22:38 -0800)]
Add support for ThreadSanitizer instrumentation (#3467)
This commit adds support for compiling CVC4 with ThreadSanitizer
instrumentation. This is useful for debugging issues when CVC4 is used
in a multi-threaded context (e.g. #3292).
Andrew Reynolds [Sat, 16 Nov 2019 04:52:58 +0000 (22:52 -0600)]
Use standard interface for sygus default grammar construction (#3466)
Andrew Reynolds [Fri, 15 Nov 2019 22:11:34 +0000 (16:11 -0600)]
Introduce SyGuS datatype API (#3465)
Andrew Reynolds [Fri, 15 Nov 2019 13:59:38 +0000 (07:59 -0600)]
Fix wrong kind in sygus version 1 parser (#3463)
Alex Ozdemir [Thu, 14 Nov 2019 18:39:05 +0000 (10:39 -0800)]
Use Shebang in cxxtestgen when appropriate (#3458)
CxxTest's generator has one of three names, depending on the CxxTest
version:
* `cxxtestgen.py`, a python program
* `cxxtestgen`, some kind of program with a shebang
* `cxxtestgen.pl`, a perl program
We were mistakenly assuming that the `cxxtestgen` form was always a
python program.
Now, if we find that form on the system, we assume that it is has a
shebang, and is executable.
Andres Noetzli [Wed, 13 Nov 2019 22:14:09 +0000 (14:14 -0800)]
Allow (set-logic ...) after (reset) (#3457)
Fixes #3353. #3062 introduced a flag that tracks whether we have seen a
`(set-logic ...)` command to improve the handling of `--force-logic`.
However, the flag was not set to `false` when `(reset)` was called. This
commit fixes the issue.
Andrew Reynolds [Wed, 13 Nov 2019 06:03:35 +0000 (00:03 -0600)]
Distinguish unknown status for model printing (#3454)
Andrew Reynolds [Wed, 13 Nov 2019 05:34:05 +0000 (23:34 -0600)]
Refactor non-linear extension for model-based refinement (#3452)
* Refactor non-linear extension for model-based refinement
* Format
* Minor
* Address
Andrew Reynolds [Mon, 11 Nov 2019 19:02:55 +0000 (13:02 -0600)]
Add missing utilities for Node-level Datatype API (#3451)
Andres Noetzli [Mon, 11 Nov 2019 18:07:29 +0000 (10:07 -0800)]
Fix mkConst<RoundingMode>() for Python bindings (#3447)
yoni206 [Mon, 11 Nov 2019 17:07:14 +0000 (09:07 -0800)]
Update README according to the new website (#3438)
Andrew Reynolds [Mon, 11 Nov 2019 16:09:00 +0000 (10:09 -0600)]
Eliminate remaining references to type/expr in datatype type rules. (#3450)
Andrew Reynolds [Sun, 10 Nov 2019 14:45:39 +0000 (08:45 -0600)]
Fix bugs related to sygus higher-order + recursive functions (#3448)
Andrew Reynolds [Sat, 9 Nov 2019 22:09:11 +0000 (16:09 -0600)]
Fixes in relations related to datatypes not passed by reference (#3449)
The current code is creating/destroying datatypes unnecessarily.
Mathias Preiner [Fri, 8 Nov 2019 21:41:21 +0000 (13:41 -0800)]
cmake: Disable C++ GNU extensions. (#3446)
Fixes #971.
Andrew Reynolds [Wed, 6 Nov 2019 23:12:29 +0000 (17:12 -0600)]
Move more string utility functions (#3398)
This is work towards splitting a "core solver" object from TheoryStrings.
This moves global functions from TheoryStrings to InferenceManager/SolverState, making them accessible in the future by modules that have references to these objects.
It also corrects an issue where we were maintaining two `d_conflict` fields.
Andrew Reynolds [Wed, 6 Nov 2019 17:11:28 +0000 (11:11 -0600)]
Migrate more datatype methods to the Node level (#3443)
This adds node-level interfaces for a few missing functions that will be necessary to have a Node-level API for datatypes.
Andres Noetzli [Wed, 6 Nov 2019 16:40:22 +0000 (08:40 -0800)]
[Regressions] Remove leading whitespace in output (#3444)
Andrew Reynolds [Wed, 6 Nov 2019 16:00:08 +0000 (10:00 -0600)]
Support for SyGuS PBE + recursive functions (#3433)
Andres Noetzli [Wed, 6 Nov 2019 00:26:04 +0000 (16:26 -0800)]
Remove casts to subclasses of Type in API (#3420)
Andrew Reynolds [Tue, 5 Nov 2019 23:37:37 +0000 (17:37 -0600)]
Separate model object in non-linear extension (#3426)
Andrew Reynolds [Tue, 5 Nov 2019 20:12:43 +0000 (14:12 -0600)]
Refactor type matcher utility (#3439)
Andres Noetzli [Tue, 5 Nov 2019 01:04:04 +0000 (17:04 -0800)]
[Regressions] Support for running w/ default args (#3436)
Andrew Reynolds [Mon, 4 Nov 2019 23:48:30 +0000 (17:48 -0600)]
Make check synth solution robust to auxiliary assertions (#3432)
Andrew Reynolds [Mon, 4 Nov 2019 22:22:51 +0000 (16:22 -0600)]
Fix ho extensionality in collect model info (#3435)
Andrew Reynolds [Mon, 4 Nov 2019 20:24:02 +0000 (14:24 -0600)]
Avoid non-well-founded sygus grammars (#3434)
Andrew Reynolds [Mon, 4 Nov 2019 18:23:34 +0000 (12:23 -0600)]
Make getSynthSolution return a Bool (#3306)
Andrew Reynolds [Mon, 4 Nov 2019 17:11:38 +0000 (11:11 -0600)]
Eliminate deprecated utility function from sygus (#3431)
Andrew Reynolds [Fri, 1 Nov 2019 22:06:33 +0000 (17:06 -0500)]
Fix non-termination in datatype type enumerator (#3369)
Andres Noetzli [Fri, 1 Nov 2019 18:58:57 +0000 (11:58 -0700)]
Fix and refactor TheoryStrings::checkFlatForms() (#3326)
This commit fixes some minor (performance) issues in
`TheoryStrings::checkFlatForms()`: The `inelig` vector was initialized
with copies of the `start` element instead of all the elements before
`start` and the `else` branch of `count == asize` was looping over all
elements from `1` instead of `start + 1`. Additionally, this commit
refactors the code to be a bit more readable.
Andrew Reynolds [Fri, 1 Nov 2019 12:09:35 +0000 (07:09 -0500)]
Eagerly beta reduce during sygus to builtin term conversion (#3418)