summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-07-11Towards Node-level SmtEnginenodeEmptySetAndres Noetzli
2020-07-11Remove Expr::getConst<>()Andres Noetzli
2020-07-11Remove ExprSequenceAndres Noetzli
Now that we can break the old API, we don't need an `ExprSequence` anymore. This commit removes `ExprSequence` and replaces all of its uses with `Sequence`. Note that I had to temporarily make `sequence.h` public because we currently include it in a "public" header because we still generate the code for `Expr::mkConst<Sequence>()`.
2020-07-10Node version of uninterpreted constantAndres Noetzli
2020-07-10Node version of array store allAndres Noetzli
2020-07-10Node version of empty setAndres Noetzli
2020-07-10Adding test for whether a kind is n-ary (#4718)Haniel Barbosa
2020-07-10Add support for printing 'get-abduct' in verbose mode (#4710)Andrew V. Jones
Issue For any of the following files: test/regress/regress1/abduct-dt.smt2 test/regress/regress1/sygus-abduct-test-ccore.smt2 test/regress/regress1/sygus-abduct-test.smt2 test/regress/regress1/sygus-abduct-ex1-grammar.smt2 test/regress/regress1/sygus-abduct-test-user.smt2 test/regress/regress1/sygus/abduction_1255.corecstrs.readable.smt2 test/regress/regress1/sygus/abduction_streq.readable.smt2 test/regress/regress1/sygus/abd-simple-conj-4.smt2 test/regress/regress1/sygus/uf-abduct.smt2 test/regress/regress1/sygus/yoni-true-sol.smt2 running the following: ./bin/cvc4 -vvv <file> would print: Invoking: ERROR: don't know how to print a Command of class: N4CVC416GetAbductCommandE Resolution This PR adds support in src/printer/smt2/smt2_printer.cpp to be able to print a Command of type GetAbductCommand. Given the similarities between get-abduct and synth-fun, I have refactored the printing logic in toStream(std::ostream& out, const SynthFunCommand* c) for a printing a SyGuS grammar to be shared between both SynthFunCommand and GetAbductCommand. As a result, you now see something like this: [avj@tempvm build]$ ./bin/cvc4 -vvv ../test/regress/regress1/abduct-dt.smt2 Invoking: (set-option :incremental false) Invoking: (set-logic ALL) Invoking: (declare-datatypes ((List 0)) (((nil) (cons (head Int) (tail List))))) Invoking: (declare-fun x () List) Invoking: (assert (distinct x nil)) minisat: Incremental solving is forced on (to avoid variable elimination) unless using internal decision strategy. Invoking: (get-abduct A (= x (cons (head x) (tail x)))) (error "Cannot get abduct when produce-abducts options is off.") Signed-off-by: Andrew V. Jones andrew.jones@vector.com
2020-07-10(proof-new) Add ONCE and FIXPOINT modes for term conversion proof generator ↵Andrew Reynolds
(#4709) We need multiple policies for generic proofs for term conversion, in particular, substitution has a "apply once" semantics which does not apply rewrite steps to a fixpoint like the rewriter. This is required for eliminating SUBS steps in the final proof. Also note that an internal method for getting proofs was generalized, which will be required for doing multiple variants of proofs in this utility in the future.
2020-07-10(proof-new) Update Theory interface for proof-new (#4648)Andrew Reynolds
This includes 4 changes: Theory constructor takes a ProofNodeManager, Theory::explain returns a TrustNode (of kind PROP_EXP), Theory::expandDefinitions returns a TrustNode (of kind REWRITE), Theory::ppRewrite returns a TrustNode (of kind REWRITE). These are all currently planned updates to the interface of Theory. This PR also connects some of the existing proof rule checkers into the proof checker, if one is provided to the constructor. It updates TheoryEngine and other places to process TrustNode in trivial ways (converting them into Node). These calls will later be updated as needed for proof support. This PR is also contingent on the performance tests for proof-new on SMT-LIB.
2020-07-10Always Update Git information when rebuilding (#4696)Andres Noetzli
Commit 61734b41b7b96e7e7cbf46021a357d840d64b42e changed the way some of our source files are generated. However, the change meant that once `git_versioninfo.cpp` was generated, it was never updated again: The custom command for `git_versioninfo.cpp` has no dependencies, so CMake does not rebuild it unless the output file is missing [0]. This commit reverts the change to our `gen-gitinfo` target and adds `git_versioninfo.cpp` to `BYPRODUCTS` for the target to indicate that the file may have changed. I am not sure if there is a better solution because we actually have to run `GitInfo.cmake` to see if there have been any changes in the Git information. Introducing a dependency on all source files is not sufficient because other files or just the branch name may change. Note: The original solution only updates the timestamp of `git_versioninfo.cpp` if its contents actually change (`GitInfo.cmake` uses `configure_file()` to generate `git_versioninfo.cpp`, which only updates the timestamp when the contents changed [1]), so we don't do any unnecessary work. [0] https://cmake.org/cmake/help/latest/command/add_custom_command.html [1] https://cmake.org/cmake/help/latest/command/configure_file.html Signed-off-by: Andrew V. Jones <andrew.jones@vector.com> Co-authored-by: Andrew V. Jones <andrew.jones@vector.com>
2020-07-10Front end support for integer AND (#4717)Andrew Reynolds
2020-07-10[Interpolation] Add interface for SyGuS interpolation module (#4677)Ying Sheng
This is the second step of adding Interpolation. The whole change will be adding the API for (get-interpol s B), which is aim for computes an I that A->I and I->B. Here A is the assertions in the stack. The second step creates the component for computing interpolation, while omits the implementation.
2020-07-10Add deps/install/lib to RPATH and warn user when using dynamic libs. (#4684)Gereon Kremer
Installing the cvc4 binary does not work right now if it links against a shared library obtained via one of the contrib scripts. This PR thus adds deps/install/lib to the RPATH so that the installed binary works at all in this case. This change however paves the way to more problems: If one install such a dynamically linked binary and then removes (or updates) one the shared libraries in deps/install/lib, the installed binary most probably stops working. Hence, this PR checks whether this may happen (whether we link dynamically and link against a shared library from deps/install/lib) and, if this is the case, informs and warns the user about this issue. If the user tries to install to the default install prefix (/usr/local) we disallow installation entirely.
2020-07-10Update competition scripts (#4715)Andrew Reynolds
This PR creates a "current" sygus comp scripts, similar to what we have been doing for SMT COMP. It updates these scripts to fix the option names, as many have changed recently. This also copies the SMT COMP current scripts to 2020, since they were used in the current state. @4tXJ7f let me know if this is not the case.
2020-07-09Ensure legal elimination for witness rewrite (#4688)Andrew Reynolds
Fixes #4685. A recent commit #4661 added assertions for checking whether a witness rewrite corresponded to a legal elimination. #4685 demonstrates that these assertions can be violated and hence should be checked to ensure the rewrite is sound.
2020-07-09Disable unsat cores in timeout regression (#4713)Andrew Reynolds
Fixes a timeout in the nightlies. One regression times out during unsat core checking. This appears to be random, the subcall to check for unsat-cores is applying sygus-inst in the expected way, however, it struggles to find the right instances. Furthermore note that we are planning to redo implementation of unsat cores soon (when proof-new is fully merged), so we should revisit this (and all other) regressions with --no-check-unsat-cores when that happens.
2020-07-09Associate all lemmas in non-linear arithmetic with an inference identifier ↵Andrew Reynolds
(#4712) This marks all lemmas in non-linear arithmetic with an identifier, which indicates informally the kind of justification that was used for them. The main motivation for this is for debugging the behavior of the non-linear solver. The number of inferences can then be seen with --stats: nl::inferences, [(SPLIT_ZERO : 19), (SIGN : 4), (COMPARISON : 29)] The same design was used in strings and has been quite helpful. This also adds a few high level stats to the new statistics class for non-linear.
2020-07-09(proof-new) Theory engine proof generator (#4657)Andrew Reynolds
This adds the proof generator used by TheoryEngine for generating proofs for explanations.
2020-07-08Re-implement handling of --tlimit (#4655)Gereon Kremer
As a first step within this project, this PR provides a new implementation that backs --tlimit. It uses setitimer (as timer_settime is not available on MacOS) to make the OS send a signal after the given wall clock time has passed. In more detail, this PR: removes the current handling of --tlimit (TlimitListener and its integration in the NodeManager) adds a new TimeLimitListener that lives in src/main uses TimeLimitListener directly in runCvc4() adds a signal handler for SIGALRM (that also uses the existing timeout_handler)
2020-07-08Add getName() method to options. (#4704)Mathias Preiner
getName() returns the long option name if it exists and an empty string otherwise.
2020-07-08Always interleave theory combination with quantifiers (#4703)Andrew Reynolds
This removes an option setting that made quantifiers always run at full effort (before theory combination) when an undecidable theory was present. The intuition is that such theories may also be unfair wrt theory combination, so quantifiers might as well "join them" at full effort. However, this option modification significantly hurts our performance in terms of timeouts on verification benchmarks from Facebook, where theory combination needs to run but quantifiers (alone) is preempting it from running. The correct solution is in fact to have other theories interleave with theory combination with the same policy as quantifiers (I've opened CVC4/cvc4-wishues#74).
2020-07-07Improve and fix secant and tangent lemmas in the transcendental solver (#4689)Andrew Reynolds
Fixes #4686. This benchmark failed an assertion that corresponded to the fact that a refinement lemma did not evaluate to false in the current model (and hence does not rule out the current model). This was caused by applying the rewriter in a way that led to an incorrect approximation. This meant that some tangent and secant lemmas would be ineffective. The benchmark in that issue now times out, but makes progress in the refinement lemmas it generates. This also simplifies and improves the use of approximated values (instead of model values) when constructing tangent and secant lemmas.
2020-07-07Transfer ownership of internal Options from NodeManager to SmtEngine (#4682)Andrew Reynolds
This PR decouples Options from NodeManager. Instead, options now live in SmtEngine. The changes that were required for this PR include: The main internal options object is now owned by SmtEngine instead of ExprManager. The ownership resource manager is moved from NodeManager to SmtEngine. Node manager listeners are deleted, timeouts and resource limits are set during SmtEngine::finishInit. A temporary hack was added to make the last constructed SmtEngine to be the one in scope. This ensures that options are in scope whenever an SmtEngine is created. The methods for invoking "subsolvers" (theory/smt_engine_subsolver.h,cpp) was simplified, as versions of these calls that change options do not have to clone a new copy of the ExprManager anymore. Resource manager was removed from the smt2 parser. Minor refactoring was done in SmtEngine to copy "original options" so that options are restored to their state after parsing command line options on reset. Updates to unit tests to ensure conformance to new options scoping.
2020-07-07Increase the minimum version of CMake due to the use of 'APPEND' with ↵Andrew V. Jones
strings (#4702) Signed-off-by: Andrew V. Jones <andrew.jones@vector.com>
2020-07-06Front end support for sequences (#4690)Andrew Reynolds
With this PR, we now support a preliminary draft of a theory of sequences. This PR adds front end support for sequences in the smt2 parser, in the new API, adds regressions and unit tests for them. As discussed offline, many of the string kinds are given a sequence version in the external API, but not in the internal one. This means that a special case for such kinds, getKindHelper was added to Term. We do not yet support proper smt2 printing of sequences, which will require access to this code for Kind conversions (to distinguish e.g. str.++ from seq.++).
2020-07-06[GitHub] Add link to fuzzing guidelines in issues (#4695)Andres Noetzli
2020-07-02Remove SWIG bindings (#4683)Andres Noetzli
This commit removes support for SWIG bindings for the legacy API. The bindings were already broken by 19054b3b1d427e662d30d4322df2b2f2361353da and we are not planning on using SWIG for the Java API for the new API.
2020-07-02Fix regression option (#4680)Andrew Reynolds
2020-07-02 (proof-new) Updates to skolem manager interface (#4664)Andrew Reynolds
Adds a fix for mkPurifySkolem and introduces new interfaces in preparation for arithmetic operator elimination and term formula removal proofs.
2020-07-02(proof-new) Proof rule checkers run on skolem forms (#4660)Andrew Reynolds
Previously, the proof rule checkers were run on witness form for convenience. However, it is more flexible for the sake of the internal calculus to run on Skolem forms. The main reason is that the conversion to/from witness form does not preserve terms that contain witness. Our preprocessing steps rely on using witness terms. This design change additionally simplifies a lot of the code of the builtin proof rule checker. Instead, witness forms can be queried on an as-needed basis, e.g. in MACRO_SR_PRED_TRANSFORM.
2020-07-02(proof-new) Proof node updater (#4647)Andrew Reynolds
Adds utility for updating proof nodes. The module for post-processing proof nodes in the SmtEngine for the sake of proof conversion to external formats will build on this utility. Requires #4617.
2020-07-01Add solver for integer AND (#4681)Andrew Reynolds
This omits certain inference schemas (sum and bitwise lemmas) which depends on an option that will be added later.
2020-07-01Add testing infrastructure for LFSC signatures (#4678)Andres Noetzli
This commit adds testing infrastructure for LFSC signatures that is enabled when CVC4 is configured with LFSC. The testing infrastructure adopts run_test.py from https://github.com/CVC4/LFSC with minor modifications (mainly adding support for a list of include directories that are searched to resolve *.plf dependencies). The commit uses the existing examples and test files from proofs/signatures as the initial set of tests. Co-authored-by: Alex Ozdemir aozdemir@hmc.edu
2020-07-01 Inferences and model construction taking into account seq.unit (#4607)Andrew Reynolds
Towards theory of sequences. This makes the strings solver handle seq.unit, which requires two new inferences and updates to its model construction. It also fixes a bug in the best content heuristic, which previously failed to update the best score.
2020-07-01(proof-new) Updates to evaluator (#4659)Andrew Reynolds
This will be required to separate "evaluation steps" from "rewrite steps" when reconstructing proofs of rewrites.
2020-06-30(proof-new) Improve rewriter for WITNESS (#4661)Andrew Reynolds
Proof checking failures revealed that we are not rewriting witness for Boolean variables (witness ((x Bool)) x) ---> true and (witness ((x Bool)) (not x)) ---> false. Also adds 2 assertions that are required for elimination (witness ((x T)) (= x t)) ---> t. These assertions should always hold due to the witness terms we construct.
2020-06-30Fix normal form for re.comp (#4676)Andrew Reynolds
Fixes #4674.
2020-06-30Update NEWS post 1.8 release (#4666)Andres Noetzli
2020-06-30Fix GMP compilation for win64. (#4675)Mathias Preiner
2020-06-30Simplify quantifiers strategy for when to apply last call effort check with ↵Andrew Reynolds
fmfBound (#4673) There was a strategy in place for alternating which rounds quantifier instantiation would run on when --fmf-bound is enabled. However, this made it so that in some cases, no instantiation strategy would be applied, if e.g. fmfBound was enabled but no quantified formulas were handled by that strategy. It is not clear if this strategy is a good idea, considering all use cases of quantifiers, and hence this PR deletes this block of code. This makes it so that several eqrange benchmarks are answered "unsat" quickly.
2020-06-30Interpolation step 1 (#4638)Ying Sheng
This is the first step of adding Interpolation. The whole change will be adding the API for (get-interpol s B), which is aim for computes an I that A->I and I->B. Here A is the assertions in the stack. The first step creates the API framework, while omits the implementation for getting interpolation.
2020-06-30contrib: Update to GMP 6.2.0, compile static and shared libraries. (#4671)Mathias Preiner
2020-06-29Add internal support for integer and operator (#4668)Andrew Reynolds
Towards merging iand branch to master. This adds internal support for an "integer AND" operator.
2020-06-29Make ExprManager constructor private (#4669)Andres Noetzli
This commit makes the ExprManager constructor private and updates the initialization of subsolvers, unit tests, and system tests accordingly. This is a step towards making options part of SmtEngine instead of NodeManager.
2020-06-29Python Sort tests (#4639)makaimann
This commit ports over the sort_black tests to the pytest infrastructure to test the Python bindings. It also adds missing functionality that was revealed during the testing.
2020-06-29Fix memory leak in unit test node_algorithm_black (#4670)Andres Noetzli
Commit ccd4500 modified the unit test node_algorithm_black. It added d_bvTypeNode as a data member to the class and initialized it in setUp() but did not free it in tearDown(), which set off ASan. This commit fixes tearDown() to free d_bvTypeNode. Marking this as major because it should fix the nightlies.
2020-06-28Fix non-termination issues in simpleRegExpConsume (#4667)Andrew Reynolds
There were two issues related to RE in bodies of re.* that accepted the empty string that led to non-termination in the rewriter for regular expressions. This also improves trace messages for simpleRegExpConsume. Fixes #4662.
2020-06-28Proof Rules and Checker for Arithmetic (#4665)Alex Ozdemir
This PR introduces proof rules for arithmetic and their checker. The code is dead, since these rules are never used.
2020-06-27Add API for retrieving separation heap/nil term (#4663)Andres Noetzli
This commit extends the API to support the retrieval of heap/nil term when separation logic is used and changes the corresponding system test accordingly. This commit is in preparation of making the constructor of `ExprManager` private.
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback