summaryrefslogtreecommitdiff
path: root/examples
AgeCommit message (Collapse)Author
2019-12-06Add ExprManager as argument to Datatype (#3535)Andrew Reynolds
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-10-03Travis: Reenable building and running of examples. (#3351)Aina Niemetz
2019-09-25Use separate CMake project for CVC4 examples. (#3196)Mathias Preiner
2019-09-06Remove SMT1 parser. (#3228)Mathias Preiner
This commit removes the SMT1 parser infrastructure and adds the SMT2 translations of the SMT1 regression tests. For now this commit removes regression test regress3/pp-regfile.smt since the SMT2 translation has a file size of 887M (vs. 172K for the SMT1 version). Fixes #2948 and fixes #1313.
2019-08-08Fix issues with Ninja build system and add configure option. (#3166)Mathias Preiner
Adds option --ninja to configure.sh.
2019-06-21Add floating-point support in the Java API (#3063)Andres Noetzli
This commit adds support for the theory of floating-point numbers in the Java API. Previously, floating-point related classes were missing in the JAR. The commit also provides an example that showcases how to work with the theory of floating-point numbers through the API.
2019-05-15Fix iterators in Java API (#3000)Andres Noetzli
Fixes #2989. SWIG 3 seems to have an issue properly resolving `T::const_iterator::value_type` if that type itself is a `typedef`. This is for example the case in the `UnsatCore` class, which `typedef`s `const_iterator` to `std::vector<Expr>::const_iterator`. As a workaround, this commit changes the `JavaIteratorAdapter` class to take two template parameters, one of which is the `value_type`. The commit also adds a compile-time assertion that `T::const_iterator::value_type` can be converted to `value_type` to avoid nasty surprises. A nice side-effect of this solution is that explicit `typemap`s are not necessary anymore, so they are removed. Additionally, the commit adds a `toString()` method for the Java API of `UnsatCore` and adds examples that show and test the iteration over the unsat core and the statistics. Iterating over `Statistics` now returns instances of `Statistic` instead of `Object[]`, which is a bit cleaner and requires less glue code.
2019-04-30Fix use of APPLY kind in examples (#2984)Andres Noetzli
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-03Update copyright headers.Aina Niemetz
2019-04-01Update includes to use cvc4 top-level directory in examples (#2877)makaimann
Because the headers are now installed in a `cvc4` directory, the examples need to include from there as well.
2019-03-26Update copyright headers.Aina Niemetz
2019-03-18New C++: Remove redundant mkVar function.Aina Niemetz
s
2019-02-13New C++ API: Remove redundant declareFun function. (#2837)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-02New C++ API: Add tests for mk-functions in solver object. (#2764)Aina Niemetz
2018-11-14cmake: Require boost 1.50.0 for examples. (#2710)Mathias Preiner
2018-10-19Remove autotools build system. (#2639)Mathias Preiner
2018-10-08Cmake: Fix ctest call for example/translator. (#2600)Aina Niemetz
example/translator expects an input file to translate but none was provided in the ctest call. This caused the ctest call to hang and wait for input on stdin in some configurations (in particular in the nightlies).
2018-10-04New C++ API: Add checks for Sorts. (#2519)Aina Niemetz
2018-10-03Fix mem leak in sha1_collision example. (#2588)Aina Niemetz
2018-10-03Fix mem leak in sets_translate example. (#2589)Aina Niemetz
2018-09-25cmake: New INSTALL.md for build and testing instructions. (#2536)Aina Niemetz
2018-09-25examples/hashsmt/sha1_inversion: Fix includes for newer Boost version. (#2534)Aina Niemetz
2018-09-22cmake: Add more documentation, some fixes and cleanup.Mathias Preiner
2018-09-22cmake: Refactor cvc4_add_unit_test macro to support test names with '/'.Aina Niemetz
Required for consistent naming of tests, unit test names now also use the test naming scheme <category>/<subdir>/<test name>, e.g., unit/theory/theory_bv_white.
2018-09-22cmake: Add target runexamples.Aina Niemetz
2018-09-22cmake: Guard examples that require Boost.Mathias Preiner
2018-09-22cmake: examples: Configure output directory per target.Aina Niemetz
2018-09-22cmake: Added java examplesAina Niemetz
2018-09-22cmake: Added target examples (currently .cpp examples only)Aina Niemetz
2018-09-22cmake: Added initial build infrastructure.Aina Niemetz
2018-09-12Examples: Remove obsolete flag CVC4_MAKE_EXAMPLES. (#2461)Aina Niemetz
2018-09-04Remove CVC3 compatibility layer (#2418)Andres Noetzli
2018-08-08Plug solver API object into parser. (#2240)Aina Niemetz
2018-07-26New C++ API: Enable examples. (#2222)Aina Niemetz
2018-07-23New C++ API: declare-datatype. (#2166)Aina Niemetz
2018-07-03Fix datatypes example: nil constructor was missing. (#2135)Aina Niemetz
2018-06-27Header for new C++ API. (#1697)Aina Niemetz
2018-06-25Updated copyright headers.Aina Niemetz
2018-05-21Fix compiler warning in hashsmt example (#1927)Andres Noetzli
Previously, we were using delete for an array allocated on the heap, which caused a warning. @dddejan fixed this and other issues in PR #1909 but after @ajreynol fixed the other issues in a separate PR and to not waste @dddejan's time, I am submitting this fix separately (note: the fix is slightly different in that it changes the array to a vector, making a delete[] unnecessary).
2018-04-05Make Python bindings example compatible w/ Python3 (#1751)Andres Noetzli
2018-04-02Remove references to nyu (#1721)Clark Barrett
2018-03-21Add bit-vector extract example. (#1681)Aina Niemetz
2018-03-20Add parameterized datatypes example. (#1676)Aina Niemetz
2018-03-06Make statistics output consistent. (#1647)Mathias Preiner
* Fixes --hide-zero-stats (and really skips the 0 values) * Removes the additional newline after each statistic * Introduces theory::getStatsPrefix(TheoryId) to generate consistent prefixes for statistics based on the theory id (e.g., THEORY_BV -> "theory::bv").
2018-03-05Add support for check-sat-assuming. (#1637)Aina Niemetz
This adds support for check-sat-assuming. It further adds support for SmtEngine::query() over a vector of Expressions, e.g., smtEngine->query({a, b}); checks the validity (of the current input formula) under assumption (not (or a b)).
2017-09-27Add quantifiers API example, fixes #879 (#1146)Andrew Reynolds
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback