summaryrefslogtreecommitdiff
path: root/src/expr
AgeCommit message (Collapse)Author
2020-03-18Explicitly handle isFinite for rounding modes (#4115)Andrew Reynolds
The function TypeNode::isFinite is designed to compute finiteness without computing cardinality for the sake of efficiency; there was a missing case for rounding modes, leading to an assertion failure. Fixes #4101.
2020-03-18Move node visitor class from smt_util/ to expr/ (#4110)Alex Ozdemir
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.
2020-03-06Remove tester name from APIs (#3929)Andrew Reynolds
This removes the field "tester name" from the Expr-level and Term-level APIs. This field is an artifact of parsing and thus should be handled in the parsers. This refactor uncovered an issue in our regressions, namely our smt version >= 2.6 was not strictly complaint, since the symbol is-cons was being automatically defined for testers of constructors cons. This disables this behavior when strict mode is enabled. It updates the regressions with this issue. This is work towards parser migration.
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-03-02 Split collect model info by types in strings (#3847)Andrew Reynolds
Towards a theory of sequences. We will need to do similar splits per type for most of the functions throughout strings.
2020-02-29Convert more uses of string to word (#3834)Andrew Reynolds
2020-02-27Fix -Wshadow warnings in common headers (#3826)Andres Noetzli
2020-02-26Move fix for vacuous sygus types out of the parser (#3820)Andrew Reynolds
This moves a fix for vacuous sygus types out of the parser and into the Expr-level datatype. This is a temporary fix so that further progress can be made on parser migration (and to declutter the parser). This will be refactored when an API for SyGuS is established (CVC4/cvc4-projects#38).
2020-02-26Initial work towards -Wshadow (#3817)Andrew Reynolds
2020-02-26Infrastructure for tautological literals in nonlinear solver (#3795)Andrew Reynolds
Work towards CVC4/cvc4-projects#113 and #3783. This PR adds the ability to mark certain literals as being tautological, since they can be assumed to hold in all models. This is important for internally generated literals whose purpose is to guide models generated by the linear solver but should not hinder our ability to answer "sat". This PR is required for further refactoring of check-model for transcendental functions.
2020-02-25Embed mkAssociative utilities within the API. (#3801)Andrew Reynolds
Towards parser/API migration.
2020-02-20Remove front-end support for Chain (#3767)Andrew Reynolds
2020-02-20Remove unused code (#3782)Andres Noetzli
2020-02-20Minor removals (#3786)Andrew Reynolds
Found while working on parser migration of datatypes.
2020-02-20Remove parser from bindings (#3779)Andres Noetzli
2020-02-19resource manager: Add statistic for every resource. (#3772)Mathias Preiner
This commit adds statistics for all resource steps. A resource statistic is incremented by 1 if the resource is spent (via `spendResource`). Fixes #3751.
2020-02-19Change Record to shared_ptr (#3778)Andrew Reynolds
2020-02-13Update sygus v1 parser to use ParseOp utility (#3756)Andrew Reynolds
2020-02-12Rename Java package to edu.stanford.CVC4 (#3752)Andres Noetzli
2020-02-06Generalize containsQuantifiers to hasClosure (#3722)Andrew Reynolds
2020-02-03Utility function for getting component types (#3703)Andrew Reynolds
2020-01-13Support arbitrary unsigned integer attributes (#3591)Andres Noetzli
Fixes #3586. On macOS, `size_t` resolves to `unsigned long` whereas `uint64_t` resolves to `unsigned long long`. Even though the types have the same bit-width and signedness, they are not considered the same type. This caused issues with `Attribute`s that store `size_t` values because we only specialized the `getTable()` struct for `uint64_t`. This commit changes the specialization to work for arbitrary unsigned integer types of at most 64-bit. It does that by generalizing the specialization of `getTable()` and by implementing a `KindValueToTableValueMapping` for unsigned integer attributes of up to 64-bit that casts integers between the attributes bit-width and `uint64_t`.
2019-12-17Generate code for options with modes. (#3561)Mathias Preiner
This commit adds support for code generation of options with modes (enums). From now on option enums can be specified in the corresponding *.toml files without the need of extra code. All option enums are now in the options namespace.
2019-12-16Move Datatype management to ExprManager (#3568)Andrew Reynolds
This is further work towards decoupling the Expr layer from the Node layer. This commit makes it so that ExprManager does memory management for Datatype while NodeManager maintains a list of DType. As a reminder, the ownership policy (and level of indirection through DatatypeIndex) is necessary due to not being able to store Datatype within Node since this leads to circular dependencies in the Node AST.
2019-12-14Simple optimizations for the core rewriter (#3569)Andrew Reynolds
In some SyGuS applications, the bottleneck is the rewriter. This PR makes a few simple optimizations to the core rewriter, namely: (1) Minimize the overhead of `theoryOf` calls, which take about 10-15% of the runtime in the rewriter. This PR avoids many calls to `theoryOf` by the observation that nodes with zero children never rewrite, hence we can return the node itself immediately. Furthermore, the `theoryOf` call can be simplified to hardcode the context under which we were using it: get the theory (based on type) where due to the above, we can assume that the node is not a variable. The one (negligible) change in behavior due to this change is that nodes with more than one child for which `isConst` returns true (this is limited to the case of `APPLY_CONSTRUCTOR` in datatypes) lookup their theory based on the Kind, not their type, which should always be the same theory unless a theory had a way of constructing constant nodes of a type belonging to another theory. (2) Remove deprecated infrastrastructure for a "neverIsConst" function, which was adding about a 1% of the runtime for some SyGuS benchmarks. This makes SyGuS for some sets of benchmarks roughly 3% faster.
2019-12-13Eliminate Expr-level calls in TypeNode (#3562)Andrew Reynolds
2019-12-13Add support for set comprehension (#3312)Andrew Reynolds
2019-12-12Use the node-level datatypes API (#3556)Andrew Reynolds
2019-12-11Activate node-level datatype API (#3540)Andrew Reynolds
2019-12-06Add ExprManager as argument to Datatype (#3535)Andrew Reynolds
2019-12-05Introduce the Node-level Datatypes API (#3462)Andrew Reynolds
This adds classes corresponding to the Node-level Datatype API "DType", which is a specification for a datatype type. It does not enable the use of this layer yet. A followup PR will update the Expr-level Datatype to use the Node-level code, which is currently verified to be functional on this branch: https://github.com/ajreynol/CVC4/tree/dtype-integrate. Futher PRs will make the internal (Node-level) code forgo the use of the Expr-layer datatype, which will then enable the Expr-layer to be replaced by the Term-layer datatype. Most of the documentation for the methods in DType/DTypeConstructor/DTypeSelector was copied from Datatype/DatatypeConstructor/DatatypeConstructorArg.
2019-12-04Fix the subtyping relation for functions (#3494)Andrew Reynolds
2019-11-29improving parsing error messages related to HOL (#3510)Haniel Barbosa
2019-11-18Improve interface for sygus datatype, fix utilities (#3473)Andrew Reynolds
2019-11-15Use standard interface for sygus default grammar construction (#3466)Andrew Reynolds
2019-11-15Introduce SyGuS datatype API (#3465)Andrew Reynolds
2019-11-11Add missing utilities for Node-level Datatype API (#3451)Andrew Reynolds
2019-11-11Fix mkConst<RoundingMode>() for Python bindings (#3447)Andres Noetzli
2019-11-06Migrate more datatype methods to the Node level (#3443)Andrew Reynolds
This adds node-level interfaces for a few missing functions that will be necessary to have a Node-level API for datatypes.
2019-11-05Refactor type matcher utility (#3439)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-22NodeValue: Eliminate redundant NBITS macros. (#3400)Aina Niemetz
Previously, the metakind header defined macros for the number of bits reserved for fields in the NodeValue "header" (for the reference count, the node kind, the number of children and the node id). These macros were redundant, since the only one using them was the NodeValue itself, which redefined them (while using them) as constants in the class. Additionally, MAX_CHILDREN was defined (using these macros) not only in the metakind header, but redefined in other places. This commit defines the above values as constexpr members of the NodeValue class and cleans up redundancy.
2019-10-20Cleaning-up the declaration of wrapped functions/methods, which have no ↵Andrew V. Jones
definitions (#3399) Signed-off-by: Andrew V. Jones <andrewvaughanj@gmail.com>
2019-10-15Fix line numbers in templates (#3391)Andres Noetzli
This commit updates the line numbers in templates to address warnings due to wrong line numbers.
2019-10-10Make order of theories explicit in the source code. (#3379)Aina Niemetz
Fixes #2517. This makes the order of theories explicit in the source code rather than relying on the order defined via the build system. Previously, the build system ensured the order of the theories via the KINDS_FILES variable, which is a list of kinds files that is fed to code generation scripts (mkkind, mkmetakind, mkrewriter, mktheorytraits). The generated code critical to the order of theories w.r.t. soundess is the TheoryId enum, and the CVC4_FOR_EACH_THEORY macro. Ideally, we would want to get rid of the latter (ugly and error prone), which is not possible in the current configuration, and to be discussed in the future. This PR moves the TheoryID enum and related functions to theory/theory_id.h, and the CVC4_FOR_EACH_THEORY macro to theory/theory_engine.cpp, the only place where it is used. I ran it on whole SMT-LIB (non-incremental and incremental) and did not encounter any soundness issues. The only issue that did occur is not related to these changes, non-critical and known: #2993
2019-10-09NodeValue: Use 'using' instead of 'typedef'. (#3374)Aina Niemetz
2019-10-09NodeValue: Use fixed width return type for getRefCount(). (#3374)Aina Niemetz
2019-10-09Reorder NodeValue class according to our code style guidelines. (#3374)Aina Niemetz
2019-10-08pass parameters by reference where it affects performancePiotr Trojanek
Detected with cppcheck static analyser, which said: (performance) Function parameter should be passed by reference. Reformat with clang-format as needed. Signed-off-by: Piotr Trojanek <piotr.trojanek@gmail.com>
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback