127 Commits

Author SHA1 Message Date
Daniel Larraz
4e7922ee32 Use MSYS2 CLANG64 to compile on Windows x86_64 (#12291)
This PR replaces the MSYS2 MINGW64 environment with the CLANG64
environment for compiling cvc5 natively on Windows x86_64. The main
difference between the two is that MINGW64 uses GCC and links against
libstdc++ and the MSVCRT runtime, whereas CLANG64 uses Clang and links
against libc++ and the UCRT runtime (see the MSYS2 [environment
documentation](https://www.msys2.org/docs/environments/) for details).

This ensures compatibility for statically linking cvc5 with Lean
binaries that use libc++ on Windows x86_64, thus facilitating the
integration of cvc5 into
[lean-cvc5](https://github.com/abdoo8080/lean-cvc5).

---------

Co-authored-by: Abdalrhman Mohamed <abdoo8080@outlook.com>
2025-12-09 00:18:23 +00:00
Daniel Larraz
67312dcd41 doc: Add instructions for using Java bindings with Maven (#12271)
This PR updates the cvc5 Java API documentation to explain how to use
the cvc5 Java bindings in a Maven project. It also updates the output
obtained when building the Java bindings from source.
2025-12-02 00:35:54 +00:00
Daniel Larraz
67c2c201ff Build Javadoc and sources JARs for IDE docs and navigation (#12236)
Enabled only when the `--docs` option is used. Providing these JAR files
is one of the requirements for publishing in Maven Central.
2025-11-17 16:09:54 +00:00
Daniel Larraz
67975ea890 ci: Treat all Sphinx warnings as errors (#12112)
It also fixes a couple of indentation issues in the documentation.
2025-09-16 14:33:19 +00:00
Daniel Larraz
e0ec61e050 Add support for compilation on Windows ARM64 (#12111)
This PR applies several changes required to compile cvc5 on Windows
ARM64 using MSYS2 CLANGARM64. In particular, `thread_local` class fields
and local function variables in classes and functions exported in the
API are not allowed, so they have been converted into global variables
within the compilation unit. Moreover, some functions in the cvc5 parser
library were using non-exported functions from the cvc5 base library.
This PR exports these functions and converts the ones that were inlined
into non-inlined functions to make them exportable.

Here is a summary of the results of running the cvc5 version in main and
in this branch:
```
config   status   total  solved     sat   unsat    best  timeout  memout  error  uniq  dis    time_cpu      memory 
main     ee      450474  385375  173928  211447  256627    57617     719      5    36    0  18909500.3  42742499.9 
pr       ee      450474  385370  173923  211447  192564    57621     720      5    31    0  18914388.1  42779989.7 
``` 
It seems that the Windows ARM64 changes do not significantly affect
solver performance compared to the main branch.
2025-09-10 15:44:59 +00:00
Daniel Larraz
2d240c467a Fix duplicate C++ declarations in Sphinx documentation (#12069) 2025-09-08 15:08:58 +00:00
Daniel Larraz
f30f3a00e3 doc: Avoid duplicate indexing of cvc5.pythonic.Length (#12097)
The `Length` function in the Pythonic API applies to both strings and
sequences, so its documentation appears in `strings.rst` and
`sequences.rst`. To avoid duplicate entries in the index, one occurrence
is marked with `:noindex:`.
2025-09-08 15:07:48 +00:00
José Neto
867cdf6271 Category option info for Python and Java APIs (#12100) 2025-09-08 13:47:59 +00:00
Daniel Larraz
ec9cbcb6ce doc: Fix toctree consistency issues (#12090)
This PR addresses two issues reported by Sphinx. First, the
`docs/api/python/base/modes.rst` document was not included in any
toctree. Second, the `proofrule.rst` and `cvc5proofrule.rst` documents
were included in multiple toctrees. The latter is resolved by including
each document in only one toctree and referencing it elsewhere in the
documentation using cross-references.
2025-08-23 22:10:09 +00:00
Daniel Larraz
5b85cad4ee doc: Add missing references to c examples (#12089)
This PR also adds a `:skip:` directive to suppress missing-example
warnings for languages without an equivalent version.
2025-08-23 22:09:10 +00:00
Daniel Larraz
651f196032 ci: Treat all Doxygen warnings as errors (#12068)
This PR increases the quality requirements for the cvc5 C++ API
documentation by treating all warnings reported by Doxygen 1.9.8 as
errors.
2025-08-23 22:01:43 +00:00
Daniel Larraz
259f435d4d Update Doxyfile from 1.9.1 to 1.9.8 (#12063)
This PR updates the Doxyfile using the `doxygen -u` command, removing
several obsolete tags from the configuration file as detected by the
Doxygen version used in CI.
2025-08-13 09:54:32 +00:00
Daniel Larraz
e52530cba7 ci: Treat all Javadoc warnings as errors (#12053)
This PR raises the quality standard for the cvc5 Java API documentation
by treating all warnings reported by Javadoc (in Java 21) as errors and
by addressing the remaining warnings in the source code. Since newer
versions of Javadoc catch more issues than older ones, this PR uses the
current Long-Term Support (LTS) release of Java (version 21) to generate
the documentation. However, it continues to use Java 8 in the workflow
jobs that build the JAR files for releases in order to maintain backward
compatibility with the older Java version.

---------

Co-authored-by: Aina Niemetz <aina.niemetz@gmail.com>
2025-08-12 11:11:03 +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
e900af3059 docs: Add docs for OptionCategory. (#12016) 2025-07-03 22:23:04 +00:00
Aina Niemetz
91201c459e Fix docs in preparation for upcoming release. (#11983) 2025-06-17 13:22:02 +00:00
Daniel Larraz
d9012b5dfc java: Change search order for native libraries (#11560)
After this change, the Java API first attempts to locate native
libraries as resources within a JAR before searching system paths. If
the Java API is packaged in a self-contained JAR, it will prioritize the
native libraries within the JAR, as they are more likely to be
compatible with the API version included in the JAR.

This PR also fixes and enhances error handling when searching for and
loading the native libraries.
2025-01-23 20:00:28 +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
Daniel Larraz
3ba9fcfddd doc: Explain how to use self-contained Java API JAR (#11555) 2025-01-22 17:42:49 +00:00
Daniel Larraz
6f32ee5ca0 doc: Pass TermManager to Solver in Java examples (#11232)
It also replaces calls to deprecated functions of `Solver` with the
corresponding function of `TermManager`.

---------

Co-authored-by: mudathirmahgoub <mudathirmahgoub@gmail.com>
2024-09-26 21:00:25 +00:00
Daniel Larraz
a210be5660 Update copyright headers and year in copyright message (#11142) 2024-08-12 15:28:36 +00:00
Aina Niemetz
930012648d docs: python base: Add missing docs pages. (#11058) 2024-08-05 18:49:50 +00:00
Aina Niemetz
dab8236589 docs: python: Add missing docs text for pages. (#11057) 2024-08-05 18:47:34 +00:00
Aina Niemetz
5ebc7e2bbc python api: Reintroduce deprecated constructor for SymbolManager. (#11062)
Co-authored-by: Daniel Larraz <daniel-larraz@users.noreply.github.com>
2024-07-18 20:29:15 +00:00
Aina Niemetz
2cb0e955c8 docs: java: Add missing references. (#11059) 2024-07-17 08:42:21 +00:00