summaryrefslogtreecommitdiff
path: root/src/theory/theory_model_builder.cpp
AgeCommit message (Collapse)Author
2021-07-12Improvements to debug check model (#6861)Andrew Reynolds
This makes it so that debug-check-models applies in production mode, not just in debug mode. It also verifies that type constraints are met.
2021-05-26 More precise includes of `Node` constants (#6617)Andres Noetzli
We store constants, e.g., BitVector and Rational, in our node infrastructure. As a result, we were indirectly including some headers in almost all files, e.g., the GMP headers. This commit changes that by forward-declaring the classes for the constants. As a result, we have to include headers like util/rational.h explicitly when we use Rational but it saves about 3 minutes in compile time (CPU time). The commit changes RoundingMode from an enum to an enum class such that it can be forward declared.
2021-05-13Add std::hash overloads for Node, TNode and TypeNode. (#6534)Mathias Preiner
Eliminates NodeHashFunction, TNodeHashFunction and TypeNodeHashFunction.
2021-04-12Fix computation of whether a type is finite (#6312)Andrew Reynolds
This PR generalizes TypeNode::isFinite / TypeNode::isInterpretedFinite with TypeNode::getCardinalityClass. It then uses this method to fix our computation of when a type should be treated as finite. Fixes #4260, fixes #6100 (that benchmark now says unknown without an error).
2021-04-12Refactor and update copyright headers. (#6316)Aina Niemetz
2021-04-09Rename CVC4_ macros to CVC5_. (#6327)Aina Niemetz
2021-04-01Rename namespace CVC5 to cvc5. (#6258)Aina Niemetz
2021-03-31Rename namespace CVC4 to CVC5. (#6249)Aina Niemetz
2021-03-09Merge initialization steps in TheoryModelBuilder (#4901)Andrew Reynolds
Currently when constructing models, we traverse the equality engine of the model 3 times during initialization. This PR merges these 3 traversals. This refactoring is necessary to update model building for the "centralized" approach for equality reasoning, where it will be important to traverse the equality engine of the model in a careful way (to skip irrelevant terms). The PR also makes a few minor optimizations for e.g. reducing map lookups, and adds more documentation.
2021-03-09Some more cleanup of includes (#6083)Gereon Kremer
This PR does some more cleanup of the includes.
2021-03-09Update copyright headers to 2021. (#6081)Aina Niemetz
2021-03-02Clean up includes to reduce compile times (#6031)Gereon Kremer
This PR cleans up a ton of includes, based on the suggestions of iwyu. Mostly, it removes includes from header files in favor of forward declarations and adds includes to source files.
2021-02-23Add interface to TheoryState for sort inference and facts (#5967)Andrew Reynolds
This eliminates the need for direct references to TheoryEngine from quantifiers and UF+cardinality. This PR also eliminates an unnecessary reference to TheoryEngine in TheoryModelBuilder and breaks a few more dependencies in quantifiers modules.
2021-01-19Use arbitrary ground term assignment for sorts where isInterpretedFinite is ↵Andrew Reynolds
true (#5790) This makes a small change to our model construction to assign arbitrary values to eqc for types that are "interpreted finite", that is, have finite cardinality under the assumption that uninterpreted sorts are finite/infinite (when finite model finding is on/off). Uninterpreted sorts themselves always use the type enumerator to assign distinct values. This fixes #5738. This change is necessary since there was previously a mismatch between types where isFinite != isInterpretedFinite, in particular a datatype with a single constructor with a unintepreted type field as in that issue.
2020-10-22Fix issue 5309 (#5327)mudathirmahgoub
This PR fixes #5309 by ensuring singleton terms are added to the model builder as representatives. Co-authored-by: Andrew Reynolds andrew-reynolds@uiowa.edu
2020-10-16Refactor SMT-level model object (#5277)Andrew Reynolds
This refactors the SMT-level model object so that it is a wrapper around TheoryModel instead of a base class. This inheritance was unnecessary. Moreover, it removes the virtual base models of the SMT-level model which were based on Expr. Now the interface is more minimal and in terms of Node only. This PR further simplifies a few places in the code that interface with the SmtEngine with things related to models.
2020-09-24SyGuS: Add default grammar for FP. (#5133)Aina Niemetz
2020-09-22Update copyright header script to support CMake and Python files (#5067)Mathias Preiner
This PR updates the update-copyright.pl script to also update/add copyright headers to CMake specific files. It further fixes a small typo in the header.
2020-08-25Connect combination engine to theory engine (#4940)Andrew Reynolds
This connects the implementation of CombinationEngine into TheoryEngine. By default, the combination engine of theory engine is CombinationCareGraph. This PR also consolidates and simplifies how models are built, note that: The TheoryModel object no longer tracks whether it is built, instead that is the job of ModelManager, The TheoryModelBuilder object is no longer responsible for calling TheoryEngine's collect model info method. Quantifiers engine uses a simpler interface for ensuring that TheoryEngine's model is built. This PR also makes some minor simplifications to TheoryEngine from the centralEe branch. Note that no significant behavior changes are intended in this PR.
2020-06-16Update copyright headers.Aina Niemetz
2020-05-20Use debug-check-model to enable internal debugging in check-model (#4480)Andrew Reynolds
Notice this also updates our regression script to use --debug-check-model, preserving previous behavior. Fixes #4461, fixes #4470, fixes #4471, fixes #4475, fixes #4448, fixes #4466, fixes #4460, fixes #4458, fixes #4455, fixes #4456, fixes #4386, fixes #4385, fixes #4478, fixes #4474.
2020-03-05Enable -Wshadow and fix warnings. (#3909)Mathias Preiner
Fixes all -Wshadow warnings and enables the -Wshadow compile flag globally. Co-authored-by: Clark Barrett <barrett@cs.stanford.edu> Co-authored-by: Andres Noetzli <andres.noetzli@gmail.com> Co-authored-by: Aina Niemetz <aina.niemetz@gmail.com> Co-authored-by: Alex Ozdemir <aozdemir@hmc.edu> Co-authored-by: makaimann <makaim@stanford.edu> Co-authored-by: yoni206 <yoni206@users.noreply.github.com> Co-authored-by: Andrew Reynolds <andrew.j.reynolds@gmail.com> Co-authored-by: AleksandarZeljic <zeljic@stanford.edu> Co-authored-by: Caleb Donovick <cdonovick@users.noreply.github.com> Co-authored-by: Amalee <amaleewilson@gmail.com> Co-authored-by: Scott Kovach <dskovach@gmail.com> Co-authored-by: ntsis <nekuna@gmail.com>
2020-02-28Fix assertion related to assignability in the model. (#3843)Andrew Reynolds
Fixes #3813. It appears that an assertion was hardcoded to check whether a term was a variable or APPLY_UF application whereas this check should use isAssignable. This avoids an assertion failure on the given benchmark.
2020-02-15Disable regression (#3761)Andrew Reynolds
Should fix recurring issue with nightlies. Also fixes a warning.
2020-01-30Do not debug check model for models with approximations (#3673)Andrew Reynolds
We don't run check-model for models with approximate values, however we were still running the internal debugCheckModel method, which leads to assertion failures. This disables this check. Fixes #3652.
2019-12-16Extend model construction with assignment exclusion set (#3377)Andrew Reynolds
This extends the core model building algorithm in CVC4 with "assignment exclusion sets". This functionality is useful for assigning values to terms of finite type that have specific restrictions on what their value cannot be. In detail, previously, all unassigned terms of finite type were always assigned the first term in the type enumeration. This is done since it is assumed that theories (e.g. datatypes) always do enough work to ensure that *arbitrary* values can be assigned to terms of finite type, and *fresh* values can be assigned to terms of infinite type. However, there are compelling cases (sets+cardinality for finite element types) where one may want to impose restrictions on what values can be assigned to terms of finite types. Thus, we now provide `setAssignmentExclusionSet` as a way of communicating these restrictions. This commit also refactors a few parts of `TheoryEngineModelBuilder::buildModel` to be clearer, in particular by adding a few helper functions, and by caching certain information early in the function instead of recomputing it. This is work towards #1123.
2019-12-12Use the node-level datatypes API (#3556)Andrew Reynolds
2019-11-01Fix non-termination in datatype type enumerator (#3369)Andrew Reynolds
2019-10-30Unify CVC4_CHECK/CVC4_DCHECK/AlwaysAssert/Assert. (#3366)Mathias Preiner
2019-10-27Fix collect model info for higher-order (#3409)Andrew Reynolds
This ensures we add lemmas when collect model info fails for the higher order extension of UF. This fixes #3405 (that benchmark now answers unknown).
2019-09-16Avoid computing cardinality when constructing models (#3268)Andrew Reynolds
2019-08-28Removing comments related to issues (#3232)Andrew Reynolds
2019-08-03Fix printing issue related to nested quotes (#3154)Andrew Reynolds
2019-04-17More use of isClosure (#2959)Andrew Reynolds
2019-04-03Update copyright headers.Aina Niemetz
2019-04-01FP: Fix wrong model due to partial assignment (#2910)Andres Noetzli
For a simple query `(not (= (fp.isSubnormal x) false))`, we were getting a wrong model. The issue was that `(sign x)` was not assigned a value and did not appear in the shared terms. In `TheoryFp::collectModelInfo()`, however, we generate an expression that connects the components of `x` to `x`, which contains `(sign x)`. As a result, the normalization while building a model did not result in a constant. This commit fixes the issue by marking `(sign x)` (and `(significand x)`) as assignable. Assignable terms can take any value while building a model if there is no existing value.
2019-03-26Update copyright headers.Aina Niemetz
2018-09-04Minor improvements to theory model builder interface. (#2408)Andrew Reynolds
2018-06-25Updated copyright headers.Aina Niemetz
2018-06-02 Fix assertion involving unassigned Boolean eqc in model (#2050)Andrew Reynolds
2018-05-23Add notions of evaluated kinds in TheoryModel (#1947)Andrew Reynolds
2017-12-08Make collect model info return a Bool (#1421)Andrew Reynolds
2017-11-30Fixes for issue 1404 (#1409)Andrew Reynolds
2017-11-01(Move-only) Refactor and document theory model part 2 (#1305)Andrew Reynolds
* Move type set to its own file and document. * Move theory engine model builder to its own class. * Working on documentation. * Document Theory Model. * Minor * Document theory model builder. * Clang format * Address review.
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback