summaryrefslogtreecommitdiff
path: root/test/python
AgeCommit message (Collapse)Author
2021-06-22python api unit tests for Op (#6785)yoni206
Unit tests are translated from https://github.com/cvc5/cvc5/blob/master/test/unit/api/op_black.cpp to python. The only thing that is not faithfully translated is that the `cpp` tests expect the template function `[getIndices](https://github.com/cvc5/cvc5/blob/master/src/api/cpp/cvc5.h#L841)` to fail when an inappropriate type is given to it, while in the [`python` API](https://github.com/cvc5/cvc5/blob/90d19f7cdbaf41e389bdcbd099471f658a35ce98/src/api/python/cvc5.pxi#L343) this function is not a template, but just tries every supported type. For example, the following line is not translated: https://github.com/cvc5/cvc5/blob/90d19f7cdbaf41e389bdcbd099471f658a35ce98/test/unit/api/op_black.cpp#L206
2021-06-22Python api unit tests for Result (#6763)yoni206
This PR translates the cpp API unit tests about results to python. The original cpp file is: https://github.com/cvc5/cvc5/blob/master/test/unit/api/result_black.cpp The translation made rise to one addition to the python API: The UnknownExplanation object from the cpp API was represented by a string in the python API. Now we have a more faithful representation, as an enum.
2021-06-19Adding python API test part 5 (#6743)Ying Sheng
This commit (follow #6553) adds more functions and unit tests for python API. Subsequent PR will include additional missing functions and unit tests. 1. Adding getNullSort() and mkEmptyBag() functions. 2. Allowing mkOp() with a list of arguments (previously allowed at most 2). 3. Allowing mkString() with additional boolean argument useEscSequences. 4. Corresponding changes to the tests.
2021-06-16Make symfpu a required dependency. (#6749)Aina Niemetz
2021-06-08Change output of getRealValue to a fraction. (#6692)Alex Ozdemir
Our documentation for `toPythonObj` says that real values are represented as Fractions. However, getRealValue yields a float approximation thereof. We should probably stick to Fractions, since they allow us to precisely capture values in LRA. Also, that's more aligned with the C++ API, which returns a string representation of the (unapproximated) Rational. Also, document some (potential) weirdness with calling mkReal on floating-point values.
2021-06-03Adding unit tests for the datatypes python API (#6658)yoni206
This commit adds unit tests that are translated from `datatype_api_black.cpp`. One API function is also added to the python API. This is the last part of the python api unit tests for datatypes. Co-authored-by: Andres Noetzli <andres.noetzli@gmail.com>
2021-06-02Adding getters to the python API and testing them (#6652)yoni206
This PR adds missing API functions from the cpp Term API to the python API. Corresponding tests are translated from term_black.cpp.
2021-06-02Remove redundant logic ALL_SUPPORTED. (#6664)Aina Niemetz
2021-06-02Move `toPythonObj` tests to the new API unit test directory (#6656)yoni206
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-01Some additions to the datatypes python API (#6640)yoni206
This commit makes the following additions, in order to sync the python API with the cpp API. 1. adding `getName` functions to datatypes related classes 2. allowing `mkDatatypeSorts` with 1 or 2 arguments (previously allowed only 2). 3. In case there is a second argument to `mkDatatypeSorts`, we make sure it is a set. 4. Corresponding changes to the tests.
2021-06-01FP value support in python API (#6644)yoni206
This PR adds new is* functions from the cpp API to the python API. In particular, it adds getFloatingPointValue() function from the cpp API. A test (translated from term_black.cpp) is added. getFloatingPointValue() returns a tuple, and so this requires importing an instance of tuples into cython.
2021-05-31Update `toPythonObj` to use new getters -- part 1 (#6623)yoni206
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-28Python API: bugfix + translating tests from cpp unit tests (#6559)yoni206
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-20Minor improvements to the API (#6585)Gereon Kremer
This PR does some minor improvements to the API: - remove getConstSequenceElements(), use getSequenceValue() instead - improve documentation for Term
2021-05-19Adding python API test part 4 (#6553)Ying Sheng
This commit (follow #6552) adds more unit tests for python API. Subsequent commits will include additional missing functions and unit tests.
2021-05-19Adding python API test part 3 (#6552)Ying Sheng
This commit (follow #6551) adds more unit tests for python API. Subsequent commits will include additional missing functions and unit tests.
2021-05-18Adding python API test part 2 (#6551)Ying Sheng
This commit (follow #6546) adds more unit tests for python API. Subsequent commits will include additional missing functions and unit tests.
2021-05-17Adding python API test (#6546)Ying Sheng
This commit adds unit tests for python API. Subsequent commits will include additional missing functions and unit tests.
2021-05-17Move and enhance python API grammar tests (#6538)yoni206
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-13Adding functions to the python API and testing them -- part 2 (#6517)yoni206
This PR adds some functions that are missing in the python API, along with unit tests for them. The unit tests are translated from https://github.com/cvc5/cvc5/blob/master/test/unit/api/term_black.cpp
2021-05-08Adding functions to the python API and testing them (#6477)yoni206
This PR adds some functions that are missing in the python API, along with unit tests for them. Subsequent PR will include additional missing functions. Also includes a yapf run to reformat the test file. Co-authored-by: Makai Mann makaim@stanford.edu
2021-05-03Python API tests for terms -- Part 1 (#6468)yoni206
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-04-21Goodbye CVC4, hello cvc5! (#6371)Mathias Preiner
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-20python API sorts: adding functions and tests (#6361)yoni206
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-12Refactor and update copyright headers. (#6316)Aina Niemetz
2021-04-06cmake: Add helper to check if a given Python module is installed. (#6299)Mathias Preiner
2021-04-05A proposal for python api unit tests (#6255)yoni206
This PR introduces two unit tests for the python api, translated directly from the unit tests for the cpp api. The goal is to get feedback in order to reach some kind of a pattern/style for python API tests. Also, i'd be happy to hear if there is any specific cpp api unit test I should translate for this initial attempt (e.g., a test that is more representative or might raise difficulties). For now i just picked the first two solver tests.
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback