6 Commits

Author SHA1 Message Date
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
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
3526b28ca9 c api: Add support for input parsing. (#10944) 2024-06-29 20:35:58 +00:00
Aina Niemetz
2ec241fe71 Add missing test for API coverage in nightlies. (#10498) 2024-03-12 14:48:33 -07:00
Aina Niemetz
83f27f0dbc Add tests for uncovered API functions for nightlies. (#10496) 2024-03-12 12:37:45 -07:00
Aina Niemetz
deb7ca42e7 test: Add C++ API unit test for deprecated functions. (#10381)
We need to cover deprecated C++ API functions to not break API coverage
nightly builds. This adds a unit test to explicitly cover deprecated
tests, configured to suppress the deprecated warning in order to not
break CI.
2024-02-15 17:55:55 +00:00