summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-08-02Merge branch 'master' into fixAsanInteractiveShellBlackfixAsanInteractiveShellBlackAndrew Reynolds
2020-08-02Fix ASan failure in interactive_shell_blackAndres Noetzli
This commit fixes an issue reported by ASan for unit test `interactive_shell_black`. The unit test was failing because nodes were created in the wrong node manager. The issue was likely introduced with e8bbee7afb039834955aee96d181b499550a28fe.
2020-08-01Ensure strict length constraint for decompose rule (#4821)Andres Noetzli
Fixes #4820. The performance issue was caused by 0988217562006d3f59e01dc261f39121df6d75f5. That commit introduced an option (`--strings-len-conc`) that optionally moves the length constraint for skolems to the conclusion of an inference instead of making it part of the term registration. However, for `DEQ_DISL_STRINGS_SPLIT`, we were only asserting that `LENGTH_GEQ_ONE` in the case where this option was not enabled, instead of asserting that the length of the skolem is equal to the component on the other side of the disequality. This lead to an infinite loop of inferences because we effectively were just splitting a component into two skolems and the only restriction was that the first one was non-empty. We guessed the second skolem to be empty, so the first skolem was equal to the component, the skolem was marked congruent, and we ended up with the same normal form as before. The commit fixes the issue by adding an argument to `getDecomposeConclusion()` that specifies whether to add the length constraint or not. This option is used to always add the length constraint in the case of `DEQ_DISL_STRINGS_SPLIT`.
2020-08-01Add methods for constructing datatype types from NodeManager (#4823)Andrew Reynolds
This is work towards eliminating the Expr-level datatype. This PR implements the required methods for constructing datatype types from NodeManager. In particular, this PR copies the "mkMutualDatatypeTypes" methods and converts them to Node-level. The next PRs will be in preparation for using these methods instead of the Expr-level ones. It also adds a flag d_isRecord to DType, which is required for supporting record printing in the cvc printer, which will be updated in another PR. It also eliminates an interface for constructing constructor types via Expr-level DatatypeConstructor objects, which was unused.
2020-08-01Ensure that we only find '.a's when building statically (#4785)Andrew V. Jones
## Issue When trying to building statically, and if your machine *does not* have static libraries (e.g., there is [no static GMP on CentOS 8](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/considerations_in_adopting_rhel_8/index#removed-packages_changes-to-packages)), then CVC4's CMake does not detect this: ``` FAILED: bin/cvc4 : && /usr/bin/c++ -O3 -Wall -Wno-deprecated -Wsuggest-override -Wnon-virtual-dtor -Wimplicit-fallthrough -Wshadow -Wno-class-memaccess -fuse-ld=gold -static src/main/CMakeFiles/main.dir/command_executor.cpp.o src/main/CMakeFiles/main.dir/interactive_shell.cpp.o src/main/CMakeFiles/main.dir/signal_handlers.cpp.o src/main/CMakeFiles/main.dir/time_limit.cpp.o src/main/CMakeFiles/cvc4-bin.dir/driver_unified.cpp.o src/main/CMakeFiles/cvc4-bin.dir/main.cpp.o -o bin/cvc4 src/libcvc4.a src/parser/libcvc4parser.a src/libcvc4.a -Wl,-Bdynamic /usr/lib64/libgmp.so -Wl,-Bstatic ../deps/install/lib/libantlr3c.a && : /usr/bin/ld.gold: error: cannot mix -static with dynamic object /usr/lib64/libgmp.so ``` ## Resolution This PR changes CVC4's CMakeLists such that, if you're building statically, it *only* allows for linking against `.a`s (or `.a`s + `.lib`s on Windows). Signed-off-by: Andrew V. Jones <andrew.jones@vector.com>
2020-08-01Fix component contains for splicing due to substring. (#4705)Andrew Reynolds
Fixes #4701. That benchmark now times out.
2020-07-31Add SyGuS Python API (#4812)yoni206
This commit extends the Python API with support for SyGuS functionality. This required the addition of a nullary constructor for `Grammar` in the C++ API. A unit test is also included, and is a translation of the corresponding C++ API unit test. Examples are not added yet, but are ready and planned for a next PR (in order to keep this one shorter).
2020-07-31Split listener classes from SmtEngine (#4816)Andrew Reynolds
This moves listener classes owned by SmtEngine to their own file. The SmtEnginePrivate class previously what itself a NodeManagerListener. This class will be deleted. Instead a new NodeManagerListener is introduced here whose sole responsibility is to do the work required for node manager listening. Note I had to add a (temporary) friend relationship to SmtEngine, which will be removed in an upcoming PR to split the management of dumping to its own utility.
2020-07-30Standardize explanations in arrays (#4804)Andrew Reynolds
Some internal inferences had a non-standard way of providing (disjunctive) reasons and a custom way of explaining them. This PR simplifies the array solver so that its explanations are analogous to the other equality engine based theory solvers (strings, datatypes, sets, ...). This is done in preparation for the incorporation of the proof equality engine in arrays, which follows a standard design for reasons/explanations. The performance impact on QF arrays is negligible
2020-07-30Python API: Add support for sequences (#4757)Andres Noetzli
Commit 9678f58a7fedab4fc061761c58382f4023686108 added front end support for sequences. This commit extends that support to the Python API. It also adds simple C++ and Python examples that demonstrate how the API works for sequences.
2020-07-30Cad implementation (#4774)Gereon Kremer
This commit implements the CAD interface added in #4773.
2020-07-30Adds the interface for the CAD-based arithmetic solver. (#4773)Gereon Kremer
This PR adds some utilities and, most importantly, the interface of the new CAD-based solver. The approach is based on https://arxiv.org/pdf/2003.05633.pdf and the code structure follows the paper rather closely.
2020-07-30When linking Editline, use 'pkg-config' to correctly find the link-time ↵Andrew V. Jones
dependencies (#4809) Signed-off-by: Andrew V. Jones <andrew.jones@vector.com>
2020-07-30Fix null case for sygus printing (#4793)Andrew Reynolds
Avoids crashing on some of our debug traces.
2020-07-30(proof-new) Stream output for ProofNode (#4789)Andrew Reynolds
2020-07-29(proof-new) Fixes for getFreeAssumptions (#4802)Andrew Reynolds
Free assumptions weren't getting cleaned up due to not doing a postorder traversal. This issue came up when doing subproof sharing involving SCOPE proofs.
2020-07-28fixing issue #4808. (#4810)Ying Sheng
fixing issue #4808. Remove structural binding, which only supported by c++17.
2020-07-28Remove arrays lazy rintro option (#4806)Andrew Reynolds
This option has model soundness issues (#4771) and moreover is overall worse performance on SMT-LIB {QF_ABV QF_ABVFP QF_ABVFPLRA QF_ALIA QF_ANIA QF_AUFBV QF_AUFLIA QF_AUFNIA QF_AX}: Configuration #unsat time #sat time #solved #total CVC4-072720_def 9428 9405.46 24932 16631.6 34360 35399 CVC4-072720_nalr1 9446 9536.41 24924 16146.3 34370 35399 where def = default, nalr1 = --no-arrays-lazy-rintro1. Fixes #4771. FYI @barrettcw
2020-07-28Replace Expr with Node in Term/Op (#4781)Andres Noetzli
This commit changes Term and Op to use Nodes internally instead of Exprs. This is a step towards removing the Expr-layer. This commit also adds some missing checks regarding the number of arguments for a given kind that were previously missing, which caused issues in unit tests when using Node instead of Expr.
2020-07-28Fix regular expression delta for complement (#4765)Andrew Reynolds
Fixes #4759 . Also refactors this method.
2020-07-28Supporting seq.nth (#4723)yoni206
This PR adds support for seq.nth operator by eliminating it during expandDefinitions, based on sub-sequences. Tests that use this operator are also included.
2020-07-28Interpolation: Add interface for SyGuS interpolation module (step3) (#4726)Ying Sheng
This is the 3rd step of adding interface for SyGuS Interpolation module. 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 3rd step partially implemented the interpolation module.
2020-07-28Use lemma property enum for OutputChannel::lemma (#4755)Andrew Reynolds
There are 3 Boolean flags for OutputChannel::lemma, and plans to add another for relevance. This makes them into a enum.
2020-07-27(proof-new) Proof production for term formula removal (#4687)Andrew Reynolds
This adds proof support in the term formula removal pass. It also refactors this class heavily so that its interface is more intuitive and does not depend on AssertionPipeline.
2020-07-27(proof-new) Arithmetic operator elim proof producing (#4783)Andrew Reynolds
This updates the interface for arithmetic operator elimination for the new proof format. The actual proof production of the operator elimination class (providing proofs for introduced witness terms) will be done in a separate PR. This also changes the witness terms introduced by this class so their body is in Skolem form, which simplifies term formula removal. Co-authored-by: Alex Ozdemir <aozdemir@hmc.edu>
2020-07-27Consider negation's proof before triggering arith pfs. (#4776)Alex Ozdemir
The current arith proof machinery can prove conflicts which are explained by assumptions and tightened assumptions. Previously we verified that the conflict constraint was explained in terms of assumptions and tightened assumptions, before trying to save/produce a proof. We did not verify that the negated constraint was an assumption or tightened assumption. This caused us to attempt to prove conflicts around constraints whose negations where proven by general means (in the case of #4714, by the equality engine), which the proof machinery was not prepared to handle. This PR also checks that the negate constraint is an assumption or tightened assumption, before saving the proof. Thanks, Gereon, for doing the initial investigation into this! fixes 4714 Co-authored-by: Gereon Kremer <nafur42@gmail.com>
2020-07-21GH Actions: Cancel builds on push, remove redundant mac OS build. (#4779)Aina Niemetz
2020-07-21Support uninterpreted constants in the evaluator (#4777)Andrew Reynolds
2020-07-21Preparations for a CAD-based arithmetic solver (#4762)Gereon Kremer
Based on #4679, this PR contains further preparations for a CAD-based arithmetic solver that extends the current NonlinearExtension. In detail, it provides: a Constraints class that manages all (polynomial) constraints visible to the cad solver, a collection of methods used for cad projections, a VariableOrdering class that provides different variable ordering heuristics tailored to cad, an extension to the NlModel class, allowing for witness terms, further conversion methods, in particular between Node and poly::Polynomial, poly::Value and RealAlgebraicNumber.
2020-07-20Fix a deadlock in the signature tests. (#4772)Alex Ozdemir
* wait() deadlocks if the OS pipe fills * communicate() does not This is essentially a duplicate of [this](https://github.com/CVC4/LFSC/pull/38).
2020-07-17Improving equality engine tracing (#4770)Haniel Barbosa
To keep track of the reasoning in the equality engine for n-ary kinds, for which partial applications amount to valid fully-applied terms, it's imperative to be able to see the IDs of the internal representation of the equality engine nodes. This commit updates tracing messages to print these IDs. It also improves the tracing for explanation generation.
2020-07-17(proof-new) Proof recording for assertions pipeline (#4766)Andrew Reynolds
Adds explicit steps to preprocess proof generator if one is provided.
2020-07-17Enumerate shapes feature in fast sygus enumerator (#4742)Andrew Reynolds
This adds the feature of enumerating shapes in the fast sygus enumerator, which is required for a new algorithm for sygus solution reconstruction. This also adds a builtinToSygus backwards mapping that is required for that algorithm as well. Note this also changes the implementation of mkFreeVar in sygus term database from skolem to bound variable, which is required to do proper caching for expr::hasBoundVar.
2020-07-17Add NodeManagerScopes to fix use-after-free issues (#4768)Andres Noetzli
This commit fixes our current ASan issues. Some methods in `NodeManager` were not creating a `NodeManagerScope` for `this` but were indirectly calling methods that get the `NodeManager` from the current scope, so we ended up calling methods on a `NodeManager` that had already been destroyed.
2020-07-17Replace options listener infrastructure (#4764)Andrew Reynolds
This replaces the old options listener infrastructure with the OptionsManager introduced in cb8d041. It eliminates a "beforeSearchListener", which was a custom way of some options throwing a modal exception if they were set after initialization. Now all options are consistent: no option can be set after initialization. It also moves managed ostream objects to the OptionsManager. @mpreiner The next step will be to remove the "notifies" field from the Options build system and then proceed with cleaning src/options/.
2020-07-17Support for using 'libedit' over 'readline' #4571 (#4579)Andrew V. Jones
Signed-off-by: Andrew V. Jones <andrew.jones@vector.com>
2020-07-17(proof-new) Updates to strings core solver (#4642)Andrew Reynolds
This updates the core strings solver in preparation for proofs. The main changes include: The addition of the strings PfRule enum values. The definition of a "getConclusion" static method, used by the core solver, and to be used in the future by the strings proof checker. This includes several optional forms of lemmas, which are added as options in this PR. Major simplifications to our inference schemas for disequality handling (a STRING_DECOMPOSE inference rule). Note this is the only significant intended behavioral change in this PR. Minor updates to the form of inferences send to inference manager, for instance to orient equalities in the expected way, and to reorder assumptions. These changes are done for uniformity and make the strings proof reconstruction from inference steps easier.
2020-07-17Add option manager and simpler option listener (#4745)Andrew Reynolds
This adds the "OptionManager" class, which will live in SmtEngine. This is the required infrastructure for implementing all "reactive" options, i.e. those that must take effect immediately. This PR does not enable this class yet, it simply adds the definitions. After this PR, we can connect it to SmtEngine and delete the old options listener infrastructure.
2020-07-17Integration of libpoly (#4679)Gereon Kremer
This commit integrates LibPoly into CVC4. It adds `contrib/get-poly`, adds it to the configure script, cmake and places where CVC4 inspects its own build configuration. Furthermore, it adds `CVC4::RealAlgebraicNumber` (which wraps `poly::AlgebraicNumber`) including some basic unit tests and some utilities.
2020-07-16Fix EqProof to ProofNode conversion (#4760)Haniel Barbosa
A wrong change slipped away during the cleaning of the module. This commit fixes the conversion.
2020-07-16(proof-new) Implements the conversion between EqProof and ProofNode (#4756)Haniel Barbosa
2020-07-16Resource manager cleanup (#4732)Gereon Kremer
This PR performs some general cleanup in and around the ResourceManager class. In detail, it does remove --hard-limit (we decided to always leave the solver in a usable state, i.e. always do a soft limit), remove --cpu-time (we decided to always use wall-clock time for time limiting) replace old gettimeofday-based Timer by new std::chrono-based WallClockTimer clean up the logic around beginCall() and endCall()
2020-07-16Split abstract values utility from SmtEngine (#4754)Andrew Reynolds
Towards refactoring SmtEngine.
2020-07-16Make ExtTheory a utility and not a member of Theory (#4753)Andrew Reynolds
Previously, we assumed that ExtTheory, the module for doing context-dependent simplification, was one-to-one with Theory. This design is not necessary. This makes this class a utility, which can be used as needed. This makes e.g. the initialization of TheoryStrings much easier, since the ExtTheory object can be created first.
2020-07-16Remove cumulative time limits and cpu time limits (#4711)Gereon Kremer
This PR removes two things from the resource manager: cumulative time limits cpu time limits Cumulative time limiting has been moved to the binary and is (as before) accessible via --tlimit. As per discussion among the devs, we no longer support time limits based on CPU time and thus everything related to that is removed as well. Note that this includes the option --cpu-time, removes an argument from SmtEngine::setTimeLimit() and the method SmtEngine::getTimeRemaining() .
2020-07-15Fixes memory leak when an exception goes through runCvc4(). (Fixes #4590) ↵Gereon Kremer
(#4750) As noted in #4590, CVC4 may leak memory if an exception is thrown that interrupts the command execution loop in runCvc4(). While not a major issue (the binary is terminated anyway in this case, this is also why we label it as feature), we should fix it nevertheless. This commit makes sure that the current command is properly managed by using `std::unique_ptr` to handle its deletion.
2020-07-15(proof-new) Adding API for converting EqProof into ProofNode (#4747)Haniel Barbosa
Also puts EqProof into its own module. Next will come the implementation of the API.
2020-07-15Use Nodes for SmtEngine assertions (#4752)Andres Noetzli
This commit changes SmtEngine::assertFormula() to use Nodes rather than Exprs and changes AssertionList to be Node-based. This is work towards removing the Expr layer.
2020-07-15Split abduction solver from SmtEngine (#4733)Andrew Reynolds
This splits everything related to abducts into its own standalone module, AbductionSolver. It furthermore converts some of the interfaces of SmtEngine to make them take Node instead of Expr (this will be done for every method eventually). The code for interpolation should follow a similar pattern, e.g. InterpolantSolver.
2020-07-15Use TypeNode in UninterpretedConstant (#4748)Andres Noetzli
This commit changes UninterpretedConstant to use TypeNode instead of Type.
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback