200 Commits

Author SHA1 Message Date
Daniel Larraz
17f380674b java: Store JNI library by OS and CPU architecture (#12237)
This PR builds and stores the JNI library in a directory structured
according to the OS and CPU architecture. This allows a single JAR to
contain native JNI libraries for multiple OSes and CPU architectures
simultaneously, and prevents file collisions when multiple JARs
containing a native JNI library for the same OS but different
architectures are added to the classpath.
2025-11-17 16:17:04 +00:00
Daniel Larraz
1120e3df17 Adapt CMake files to run Java tests on Windows (#12203)
Resolves #12143
2025-11-05 21:25:56 +00:00
José Neto
867cdf6271 Category option info for Python and Java APIs (#12100) 2025-09-08 13:47:59 +00:00
Andrew Reynolds
6c2dc6e78f Add option to make regular expressions first class (#12049)
This adds an expert option to allow regular expressions to appear
anywhere in constraints, including in datatype fields, or as arguments
to uninterpreted functions.

This is required for reasoning about the correctness of CPC for proof
rules involving regular expressions.
2025-08-23 16:48:07 +00:00
Daniel Larraz
510315c260 Use u32string to represent Unicode strings encoded in UTF-32 (#11994)
This PR introduces the new C++ methods `Term TermManager::mkString(const
std::u32string& s)` and `std::u32string Term::getU32StringValue()` to
replace old methods `Term TermManager::mkString(const std::wstring& s)`
and `std::wstring Term::getStringValue()`.

The reason for this change is that `wchar_t` has a platform-dependent
size: on Windows, it is 16-bit (UTF-16), while on Linux and macOS, it is
32-bit (UTF-32). However, the current implementation assumes that
`wchar_t` is always 32 bits. In contrast, `char32_t` and
`std::u32string` are explicitly designed for Unicode and have consistent
32-bit size across platforms.

Similarly, this PR also introduces C functions
`cvc5_mk_string_from_char32` and `cvc5_term_get_u32string_value`
to replace old functions `cvc5_mk_string_from_wchar` and
`cvc5_term_get_string_value`.

Although `char32_t` is part of the C11 standard, the `<uchar.h>` header
(which should define `char32_t`) is missing in Apple Clang. Therefore,
we explicitly provide a definition in such cases.

---------

Co-authored-by: Aina Niemetz <aina.niemetz@gmail.com>
2025-07-08 08:12:52 +00:00
Aina Niemetz
b3f4de3472 OptionCategory: Add missing implementations, uncovered tests. (#12011)
Enum OptionCategory was introduced in #11931, which did not include
implementations for `std::to_string(cvc5::modes::OptionCategory)` and
`cvc5_modes_option_category_to_str(Cvc5OptionCategory)`.

This adds implementations for these functions and further adds uncovered
tests for C, Python and Java (fixes coverage build in nightlies).
2025-06-25 06:59:46 +00:00
Mathias Preiner
f19f42f377 Update copyright headers, add missing header documentation. (#11990)
Adds missing header documentation for new files, remove carriage returns
from new files.
2025-06-18 19:41:07 +00:00
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
Aina Niemetz
cf8c5f3ade NodeManager as a static thread_local singleton is no more. (#11816)
Co-authored-by: Daniel Larraz <daniel-larraz@users.noreply.github.com>
2025-04-16 01:39:01 +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
Andrew Reynolds
e067b5261b Make unit tests for proofs more robust wrt rewrite rules (#11601)
The helper method `create_rewrite_proof` no longer generates rewrite
rule holes on my dev branch, since the given rewrite is handled by
ARITH_POLY_NORM now.
2025-02-10 22:35:29 +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
Andrew Reynolds
27d6f4b241 Add getNamedTerms to symbol manager API (#11233)
Co-authored-by: mudathirmahgoub <mudathirmahgoub@gmail.com>
2024-09-30 14:27:49 +00:00
Andrew Reynolds
ab0299d405 Correct incompleteness tracking in incremental mode (#11204)
Fixes https://github.com/cvc5/cvc5/issues/11198.
2024-09-17 16:13:04 +00:00
Hans-Jörg
e73b991dd6 Add missing support for the assertionNames field of proofToString to Python and Java API and add unit test for all bindings (#11169)
@aniemetz Sorry, this took me longer than I hoped.

---------

Co-authored-by: Haniel Barbosa <hanielbbarbosa@gmail.com>
2024-08-20 16:08:01 +00:00
Hans-Jörg
bd2d37404b Change author name from "Hans-Jörg" to "Hans-Joerg" (#11155)
The later uses only ASCII letters instead of Unicode characters. This
currently leads to a build issue with the Java headers on FreeBSD:
https://github.com/cvc5/cvc5/issues/11145
2024-08-13 09:24:21 +00:00
Aina Niemetz
488d3d6e25 test: Add tests for missing API coverage. (#11048) 2024-07-13 01:36:56 +00:00
Aina Niemetz
08d3806e16 java api: Add hashing for Op, Term, Sort. (#11022) 2024-07-10 19:54:21 +00:00
Aina Niemetz
5ade599bf1 test: java api: Clean up and extend api coverage. (#11024) 2024-07-10 17:57:05 +00:00
Aina Niemetz
ec1f367d05 java api: Add support for equals/hash for datatypes. (#11023) 2024-07-10 17:56:14 +00:00
Aina Niemetz
f463df8baa java api: Add missing hash/equals and tests for (Synth)Result. (#11021) 2024-07-10 17:54:35 +00:00
Aina Niemetz
7adcd8e143 java api: Add equals for Grammar. (#11020) 2024-07-10 17:30:52 +00:00
Aina Niemetz
a6d07eac76 c api: Add more support/tests for uncovered functions. (#11011) 2024-07-10 01:51:41 +00:00
Aina Niemetz
fb407f4c06 c api: Add support/tests for some uncovered functions. (#10988)
This is work towards full API coverage so that the C API tests can be
plugged into the nightlies coverage tests.
2024-07-09 23:27:42 +00:00
Aina Niemetz
b1de316fe8 test: Add tests for BITVECTOR_BIT. (#11014) 2024-07-09 02:30:50 +00:00