Mathias Preiner [Wed, 14 Aug 2019 20:12:19 +0000 (13:12 -0700)]
Remove option --continued-execution. (#3189)
Andrew Reynolds [Wed, 14 Aug 2019 19:07:18 +0000 (14:07 -0500)]
Update to standard implementation of getting free variables (#3175)
Andrew Reynolds [Wed, 14 Aug 2019 18:23:07 +0000 (13:23 -0500)]
Call separate SMT engine for single invocation sygus (#3151)
Mathias Preiner [Wed, 14 Aug 2019 17:56:26 +0000 (10:56 -0700)]
cmake: Export CVC4 library interface. (#3179)
Andres Noetzli [Wed, 14 Aug 2019 17:03:21 +0000 (10:03 -0700)]
Enable Clang-Format for Java (#3064)
Andrew Reynolds [Wed, 14 Aug 2019 16:17:09 +0000 (11:17 -0500)]
Minor cleaning of sygus term database (#3159)
Andrew Reynolds [Wed, 14 Aug 2019 15:37:03 +0000 (10:37 -0500)]
Fix issue related to higher-order purification in term database (#3157)
Aina Niemetz [Wed, 14 Aug 2019 01:20:59 +0000 (18:20 -0700)]
SmtEngine: Reorganize class according to guidelines, some cleanup. (#3183)
Aina Niemetz [Fri, 9 Aug 2019 00:19:05 +0000 (17:19 -0700)]
New C++ API: Add checks and tests for Solver::simplify. (#3170)
Aina Niemetz [Fri, 9 Aug 2019 00:08:50 +0000 (17:08 -0700)]
New C++ API: Fix test names of solver_black unit test. (#3170)
Aina Niemetz [Thu, 8 Aug 2019 22:19:05 +0000 (15:19 -0700)]
New C++ API: Reorganize Solver code (move only). (#3170)
Andrew Reynolds [Tue, 13 Aug 2019 20:08:00 +0000 (15:08 -0500)]
Track sygus variable to term relationship via attribute (#3182)
Andrew Reynolds [Tue, 13 Aug 2019 19:08:11 +0000 (14:08 -0500)]
Update option to disable symbolic definitions in strings (#3180)
Andrew Reynolds [Tue, 13 Aug 2019 18:19:18 +0000 (13:19 -0500)]
Add string rewrite involving allchar stars (#3167)
Andrew Reynolds [Tue, 13 Aug 2019 16:29:47 +0000 (11:29 -0500)]
Properly implement logic info for separation logic (#3176)
Andrew Reynolds [Tue, 13 Aug 2019 15:39:45 +0000 (10:39 -0500)]
Implement check abduct feature (#3152)
Andrew Reynolds [Tue, 13 Aug 2019 15:08:27 +0000 (10:08 -0500)]
Introduce smt2 parsing utility ParseOp and refactor (#3165)
Andrew Reynolds [Mon, 12 Aug 2019 20:40:26 +0000 (15:40 -0500)]
Clean smt2 parsing of named attributes (#3172)
Andrew Reynolds [Mon, 12 Aug 2019 19:23:31 +0000 (14:23 -0500)]
Give rewrite engine pointer to conflict-based instantiation module (#3174)
Aina Niemetz [Sun, 11 Aug 2019 21:08:30 +0000 (14:08 -0700)]
New C++ API: Add documentation/guidelines for API guards. (#3178)
makaimann [Sun, 11 Aug 2019 16:07:31 +0000 (09:07 -0700)]
New C++ API: Add templated getIndices method for OpTerm (#3073)
* Implement templated getIndices method for OpTerm
* Add getIndices unit tests
* Update src/api/cvc4cpp.cpp
Co-Authored-By: Aina Niemetz <aina.niemetz@gmail.com>
* Update src/api/cvc4cpp.cpp
Co-Authored-By: Aina Niemetz <aina.niemetz@gmail.com>
* Add comment about DIVISIBLE_OP
* Update test/unit/api/opterm_black.h
Co-Authored-By: Aina Niemetz <aina.niemetz@gmail.com>
* Update test/unit/api/opterm_black.h
Co-Authored-By: Aina Niemetz <aina.niemetz@gmail.com>
* Update test/unit/api/opterm_black.h
Co-Authored-By: Aina Niemetz <aina.niemetz@gmail.com>
* Update test/unit/api/opterm_black.h
Co-Authored-By: Aina Niemetz <aina.niemetz@gmail.com>
* Add exception checks to other unit tests (instead of having its own function)
* Fix unit test names in opterm_black.h
* Add description to docstring for getIndices
* Formatting
* Clang format older commits
* Use '-' in docstring list to match other docstrings
* Support creating DIVISIBLE_OP with a string (for arbitrary precision integers)
* Move mkOpTerm(DIVISIBLE_OP, <str>) test to solver_black.h
* Fix pointer access
* Replace switch statement with if statement
* Guard string input for CVC4::Integer in mkOpTerm for consistency on GMP/CLN back-end
Andrew Reynolds [Sat, 10 Aug 2019 19:26:02 +0000 (14:26 -0500)]
Simplify how defined functions are tracked during parsing (#3177)
Andrew Reynolds [Sat, 10 Aug 2019 17:56:05 +0000 (12:56 -0500)]
Add option to only dump unsolved queries for --sygus-query-gen (#3173)
Andrew Reynolds [Thu, 8 Aug 2019 21:49:08 +0000 (16:49 -0500)]
Reorganize includes for quantifiers engine (#3169)
Andrew Reynolds [Thu, 8 Aug 2019 20:16:41 +0000 (15:16 -0500)]
Add subdirectories to contrib for competition scripts (#3164)
Mathias Preiner [Thu, 8 Aug 2019 18:19:23 +0000 (11:19 -0700)]
Fix issues with Ninja build system and add configure option. (#3166)
Adds option --ninja to configure.sh.
Aina Niemetz [Wed, 15 May 2019 20:03:24 +0000 (13:03 -0700)]
New C++ API: Add checks and tests for push/pop. (#3121)
Aina Niemetz [Mon, 13 May 2019 20:51:07 +0000 (13:51 -0700)]
New C++ API: Introduce macros for try-catch blocks in Solver. (#3121)
Aina Niemetz [Tue, 6 Aug 2019 23:25:07 +0000 (16:25 -0700)]
New C++ API: Fix branch prediction in CHECK macros. (#3161)
Andrew Reynolds [Tue, 6 Aug 2019 22:18:50 +0000 (17:18 -0500)]
Properly parse qualified identifiers (#3111)
Haniel Barbosa [Tue, 6 Aug 2019 19:14:36 +0000 (14:14 -0500)]
Scripts for CASC-27 (#3163)
Andrew Reynolds [Tue, 6 Aug 2019 00:28:54 +0000 (19:28 -0500)]
Fix drat signature wrt side condition return types. (#3160)
Andrew Reynolds [Mon, 5 Aug 2019 17:04:02 +0000 (12:04 -0500)]
Remove forward declarations in quantifiers engine (#3156)
Mathias Preiner [Sun, 4 Aug 2019 07:04:20 +0000 (00:04 -0700)]
Fix regression script for incremental SMT-LIB v2 benchmarks. (#3155)
The regression script did not extract the expected status from incremental
SMT-LIB v2 benchmarks correctly if status was given via (set-info :status ...). The
script used re.search for finding the status, which only searches for
the first occurrence instead of finding all (set-info :status ...).
This commit fixes the issue by using re.findall instead.
Andrew Reynolds [Sat, 3 Aug 2019 16:56:51 +0000 (11:56 -0500)]
Fix printing issue related to nested quotes (#3154)
Haniel Barbosa [Sat, 3 Aug 2019 15:40:36 +0000 (10:40 -0500)]
Collapse @ chains in SMT2 printer (#3140)
Mathias Preiner [Fri, 2 Aug 2019 23:20:45 +0000 (16:20 -0700)]
Update CaDiCaL to version 1.0.3. (#3137)
* Removes incremental API check (#3011)
* Fixes toSatValueLit to use the new semantics of CaDiCaL's val()
Fixes #3011
Andrew Reynolds [Fri, 2 Aug 2019 21:04:43 +0000 (16:04 -0500)]
Flip the polarity of the argument of get-abduct (#3153)
Mathias Preiner [Fri, 2 Aug 2019 20:49:03 +0000 (13:49 -0700)]
Add better Python detection for contrib scripts. (#3150)
Andrew Reynolds [Fri, 2 Aug 2019 20:25:26 +0000 (15:25 -0500)]
Move basic sygus enumerator to its own file (#3149)
Andrew Reynolds [Fri, 2 Aug 2019 19:34:38 +0000 (14:34 -0500)]
Remove simplification specialized for sygus si solution reconstruction (#3147)
Andrew Reynolds [Fri, 2 Aug 2019 18:56:39 +0000 (13:56 -0500)]
Support default sygus grammar for strings (#3148)
Andrew Reynolds [Fri, 2 Aug 2019 17:01:27 +0000 (12:01 -0500)]
Throw option exception when track inst lemmas is not used (#3145)
Andrew Reynolds [Fri, 2 Aug 2019 14:40:36 +0000 (09:40 -0500)]
Fix solution filtering for streaming abducts (#3143)
Mathias Preiner [Fri, 2 Aug 2019 05:55:25 +0000 (22:55 -0700)]
Fix BVGauss unit tests. (#3142)
pass_bv_gauss_white.h included bv_gauss.cpp to test the functions in the
anonymous namespace, which resulted in ODR (one definition rule)
violations reported by ASAN.
This commit exposes the functionality required in the unit tests as
private static members of the BVGauss class. Since this is a white unit
test, we can access private members in the tests.
Andrew Reynolds [Fri, 2 Aug 2019 03:11:08 +0000 (22:11 -0500)]
Enable sygus logic when produce-abducts is true (#3144)
makaimann [Fri, 2 Aug 2019 00:52:37 +0000 (17:52 -0700)]
Use python realpath instead of relying on shell realpath (#3117)
* Use a custom implementation instead of relying on realpath, because it doesn't exist on Mac
* Use local variables and move portable_realpath to its own file
* Replace portable_realpath with python realpath
* Consistent command substitution
Co-Authored-By: Andres Noetzli <andres.noetzli@gmail.com>
* Substitute pwd directly
Mathias Preiner [Thu, 1 Aug 2019 20:07:18 +0000 (13:07 -0700)]
Fix memory leak in rewriter (debug mode). (#3141)
s_rewriteStack in rewriter.cpp was not properly cleaned up. This commit
wraps s_rewriteStack in a std::unique_ptr to automatically free the
memory.
Andrew Reynolds [Thu, 1 Aug 2019 14:26:26 +0000 (09:26 -0500)]
Move some generic utilities out of quantifiers (#3139)
Andrew Reynolds [Thu, 1 Aug 2019 14:08:46 +0000 (09:08 -0500)]
Regular expression intersection modes (#3134)
Haniel Barbosa [Wed, 31 Jul 2019 17:17:29 +0000 (12:17 -0500)]
Parsing THF and adding several regressions (#3131)
yoni206 [Wed, 31 Jul 2019 16:37:49 +0000 (09:37 -0700)]
adding bv_gauss unit test to build files (#3135)
Andrew Reynolds [Wed, 31 Jul 2019 16:01:33 +0000 (11:01 -0500)]
Add some missing cases in evaluator (#3133)
Andrew Reynolds [Wed, 31 Jul 2019 05:24:25 +0000 (00:24 -0500)]
Eager conflict detection in strings based on constant prefix/suffix (#3110)
Andrew Reynolds [Tue, 30 Jul 2019 18:52:28 +0000 (13:52 -0500)]
Track solver execution mode (#3132)
Haniel Barbosa [Tue, 30 Jul 2019 15:21:01 +0000 (10:21 -0500)]
Code to activate hoelim preprocessing pass (#3129)
Andrew Reynolds [Tue, 30 Jul 2019 14:57:33 +0000 (09:57 -0500)]
Minor improvement for rewriter for str.replace (#3124)
Andrew Reynolds [Tue, 30 Jul 2019 14:17:00 +0000 (09:17 -0500)]
Handle RE intersections modulo equality (#3120)
Haniel Barbosa [Tue, 30 Jul 2019 07:36:58 +0000 (02:36 -0500)]
Remove hard coded option for TPTP regressions in run_regression (#3128)
Andrew Reynolds [Mon, 29 Jul 2019 20:00:07 +0000 (15:00 -0500)]
Model blocker feature (#3112)
Andrew Reynolds [Mon, 29 Jul 2019 18:58:09 +0000 (13:58 -0500)]
Support get-abduct smt2 command (#3122)
Andrew Reynolds [Mon, 29 Jul 2019 16:57:09 +0000 (11:57 -0500)]
Fix match trie for polymorphic operators (#3125)
yoni206 [Mon, 29 Jul 2019 15:30:25 +0000 (08:30 -0700)]
Refactoring of bit-vector elimination rules (#3105)
This commit makes the following minor refactors to src/theory/bv/theory_bv_rewrite_rules_operator_elimination.h:
- Including options/bv_options.h: this is needed because this header file is being used.
- Marking all functions as inline: details in a discussion inside the PR.
Andrew Reynolds [Sat, 27 Jul 2019 12:28:21 +0000 (07:28 -0500)]
Minor improvement to term canonizer (#3123)
Andrew Reynolds [Fri, 26 Jul 2019 02:24:26 +0000 (21:24 -0500)]
Input user grammar in sygus abduct (#3119)
Andrew Reynolds [Thu, 25 Jul 2019 14:43:19 +0000 (09:43 -0500)]
Split infer info data structure in strings (#3107)
Haniel Barbosa [Wed, 24 Jul 2019 22:00:46 +0000 (17:00 -0500)]
adding runscripts for syguscomp2019 (#3118)
Andrew Reynolds [Wed, 24 Jul 2019 15:45:47 +0000 (10:45 -0500)]
Minor refactoring of regexp operation (#3116)
Andrew Reynolds [Wed, 24 Jul 2019 15:05:20 +0000 (10:05 -0500)]
Fix null node when using no-strings-lazy-pp (#3114)
Andrew Reynolds [Wed, 24 Jul 2019 14:32:14 +0000 (09:32 -0500)]
Move string util functions (#3115)
Andrew Reynolds [Tue, 23 Jul 2019 17:29:58 +0000 (12:29 -0500)]
Fix sygus datatype parsing in sygus v1 format (#3113)
Andrew Reynolds [Tue, 23 Jul 2019 13:54:13 +0000 (08:54 -0500)]
Fix help messages (#3096)
yoni206 [Tue, 23 Jul 2019 05:39:59 +0000 (22:39 -0700)]
Get operators in node (#3094)
This commit adds a function to node_algorithm.{h,cpp} that returns the operators that occur in a given node.
Andres Noetzli [Mon, 22 Jul 2019 22:39:12 +0000 (18:39 -0400)]
Avoid move constructor of std::fstream for GCC < 5 (#3098)
GCC < 5 does not support the move constructor of `std::fstream` (see
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54316 for details). This
commit wraps the `std::fstream` in an `std::unique_ptr` to work around
that issue.
yoni206 [Fri, 19 Jul 2019 21:19:17 +0000 (14:19 -0700)]
SyGuS grammar refactor (#3100)
Andrew Reynolds [Fri, 19 Jul 2019 16:39:07 +0000 (12:39 -0400)]
Fixes for sygus with datatypes (#3103)
Andrew Reynolds [Fri, 19 Jul 2019 13:36:53 +0000 (09:36 -0400)]
Fix case of unfolding negative membership in reg exp concatenation (#3101)
Andrew V. Jones [Thu, 18 Jul 2019 23:41:42 +0000 (00:41 +0100)]
Removing forward-declaration of undefined function 'registerForceLogicListener' (#3086)
Andrew Reynolds [Thu, 18 Jul 2019 15:35:18 +0000 (11:35 -0400)]
Basic rewrites for tolower/toupper (#3095)
Andrew Reynolds [Wed, 17 Jul 2019 15:14:22 +0000 (11:14 -0400)]
Minor clean in strings. (#3093)
Andrew Reynolds [Tue, 16 Jul 2019 22:12:15 +0000 (18:12 -0400)]
Add support for str.tolower and str.toupper (#3092)
Andrew Reynolds [Mon, 15 Jul 2019 16:03:01 +0000 (11:03 -0500)]
Add string rewrite to distribute character stars over concatenation (#3091)
Andrew Reynolds [Mon, 8 Jul 2019 22:16:50 +0000 (17:16 -0500)]
Towards refactoring relations (#3078)
Andrew Reynolds [Sat, 6 Jul 2019 01:40:49 +0000 (20:40 -0500)]
Refactor strings to use an inference manager object (#3076)
Andrew Reynolds [Tue, 2 Jul 2019 16:59:39 +0000 (11:59 -0500)]
Use unique_ptr for UF modules (#3080)
Alex Ozdemir [Tue, 2 Jul 2019 09:37:44 +0000 (02:37 -0700)]
Optimize DRAT optimization: clause matching (#3074)
* improved proof production statistics
This commit creates new statistics which will help us understand what is
so expensive about proof production.
There are already statistics for:
* Net time spent building/printing the LFSC proof.
* Size of the LFSC proof.
This commit adds statistics for:
* The time cost of DRAT optimization:
* net time
* tool time (drat-trim)
* clause matching time (matching core clauses with input clauses)
* Non-trivial because drat-trim can (and does) dedup and reorder
literals
* The advantage of DRAT optimization (proof/formula size before/after)
* The time cost of DRAT translation [to LRAT or ER] (net time, tool time)
* The time cost of skeleton traversal
* The time cost of printing declatations
* The time cost of printing CNF proofs
* The time cost of printing theory lemmas
* The time cost of printing final UNSAT proof.
There is a method, toStream, which is responsible for much of proof
production. The whole method was timed, but subsections were not. The
timings above consider subsections of it.
I also wanted to better understand the cost of DRAT optimization and
translation.
* [BV Proof] Optimize DRAT optimization
tldr: I made a bad data-structure/algorithm choice when implementing
part of DRAT/CNF-optimization, which consumed **a lot** of time on some
bechmarks. This commit fixes that choice.
Long Version:
Set-Keyed Maps Considered Harmful
=================================
Algorithmic Problem
-------------------
The DRAT optimization process spits out a unsatifiable core of the CNF.
The clauses in the core are all from the original formula, but their
literals may have been reordered and deduplicated. We must match the
old clauses with new ones, so we know which old clauses are in the core.
Old (BAD) Solution
------------------
Before I didn't really think about this process very much. I built a
solution in which clauses were canonically represented by hash sets of
literals, and made a hash map from canonical clauses to clause indices
into the original CNF.
Problem With Old Solution
-------------------------
In hindsight this was a bad idea. First, it required a new hash set to
be heap-allocated for every clause in the CNF. Second, the map lookups
required set-hashes (reasonable -- linear time, once) and hash-set
equality (not reasonable -- quadratic time, multiple times) on every
lookup.
New Solution
------------
The ideal solution is probably to have the map from clauses to clause
ids be something like a trie. STL doesn't have a trie, but representing
clauses as sorted, deduped vectors of literal in a tree based on
lexicographical comparison is pretty closed to this. On randomly chosen
examples it seems to be a huge improvement over the old
map-keyed-by-sets solution, and I'm in the process of running a full set
of bechmarks.
Also, we store pointers to the clauses already stored elsewhere in the
proof, instead of allocating new memory for them.
Future Work
-----------
It may also be reasonable to do a hash map of sorted, deduped, vector
clauses. I haven't tried this, yet (there's a TODO in the code).
* Update src/proof/clausal_bitvector_proof.h
Thanks andres!
Co-Authored-By: Andres Noetzli <andres.noetzli@gmail.com>
* Respond to Andres' Review: better use of CodeTimer
* Removed commented code (Andres)
Andrew Reynolds [Mon, 1 Jul 2019 22:27:53 +0000 (17:27 -0500)]
Refactoring of relevance vector in quantifiers (#3070)
Andrew Reynolds [Mon, 1 Jul 2019 21:33:34 +0000 (16:33 -0500)]
Support sygus version 2 format (#3066)
Andrew Reynolds [Mon, 1 Jul 2019 21:02:18 +0000 (16:02 -0500)]
Split higher-order UF solver (#2890)
Andrew Reynolds [Mon, 1 Jul 2019 20:23:15 +0000 (15:23 -0500)]
Add higher-order elimination preprocessing pass (#2865)
makaimann [Fri, 28 Jun 2019 09:36:16 +0000 (02:36 -0700)]
Make mkOpTerm const (#3072)
Andrew Reynolds [Thu, 27 Jun 2019 18:51:40 +0000 (13:51 -0500)]
Variable elimination rewrite for quantified strings (#3071)
Andrew Reynolds [Mon, 24 Jun 2019 15:30:27 +0000 (10:30 -0500)]
Stratify unfolding of regular expressions based on polarity (#3067)
Andres Noetzli [Mon, 24 Jun 2019 10:23:15 +0000 (03:23 -0700)]
Fix memory leak in unit test (#3068)
PR #3062 changed `Smt2::setLogic()` to return a heap-allocated command,
which didn't get cleaned up by our `parser_black` unit test. This commit
fixes the memory leak.
Andres Noetzli [Sat, 22 Jun 2019 05:29:01 +0000 (22:29 -0700)]
Add floating-point support in the Java API (#3063)
This commit adds support for the theory of floating-point numbers in the
Java API. Previously, floating-point related classes were missing in the
JAR. The commit also provides an example that showcases how to work with
the theory of floating-point numbers through the API.
Andres Noetzli [Fri, 21 Jun 2019 18:58:25 +0000 (11:58 -0700)]
Fix and simplify handling of --force-logic (#3062)
The `--force-logic` command line argument can be used to override a
logic specified in an input file or to set a logic when none is given.
Before this commit, both the `SmtEngine` and the parser were aware of
that argument. However, there were two issues if an input file didn't
specify a logic but `--force-logic` was used:
- Upon parsing `--force-logic`, the `SmtEngine` was informed about it
and set the logic to the forced logic. Then, the parser detected that
there was no `set-logic` command, so it set the logic to `ALL` and
emitted a corresponding warning. Finally, `SmtEngine::setDefaults()`
detected that `forceLogic` was set by the user and changed the logic
back to the forced logic. The warning was confusing and setting the
logic multiple times was not elegant.
- For eager bit-blasting, the logic was checked before resetting the
logic to the forced logic, so it would emit an error that eager
bit-blasting couldn't be used with the logic (which was `ALL` at that
point of the execution). This was a problem in the competition because
our runscript parses the `set-logic` command to decide on the
appropriate arguments to use and passes the logic to CVC4 via
`--force-logic`.
This commit moves the handling of `--force-logic` entirely into the
parser. The rationale for that is that this is not an API-level issue
(if you use the API you simply set the logic you want, forcing a
different logic in addition doesn't make sense) and simplifies the
handling of the option (no listeners need to be installed and the logic
is set only once). This commit also removes the option to set the logic
via `(set-option :cvc4-logic ...)` because it complicates matters (e.g.
which method of setting the logic takes precedence?). For the CVC and
the TPTP languages the commit creates a command to set the logic in
`SmtEngine` when the logic is forced in the parser instead of relying on
`SmtEngine` to figure it out itself.
Andres Noetzli [Fri, 21 Jun 2019 17:55:03 +0000 (10:55 -0700)]
Use TMPDIR environment variable for temp files (#2849)
Previously, we were just writing temporary files to `/tmp/` but this
commit allows the user to use the `TMPDIR` environment variable to
determine which directory the temporary file should be written to. The
commit adds a helper function for this and also includes some minor
cleanup of existing code.
Andres Noetzli [Tue, 18 Jun 2019 17:04:08 +0000 (10:04 -0700)]
Strings: More aggressive skolem normalization (#2761)
This PR makes the skolem normalization in the string solver quite a bit
more aggressive by reducing more skolems to prefix and suffix skolems.
Experiments show that this PR significantly improves performance on CMU
benchmarks.
Andres Noetzli [Sat, 15 Jun 2019 17:23:33 +0000 (10:23 -0700)]
Use Ubuntu 16.04 on Travis (#3059)
Travis has started to switch to Ubuntu 16.04 [0]. We were explicitly
specifying 14.04 as the `dist` in our `.travis.yml`. This commit changes
that specification to 16.04, updates the Java version, and removes
a workaround for an old Travis issue.
[0] https://changelog.travis-ci.com/xenial-as-the-default-build-environment-99476
Andres Noetzli [Fri, 14 Jun 2019 01:39:10 +0000 (18:39 -0700)]
Add lemma for the range of values of str.indexof (#3054)
This commit adds a lemma that the value of `str.indexof(x, y, n)` must
be between -1 and `str.len(x)`.