summaryrefslogtreecommitdiff
path: root/src/api
AgeCommit message (Collapse)Author
2020-02-19Add Python bindings using Cython -- see below for more details (#2879)makaimann
2020-02-18Change datatype selector/constructor/tester to terms (#3773)makaimann
2020-02-18Add missing kinds for the new API (#3757)Andrew Reynolds
2020-02-16Add temporary global API conversion utilities. (#3759)Andrew Reynolds
2020-02-14Remove quantifiers rewrite rules infrastructure (#3754)Andrew Reynolds
2020-01-15New C++ API: Add nullary constructor for Result. (#3603)Aina Niemetz
2019-12-06Add ExprManager as argument to Datatype (#3535)Andrew Reynolds
2019-12-04Add mkOp for a single Kind (#3522)makaimann
2019-12-03Add isNullHelper to avoid calling API function isNull with ↵makaimann
CVC4_API_CHECK_NOT_NULL (#3520)
2019-12-02OpTerm Refactor: Allow retrieving OpTerm used to create Term in public C++ ↵makaimann
API (#3355) * Treat uninterpreted functions as a child in Term iteration * Remove unnecessary const_iterator constructor * Add parameter comments to const_iterator constructor * Use operator[] instead of storing a vector of Expr children * Switch pos member variable from int to uint32_t * Add comment about how UFs are treated in iteration * Allow OpTerm to contain a single Kind, update OpTerm construction * Update mkTerm to use only an OpTerm (and not also a Kind) * Remove unnecessary function checkMkOpTerm * Update mkOpTerm comments to not use _OP Kinds * Update examples to use new mkTerm * First pass on fixing unit test * Override kind for Constructor and Selector Terms * More fixes to unit tests * Updates to parser * Remove old assert (for Kind, OpTerm pattern which was removed) * Remove *_OP kinds from public API * Add hasOpTerm and getOpTerm methods to Term * Add test for UF iteration * Add unit test for getOpTerm * Move OpTerm implementation above Term implemenation to match header file Moved in header because Term::getOpTerm() returns an OpTerm and the compiler complains if OpTerm is not defined earlier. Simply moving the declaration is easier/cleaner than forward declaring within the same file that it's declared. * Fix mkTerm in datatypes-new.cpp example * Use helper function for creating term from Kind to avoid nested API calls * Rename: OpTerm->Op in API * Update OpTerm->Op in examples/tests/parser * Add case for APPLY_TESTER * operator term -> operator * Update src/api/cvc4cpp.h Co-Authored-By: Aina Niemetz <aina.niemetz@gmail.com> * Comment comment suggestion Co-Authored-By: Aina Niemetz <aina.niemetz@gmail.com> * Add not-null checks and implement Op from a single Kind constructor * Undo sed mistake for OpTerm replacement * Add 'd_' prefix to member vars * Fix comment and remove old commented-out code * Formatting * Revert "Formatting" This reverts commit d1d5fc1fb71496daeba668e97cad84c213200ba9. * More fixes for sed mistakes * Minor formatting * Undo changes in CVC parser * Add isIndexed and prefix with d_ * Create helper function for isIndexed to avoid calling API functions in other API functions
2019-11-17Updates to the unit tests, api, and examples for datatypes (#3459)Andrew Reynolds
* Updates to the unit tests, api, and examples for datatypes * Format
2019-11-05Remove casts to subclasses of Type in API (#3420)Andres Noetzli
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-18Update overflow check to handle negative numbers (#3396)makaimann
2019-10-08New C++ API: Term: Add missing checks for null. (#3364)Aina Niemetz
Co-Authored-By: Andres Noetzli <andres.noetzli@gmail.com>
2019-10-07New C++ API: Add Term::getId(). (#3360)Aina Niemetz
+ use explicit types in NodeValue + add unit test for Term::isParameterized() Co-Authored-By: makaimann <makaim@stanford.edu>
2019-10-02Fix compiler warning. (#3348)Aina Niemetz
2019-09-25Add isParameterized function to Expr (#3303)Andrew Reynolds
2019-09-18Add support for creating constant arrays to the new C++ API (#3296)makaimann
* Add support for constant arrays to new C++ API * Fix macro usage in unit test * Add not null check * Add test for null term * Formatting
2019-08-19New C++ API: Add checks for Solver::checkValid and ↵Aina Niemetz
Solver::checkValidAssuming. (#3197)
2019-08-13New C++ API: Add checks and tests for Solver::simplify. (#3170)Aina Niemetz
2019-08-13New C++ API: Reorganize Solver code (move only). (#3170)Aina Niemetz
2019-08-11New C++ API: Add documentation/guidelines for API guards. (#3178)Aina Niemetz
2019-08-11New C++ API: Add templated getIndices method for OpTerm (#3073)makaimann
* Implement templated getIndices method for OpTerm * Add getIndices unit tests * Update src/api/cvc4cpp.cpp Co-Authored-By: Aina Niemetz <aina.niemetz@gmail.com> * Update src/api/cvc4cpp.cpp Co-Authored-By: Aina Niemetz <aina.niemetz@gmail.com> * Add comment about DIVISIBLE_OP * Update test/unit/api/opterm_black.h Co-Authored-By: Aina Niemetz <aina.niemetz@gmail.com> * Update test/unit/api/opterm_black.h Co-Authored-By: Aina Niemetz <aina.niemetz@gmail.com> * Update test/unit/api/opterm_black.h Co-Authored-By: Aina Niemetz <aina.niemetz@gmail.com> * Update test/unit/api/opterm_black.h Co-Authored-By: Aina Niemetz <aina.niemetz@gmail.com> * Add exception checks to other unit tests (instead of having its own function) * Fix unit test names in opterm_black.h * Add description to docstring for getIndices * Formatting * Clang format older commits * Use '-' in docstring list to match other docstrings * Support creating DIVISIBLE_OP with a string (for arbitrary precision integers) * Move mkOpTerm(DIVISIBLE_OP, <str>) test to solver_black.h * Fix pointer access * Replace switch statement with if statement * Guard string input for CVC4::Integer in mkOpTerm for consistency on GMP/CLN back-end
2019-08-07New C++ API: Add checks and tests for push/pop. (#3121)Aina Niemetz
2019-08-07New C++ API: Introduce macros for try-catch blocks in Solver. (#3121)Aina Niemetz
2019-08-06New C++ API: Fix branch prediction in CHECK macros. (#3161)Aina Niemetz
2019-06-28Make mkOpTerm const (#3072)makaimann
2019-06-21Fix and simplify handling of --force-logic (#3062)Andres Noetzli
The `--force-logic` command line argument can be used to override a logic specified in an input file or to set a logic when none is given. Before this commit, both the `SmtEngine` and the parser were aware of that argument. However, there were two issues if an input file didn't specify a logic but `--force-logic` was used: - Upon parsing `--force-logic`, the `SmtEngine` was informed about it and set the logic to the forced logic. Then, the parser detected that there was no `set-logic` command, so it set the logic to `ALL` and emitted a corresponding warning. Finally, `SmtEngine::setDefaults()` detected that `forceLogic` was set by the user and changed the logic back to the forced logic. The warning was confusing and setting the logic multiple times was not elegant. - For eager bit-blasting, the logic was checked before resetting the logic to the forced logic, so it would emit an error that eager bit-blasting couldn't be used with the logic (which was `ALL` at that point of the execution). This was a problem in the competition because our runscript parses the `set-logic` command to decide on the appropriate arguments to use and passes the logic to CVC4 via `--force-logic`. This commit moves the handling of `--force-logic` entirely into the parser. The rationale for that is that this is not an API-level issue (if you use the API you simply set the logic you want, forcing a different logic in addition doesn't make sense) and simplifies the handling of the option (no listeners need to be installed and the logic is set only once). This commit also removes the option to set the logic via `(set-option :cvc4-logic ...)` because it complicates matters (e.g. which method of setting the logic takes precedence?). For the CVC and the TPTP languages the commit creates a command to set the logic in `SmtEngine` when the logic is forced in the parser instead of relying on `SmtEngine` to figure it out itself.
2019-04-29Eliminate APPLY kind (#2976)Andrew Reynolds
2019-04-25New C++ API: Clean up API: mkVar vs mkConst vs mkBoundVar. (#2977)Aina Niemetz
This cleans up naming of API functions to create first-order constants and variables. mkVar -> mkConst mkBoundVar -> mkVar declareConst is redundant (= mkConst) and thus, in an effort to avoid redundancy, removed. Note that we want to avoid redundancy in order to reduce code duplication and maintenance overhead (we do not allow nested API calls, since this is problematic when tracing API calls).
2019-04-24Do not use __ prefix for header guards. (#2974)Mathias Preiner
Fixes 2887.
2019-03-26Update copyright headers.Aina Niemetz
2019-03-24New C++ API: Fix include. (#2896)Aina Niemetz
2019-03-18New C++: Remove redundant mkBoundVar function.Aina Niemetz
2019-03-18New C++: Remove redundant mkVar function.Aina Niemetz
s
2019-03-18BitVector: Allow base 10 in constructor. (#2870)Aina Niemetz
2019-02-13New C++ API: Remove redundant declareFun function. (#2837)Aina Niemetz
2019-02-12New C++ API: Remove redundant mkTerm function. (#2836)Aina Niemetz
2019-02-11New C++ API: Unit tests for declare* functions. (#2831)Aina Niemetz
2019-01-29New C++ API: Fix checks for mkTerm. (#2820)Aina Niemetz
This required fixing the OpTerm handling for mkTerm functions in the API.
2019-01-11New C++ API: Add unit tests for setInfo, setLogic, setOption. (#2782)Aina Niemetz
2019-01-10New C++ API: Get rid of mkConst functions (simplify API). (#2783)Aina Niemetz
2019-01-07New C++ API: Add missing getType() calls to kick off type checking. (#2773)Aina Niemetz
2019-01-03New C++ API: Add missing catch blocks for std::invalid_argument. (#2772)Aina Niemetz
2019-01-03API/Smt2 parser: refactor termAtomic (#2674)Andres Noetzli
2019-01-03C++ API: Reintroduce zero-value mkBitVector method (#2770)Andres Noetzli
PR #2764 removed `Solver::mkBitVector(uint32_t)` (returns a bit-vector of a given size with value zero), which made the build fail when SymFPU was enabled because solver_black used it for SymFPU-enabled builds. This commit simply adds a zero default argument to `mkBitVector(uint32_t, uint64_t)` to allow users to create zero-valued bit-vectors without explicitly specifying the value again. Additionally, the commit replaces the use of the `CVC4_USE_SYMFPU` macro by a call to `Configuration::isBuiltWithSymFPU()`, making sure that we can catch compile-time errors regardless of configuration. Finally, `Solver::mkConst(Kind, uint32_t, uint32_t, Term)` now checks whether CVC4 has been compiled with SymFPU when creating a `CONST_FLOATINGPOINT` and throws an exception otherwise (solver_black has been updated correspondingly).
2019-01-02New C++ API: Add tests for mk-functions in solver object. (#2764)Aina Niemetz
2018-12-17New C++ API: Add tests for term object. (#2755)Aina Niemetz
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback