Commit Graph

26 Commits

Author SHA1 Message Date
Alex Ozdemir
5fb58367f9 Remove finite_field api tests (#10443)
They were empty/dead/duplicates of the examples.
2024-03-01 18:54:49 +00:00
Aina Niemetz
0a8baa0f0a Update copyright headers. (#9736) 2023-05-09 18:06:18 +00:00
Vinícius Camillo
1fc0f6416f Fixed CI actions on macOS. (#9448)
I increased cmake's minimum version in order to use the FindPython module, which allows the build system to specify python versions that are supported. Currently the support is extended to 3.6 through 3.10. I also removed some backward compatible conditions that do not apply anymore provided that cmake's minimum version is guaranteed to be 3.12.

MacOS builds are reenabled in ci.yml.
2023-01-24 19:01:36 +00:00
Alex Ozdemir
368f3c3ed6 ff: connect sub-theories to main solver & test (#9218)
Organizing the PR a bit:

we hook up the subtheories to TheoryFf
we expose FF-related things via the C++/Pytohn API and SMT-LIB2 interface.
we add a bunch of tests against these interfaces.
2022-12-16 16:36:41 +00:00
Andrew Reynolds
42e503ba7d More preparation for strict type rules (#8733)
This is work towards making equalities and substitutions between terms of equal types.
2022-05-07 02:22:12 +00:00
Mathias Preiner
d01e59c13b Update copyright headers for release 1.0 (#8539) 2022-04-05 20:38:57 +00:00
Aina Niemetz
506a7b8c4a Python API: Do not rename enumerators. (#8507)
Co-authored-by: Mathias Preiner <mathias.preiner@gmail.com>
Co-authored-by: mudathirmahgoub <mudathirmahgoub@gmail.com>
Co-authored-by: Gereon Kremer <gkremer@stanford.edu>
2022-04-01 19:45:36 +00:00
Gereon Kremer
a7779de22d Remove decorator from python API (#8505)
This PR removes the expand_list_arg decorator from the python API. It was used to allow calling a function f(x, *args) with a list as second argument and automatically expand the list into *args. While it merely allows for calling f(x, l) instead of f(x, *l), it adds considerable complexity to the code and documentation. Thus, following the Zen of python (have only one way to do it) we remove this decorator. This is also consistent with the pythonic API, were we made the same decision.
2022-04-01 16:58:00 +00:00
Andrew Reynolds
2f1483e2e3 Remove unecessary methods from the API (#8260)
Removes checkEntailed from Solver.
Removes isEntailed, isNotEntailed, isEntailedUnknown from Result.
Removes isSubsortOf, isFunctionLike, getUninterpretedSortName, getSortConstructorName from Sort.

Updates examples and unit tests.
2022-03-14 18:29:30 +00:00
Alex Ozdemir
6388657820 Change name of Python API's package from pycvc5 to cvc5. (#7953)
In the process, I changed a CMake target name from pycvc5 to
cvc5_base_py_api. I could not change the target to cvc5, because that
name is taken.
2022-02-02 23:45:42 +00:00
Gereon Kremer
881464ade1 Turn kinds in python API into a proper Enum (#7686)
This PR does multiple things:
- the kinds are changed from custom objects to a proper enum.Enum class
  (including according changes to the cython code and the kind generation scripts)
- all examples and tests are modified to account for the change how to use kinds
  (Kind instead of kinds)
- add docstrings to the kind enum values
- add a custom documenter that properly renders enums via autodoc
- extend doxygen setup so that we can write comments as rst (allowing us to copy
  the documentation for kinds from the cpp api to the other apis)
2021-12-08 04:16:03 +00:00
yoni206
24663f1c4b Translating API tests to Python — part 2 (#7651)
This PR translates the remaining cpp API tests to python.
2021-12-01 01:38:45 +00:00
Andres Noetzli
7c784424b5 Always enable API black box unit tests (#7696)
Currently, when assertions are disabled, we do not enable any unit
tests. However, we have decided that it would be beneficial to do black
box unit testing of the API even when building cvc5 without assertions,
because the API is user facing. This commit makes the following changes:

- Always enables API black box unit tests
- Adds a test to check whether a buggy version of Clang is being used,
  which prevents the use of `-fno-access-control` for white box tests
- Fixes a spooky variable name in a Python unit test
2021-11-24 22:02:05 +00:00
yoni206
40272d5f3a Translating API tests to Python — part 1 (#7597)
This PR translates some of the API tests from here to Python. The other tests are translated in a private branch and will be added in a separate PR.
2021-11-16 18:56:37 +00:00
yoni206
338982182d Move toPythonObj tests to the new API unit test directory (#6656)
This is the last test file that we move from the old directory to the new one, and so the old directory is deleted.
2021-06-02 16:47:09 +00:00
yoni206
6edc06b3fb Update toPythonObj to use new getters -- part 1 (#6623)
Following #6496 , this PR adds new getters to the python API, as well as tests for them. This makes toPythonObj simpler.

A future PR will add more getters to the python API.

Co-authored-by: Gereon Kremer nafur42@gmail.com
2021-05-31 00:56:14 +00:00
yoni206
40089fc794 Python API: bugfix + translating tests from cpp unit tests (#6559)
This PR fixes an issue in the python API for datatypes, and also introduces tests translated from https://github.com/cvc5/cvc5/blob/master/test/unit/api/datatype_api_black.cpp

The next PR will translate more tests and will also introduce missing functions in the python API for datatypes.
2021-05-28 20:28:56 +00:00
yoni206
91e41bcb66 Move and enhance python API grammar tests (#6538)
The existing test for python API grammar is moved to the right location, `yapf`ed, and changed according to the new style of python API tests. Additionally, minor changes are introduced in order to be an exact translation of https://github.com/cvc5/cvc5/blob/master/test/unit/api/grammar_black.cpp
2021-05-17 11:00:41 -07:00
makaimann
50ff9213e6 Fix for toPythonObj of integer value with real sort (#6505) 2021-05-07 11:01:16 -07:00
yoni206
0daac05ab7 Python API tests for terms -- Part 1 (#6468)
This PR removes the old python api tests for terms from test/api/python/test_term.py and replaces it with a new test file test/python/unit/api/test_term.py. The new test file is obtained by translating test/unit/api/term_black.cpp.

In this PR I only include the tests that pass without requiring any change to the python API. The next PR will add functions to the python API that are currently not supported, along with corresponding tests.

Comment: This was originally done in #6460 on the wrong fork. Now it is re-opened, and addresses all comments given there.
2021-05-03 08:35:47 +02:00
Mathias Preiner
ae5ee4b07d Goodbye CVC4, hello cvc5! (#6371)
This commits changes the build system to cvc5 and removes the remaining
occurrences of CVC4. It further cleans up outdated/unused scripts in contrib/.
2021-04-21 10:21:34 -07:00
yoni206
d6a50e3ebe python API sorts: adding functions and tests (#6361)
This PR does the following:

1. removes old python sort API test
2. creates a new python sort API test, obtained by translating the (entire) cpp unit test https://github.com/CVC4/CVC4/blob/master/test/unit/api/sort_black.cpp
3. adds support for bags and datatype selectors/testers domain/codomain in the python API.
2021-04-20 14:33:10 +00:00
Aina Niemetz
7ec3005875 Refactor and update copyright headers. (#6316) 2021-04-12 19:31:43 +00:00
Aina Niemetz
b302cb1f92 Update copyright headers to 2021. (#6081) 2021-03-09 07:27:03 +00:00
Aina Niemetz
92e9feab5f Update copyright headers. 2020-12-02 19:55:00 -08:00