34 Commits

Author SHA1 Message Date
Daniel Larraz
27b2af6ebe ci: Use the lowest supported Java version for each platform (#11925)
This PR uses Java 8 in CI, except on macOS arm64, where the minimum
supported Java version is 11. This ensures that the Java bindings, Java
API tests, and Java examples are compatible with the minimum required
Java version. It also ensures that the published Java bindings on GitHub
can run with this older version. Previously, CMake enforced
compatibility for the Java bindings, but not for the Java API tests or
the Java examples. This change provides a more centralized solution.

This PR also fixes a Java unit test to make it compatible with Java 8.
2025-06-02 20:54:09 +00:00
Daniel Larraz
03370423ce Fix JNI string conversion to handle Unicode surrogate pairs (#11693)
- Ensure correct conversion of `std::wstring` (UTF-32 on Linux/macOS,
UTF-16 on Windows) to UTF-16 `std::u16string`
- Properly encode supplementary Unicode characters (> U+FFFF) as
surrogate pairs

Fixes #11689
2025-03-04 20:29:35 +00:00
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
08d3806e16 java api: Add hashing for Op, Term, Sort. (#11022) 2024-07-10 19:54:21 +00:00
Aina Niemetz
b1de316fe8 test: Add tests for BITVECTOR_BIT. (#11014) 2024-07-09 02:30:50 +00:00
Amalee Wilson
176cff678d Add support for parsing skolems (#10835)
Add support for parsing and printing skolems. Updates the printer, parser, java api, c++ api, python api, and adds tests for cli parsing.
2024-06-11 15:26:24 +00:00
Andrew Reynolds
3f1ed7bbaf Fix issues related to error handling in the parser (#10818)
Fixes the first two issues from
https://github.com/cvc5/cvc5/issues/10813.
2024-05-28 09:00:37 -07:00
Aina Niemetz
354fc4147e Java API: Refactor to expose TermManager. (#10531)
This is related to the previous refactor of the C++ API in
https://github.com/cvc5/cvc5/pull/10426.
2024-04-02 16:42:06 +00:00
Andrew Reynolds
2cf2797d4a Add getter methods for skolems in API (#10393)
This exports SkolemFunId to the API, and adds it to the Java, Python APIs, and adds unit tests.

It does some minor refactoring to remove unnecessary ids and to move abstract value to an internal skolem id.

Followup PRs will add methods for constructing/parsing skolems. I will also rename SkolemFunId -> SkolemId throughout the code base after this PR is merged.
2024-03-22 21:45:36 +00:00
Aina Niemetz
fdf9ce7138 Update copyright headers. (#10459) 2024-03-12 09:35:09 -07:00
Andrew Reynolds
f2a8d9fcb7 Add missing guard to RAN API (#9945) 2023-08-10 09:14:41 -07:00
Andrew Reynolds
dec06c04ea Add API methods for real algebraic numbers (#9897)
Fixes #9870.
2023-07-21 16:20:27 +00:00
Andrew Reynolds
2e41f64d47 Simplify API for constructing tuple values (#9766)
In preparation for 1.1.
2023-06-12 17:28:05 +00:00
Aina Niemetz
0a8baa0f0a Update copyright headers. (#9736) 2023-05-09 18:06:18 +00:00
mudathirmahgoub
590af04a10 Remove reference to solver from java objects (#9147) 2022-10-04 17:06:02 +00:00
Aina Niemetz
475ecd13e9 Use assertions instead of (Pretty)CheckArgument in expr and smt. (#9065)
This is in preparation for getting rid of IllegalArgumentException.
This exception was originally used for guards in the old API and is now
obsolete.
2022-08-23 09:07:29 -05:00
mudathirmahgoub
f5a9a12b21 Add declareOracleFun to the Java API (#8815) 2022-06-06 18:58:22 +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
mudathirmahgoub
ffe428bb7f Remove java API methods that accepts lists as arguments (#8541)
This PR removes some unnecessary methods in the Java API that were added to simplify several unit tests that use dynamic arrays. The goal is to make the java API consistent and as small as possible.
Users could use asList, toArray methods to use generic lists if they wish.
2022-04-02 00:40:47 +00:00
Aina Niemetz
a735215651 api: Remove Datatype::getConstructorTerm(). (#8529) 2022-04-01 21:36:07 +00:00
Andres Noetzli
c93de62d8b Move Java package to io.github.cvc5 (#8469)
Previously, we were using io.github.cvc5.api to mirror the C++
namespace that the API was in. The namespace of the C++ API changed to
simply cvc5 and so this commit updates the Java package accordingly.
2022-03-31 04:09:03 +00:00
mudathirmahgoub
c56a361253 Patch cross reference in Kind.java documentation (#8458)
This PR patches cross reference links in Kind.java comments for now until a proper way is implemented that handles documentation for cpp, python and Java API.
2022-03-30 21:58:08 +00:00
Andrew Reynolds
6c64864fc2 Add information for cardinality constraint to the API (#8422)
Python API is not implemented yet, as it requires new infrastructure for returning pairs.
2022-03-29 18:57:07 +00:00