32 Commits

Author SHA1 Message Date
Aina Niemetz
0647c4c107 Update copyright headers. (#11561)
Co-authored-by: Daniel Larraz <daniel-larraz@users.noreply.github.com>
2025-01-23 17:54:20 +00:00
Aina Niemetz
27e8c50df1 Python API test: Add missing test for sort substitution. (#10506) 2024-03-15 21:38:03 +00:00
Aina Niemetz
1a3a935fb5 Python API: Refactor to expose TermManager. (#10488)
This refactors the base Python API to expose TermManager (related to
previous refactor of the C++ API to expose TermManager in #10426).
2024-03-14 14:34:58 -07:00
Aina Niemetz
fdf9ce7138 Update copyright headers. (#10459) 2024-03-12 09:35:09 -07:00
mudathirmahgoub
71c04db7a4 Add nullable type to theory of datatypes (#10243) 2024-01-31 15:29:14 -06:00
Aina Niemetz
0a8baa0f0a Update copyright headers. (#9736) 2023-05-09 18:06:18 +00:00
Andrew Reynolds
b3fbf9afcc Add infrastructure and API for abstract sorts (#9263)
Adds necessary API methods for supporting abstract sorts in the cpp, java, python APIs.

An abstract sort represents a class of sorts. It is parameterized by a kind. For example, the abstract sort parameterized by the kind BITVECTOR_SORT denotes bitvectors of unspecified bit-width.

To support the above functionality, the kinds of Sort must be exported in the API, which is done in this PR.

This is the first step towards supporting the rewrite DSL for parameterized sorts, and planned SyGuS extensions that use gradual typing.
2023-01-17 19:37:10 +00:00
Gereon Kremer
fe939c31bd Fix some issues with the Python API tests (#8746)
This PR addresses a few issues in the Python API:
    the implementation of defineFunsRec() lacked the call to the C++ function
    a bunch of tests for defineFunsRec() were missing
    the test for getInstantiations() was incorrectly named and thus not valled.
    add missing test for hashing of Sort
2022-05-10 17:47:52 +00:00
Mathias Preiner
d01e59c13b Update copyright headers for release 1.0 (#8539) 2022-04-05 20:38:57 +00:00
Andrew Reynolds
40910fb3c6 Remove variant of mkDatatypeDecl with one sort parameter (#8543)
Subsumed by the vector version.

Also marks more methods as experimetnal.
2022-04-02 19:21:46 +00:00
Aina Niemetz
5dcb750667 api: Rename get(Selector|Constructor)Term() to getTerm(). (#8537) 2022-04-02 18:57:50 +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
Mathias Preiner
467c95cffb api: Use std::optional for symbols in mk* functions. (#8495)
Makes all symbols in mk* functions optional.
2022-04-01 01:10:29 +00:00
Aina Niemetz
27fbec71ee Sort, TypeNode: Rename functions related to datatypes. (#8472) 2022-03-31 20:50:45 +00:00
Aina Niemetz
bf06678fee api: Add Sort::getUninterpretedSortConstructor(). (#8459)
This further introduces TypeNode::isInstantiatedUninterpretedSort().
2022-03-30 19:39:52 +00:00
Aina Niemetz
e7fe90e7b8 api: Add Sort::getInstantiatedParameters(). (#8445)
This adds a function to retrieve the sort arguments an instantiated
sort has been instantiated with. It further deletes
Sort::getDatatypeParamSorts() and
Sort::getUninterpretedSortParamSorts().
2022-03-29 21:36:12 +00:00
Aina Niemetz
4f57370210 api: Add Sort::isInstantiated(). (#8425)
This further removes Sort::isUinterpretedSortParameterized().
2022-03-29 01:37:13 +00:00
Aina Niemetz
748c884353 api: Rename *SortConstructor* to *UninterpretedSortConstructor*. (#8406) 2022-03-26 05:40:42 +00:00
Aina Niemetz
a94548b57c api: Remove Sort::isParametricDatatype(). (#8405)
Previously, Sort::isParametricDatatype() returned true for both
instantiated and non-instantiated parametric datatypes.

This deletes the method, instead one can check getDatatype().isParametric(). Parametric datatypes will be distinguished from instantiated parametric datatypes via a forthcoming method Sort::isInstantiated.

Co-authored-by: ajreynol <andrew.j.reynolds@gmail.com>
2022-03-25 22:43:35 +00:00
Aina Niemetz
e8ef445fe7 api: Remove Sort::isFirstClass(). (#8312) 2022-03-15 22:51:42 +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
Aina Niemetz
acba737109 api: Remove Sort::isComparableTo(). (#7903)
Since we do not support arithmetic subtyping on the API level anymore,
this function is obsolete. Consequently, this now requires that
replacement terms as arguments to Term::substitute() are of the same
sort as the replaced terms.
2022-01-10 19:27:04 +00:00
Aina Niemetz
94c5c54989 api: Add Sort::hasSymbol() and Sort::getSymbol(). (#7825) 2021-12-16 18:50:01 +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