Age | Commit message (Collapse) | Author |
|
Done by:
Running rg 'smt_util/node_visitor' -l | xargs sed -i 's/smt_util\/node_visitor/expr\/node_visitor/' in src to change the #includes
Moving the file
Changing src/expr/CMakeLists.txt and src/CMakeLists.txt
clang-format, omitting node_visitor.h.
In reference to discussion, here.
|
|
|
|
|
|
|
|
|
|
|
|
I'll remove the error later
|
|
Before, a "simple farkas proof" was one that just applied the farkas
lemma.
Now it allows for the antecedents to (optionally) be tightened.
Note that hasSimpleFarkasProof was (and is) dead code.
We will use it to decide whether to print a proof or a hole.
|
|
Previously, DecisionEngine maintained a vector of ITE strategies.
However, only one was ever created. This uses a single unique_ptr member
for the ITE strategy instead of a vector.
|
|
This adds the unit test reported in issue #4077.
The issue was fixed in #4081.
|
|
Fixes #4077. The master equality engine in `TheoryEngine` was being
created at SAT context level 1. If the context was popped to level zero
by `(reset-assertions)`, `true` and `false` were removed from the master
equality engine, which lead for example to `(= ((_ extract 3 3) x) (_
bv1 1))` and `(_ bv1 4)` being merged (this can be gathered from looking
at `-t equality`). This commit fixes the issue by postponing the global
context pushes until after the theory engine has been initialized.
|
|
Throws warning instead of error if two terms with the same rewritten form evaluate differently, but the evaluation is non-constant.
Fixes #4096 and fixes #4089.
|
|
|
|
Missed this one when real to int was disabled for quantifiers. Fixes regress1.
|
|
Towards theory of sequences.
|
|
Fixes #4050.
|
|
Currently an nec benchmark in regress2 is very slow (57 seconds in production) due to disabling the nec-specific options in 67c730c). This reenables these options for this benchmark.
|
|
I am still accessing Expr-level Datatypes for the sygus v1/v2 parsers (within smt2). This will be addressed in two ways in the future:
(1) The sygus v1 parser will be deleted,
(2) The sygus v2 parser will be updated to use a "Grammar" object as an extension of the new API, which will hide all calls to the underlying datatype. (See https://github.com/abdoo8080/CVC4/tree/sygus-api). FYI @abdoo8080 .
Note I've renamed "mkMutualDatatypeTypes" to "bindMutualDatatypeTypes" to be more accurate and follow the updated name conventions in the parser.
The next step will be to handle parametric datatypes, which are not specifically addressed by this PR.
|
|
With quantifiers over real variables, --solve-real-as-int is neither sound nor complete. Thus we should abort in this case.
|
|
This option was unimplemented and was equivalent to setting the instantiation level of all quantified formulas to 0.
|
|
If we combine finite model finding and higher-order, then we could try to find a model find operators whose kind was BOUND_VARIABLE.
|
|
Supporting SMT-LIB's (reset) command on the API level is dangerous and not required -- it's sufficient to just destroy the solver object and create a new one if necessary. It's dangerous because invalidated objects can be passed in after a reset, and we would need to find a clean way to guard against this. We want to guard against this in the future, but for now it is cleaner to make it explicit (by not having this functionality in the API but forcing the user to destroy and recreate the solver object) that these objects can't be reused.
|
|
|
|
Fixes #3955.
Previously we were getting two calls to notifyNewEqClass from the equality engine for new application nodes, since the notification was being done in an internal call to newNode(...). The proper place to call this is in addTermInternal(...) which is called only once per Node per SAT context.
This bug potentially impacted some performance (due to redundant calls), and also broke the contract that notifyNewEqClass should only be called once per node per SAT context. In most cases, this was being handled in a benign way by theory solvers, although an assertion was failing in EqualityQuery, which is fixed by this PR.
A block of code changed indentation in this commit.
|
|
All things related to the current BV solver are obsolete in the sense
that we are working on a new BV solver implementation. The BV abstraction
module has several issues and is quite hacky, it should only be enabled
in experimental settings. We don't want to remove it yet though, we want
to keep it around for future evaluation purposes. This commit
categorizes the option to enable the module and a second option related
to the module as 'undocumented'.
|
|
Removes DatatypeSelectorDecl and DatatypeDeclSelfSort. Add selectors is now inlined. A special case is added for the "self selector", instead of using a class as a dummy argument.
I updated the Python files, although would be helpful to double check this is correct.
Co-authored-by: makaimann <makaim@stanford.edu>
|
|
* Remove getIndices for Kinds
* Test importing pycvc4
* Distutils install for pycvc4
* Use full path for cvc4kinds prefix
* Remove zip_safe option (not needed for distutils)
* Automatically clean up setup.py intermediate files
* Rely on make install to install pycvc4
* Run make install when testing python bindings
* Fix: Check importing pycvc4 when python bindings are built
* Remove one -Wshadow warning for cython-generated files
* Put the fake kinds submodule in generated __init__.py
* Remove unnecessary file permission options in python CMakeLists
* Respect install prefix unless in a virtualenv
* Handle python2 print function
* Use VIRTUAL_ENV environment variable to check if in python virtualenv
* Add header and documentation to setup.py.in
* Capitalize CVC4 in PyCVC4Install
* Update src/api/python/CMakeLists.txt
Co-Authored-By: Mathias Preiner <mathias.preiner@gmail.com>
* Simplify CMakeLists for setup.py configuration
* Shorten virtualenv check with Mathias's suggestion
* Set TRAVIS_CVC4_PYTHON_BINDINGS to no in other builds
* minor: bash syntax fix
* Move pycvc4 import check to makeInstallCheck
* Include installed pycvc4 location on PYTHONPATH
* Better way to set PYTHONPATH
Co-authored-by: Mathias Preiner <mathias.preiner@gmail.com>
Co-authored-by: Andrew Reynolds <andrew.j.reynolds@gmail.com>
|
|
Moves SMT-COMP-specific options to the SMT-COMP script. Both of these options have led to issues (segfaults or infinite loops).
Issue #789 can be downgraded to "minor" after this PR.
Btw, I did not add these specialized options to the "incremental" script of SMT-COMP, since I'm assuming they should not be used there.
|
|
Fixes #4025.
Also makes our sygus default grammar for strings (slightly) better by including a dummy character, which is required for solving the regression added by this PR. A more robust (but unintuitive to the user) solution would be to include str.from_code( Start_Int ).
|
|
This is in preparation for migrating the parser to use the Term-level API for datatypes.
Notably, this adds the function mkDatatypeSorts for making mutually recursive datatypes. I've added a unit test that demonstrates this method (which mirrors the Expr-level datatype API).
|
|
Fixes #4022.
|
|
Fixes #4028. TheoryEngine's pointer was not updated to the new
PropEngine when resetting assertions. This commit fixes that. As far
as I can tell, this was the only class storing a PropEngine* that
isn't owned by PropEngine, so we should hopefully not have other
similar issues.
|
|
This never impacted performance positively. Fixes #3997 and fixes #4015.
There was a folder that the symmetry breaker was used on regress1/sym. These are simple examples that show when it is possible to find symmetries in SMT; the symmetry breaker is not critical for solving these. For now I'm leaving them as regressions documenting possible benchmarks to target if we revisit this technique.
|
|
Fixes #4021.
We were previously constructing a malformed HO_APPLY as part of a subgoal for induction.
|
|
Fixes #4019.
This feature was never fully implemented.
|
|
Fixes #4001.
This assertion was more of a conjecture (stating that easy cases of miniscoping are already handled). However some option combinations can break this invariant, regardless the code should do the correct thing.
|
|
|
|
This commit adds tables in the rewriter that store which function should
be used to rewrite which kind. We have separate tables for `EQUAL`
because every theory has its own equality rewriter.
|
|
Fixes #3814. `CnfProof` has a stack of assertions that are being
converted to clauses. `CnfStream::ensureLiteral()` can result in clauses
being added to the SAT solver. When adding a clause, we require an
assertion that can be associated with the clause
(https://github.com/CVC4/CVC4/blob/ba6ade0fc3f4cd339885652bb9bf5c87113c498d/src/prop/minisat/core/Solver.cc#L471-L476).
However, in the issue that was reported, the stack was empty, resulting
in an assertion failure. This commit fixes the issue by setting the
current assertion to be the null node when a literal is being ensured
(and changing the proof code to update the assertion associated with a
literal if it is currently null). This should be ok since the clauses
are not inputs or lemmas (if they are, the assertion associated with the
clause will be updated).
|
|
This fixes the case when all rows are inconsistent.
Fixes #3999.
|
|
|
|
cores. (#4011)
|
|
Fixes #4010.
|
|
Calling (reset-assertions) in start mode was not handled correctly.
Additionally, when calling (check-sat) after (reset-assertions) after a
(check-sat) call that answered unsat, we answered unsat instead of sat.
This cleans up and fixes reset-assertions) handling.
|
|
Fixes #4003.
Protects against a (class of) nonsensical option combinations.
|
|
|
|
* Fix assertion in resolution bound inferences
* Format
* Minor
Co-authored-by: Ahmed Irfan <43099566+ahmed-irfan@users.noreply.github.com>
|
|
|
|
|
|
Also adds --sort-inference to this list, fixes #3936.
|