68 Commits

Author SHA1 Message Date
Andrew Reynolds
b056bd2446 Add stable as a build type (#12128)
This adds `stable` as a build type, which is similar to `safe` but
permits incomplete proofs in regressions and the use of regular options
with `no-support:` fields.
2025-09-18 18:36:59 +00:00
Daniel Larraz
41576236b4 Add C++ version of the 'exceptions' example (#12085) 2025-08-23 22:08:09 +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
Andrew Reynolds
cd4df2daff Add CI for safe-mode builds (#11869)
This ensures that regressions pass when configuring in `safe-mode`. Note
that *all* regression testers must now take into account whether we are
in a safe-mode (safe mode itself is not a new tester).

This makes the following changes:
- `safe-mode: yes|no` is now an entry in `--show-config`
- LibPoly and Cocoa are disabled by default when configuring with
`safe-mode`. We give a warning if the user specified otherwise.
- A few regressions are updated to have the appropriate options.
- Option and logic exceptions that are "admissible" in safe mode are
updated to contain the text `"in safe mode"`.
- Various options that are used in run_regression.py are upgraded to
"common" to ensure safe-mode is compatible with the tester. Removes a
few unecessary options in run_regression.py.
- Disables a number of unit tests and examples (in the CMake) that are
not applicable in safe mode.
- Adds a CI job to test a safe-mode build.

Note that the CPC tester fails due to not guarding against some unsafe
operators in the rewriter. I will address this in a separate PR.
2025-05-09 19:42:13 +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
ad76979329 Disable support for experimental theories when safe-options is set (#11162)
This adds options that guard the usage of "experimental" theories or
extensions thereof when `--safe-options` is enabled.

This includes bags, finite fields, separation logic, higher-order logic,
and extensions of arithmetic (including transcendentals, iand and pow2).

The options `--sets-exp` (renamed from `--sets-ext` in this PR) and
`--fp-exp` continue to be disabled by default, thus do not need to
change.

Similar to other expert options, these theories can still be used with
`safe-options` if they are enabled prior to setting `safe-options`, e.g.
`--ho-exp --safe-options ...` allows HOL to be used. The options
configuration will only override the setting of `*-exp` options if not
set by user.

This does not impact the behavior of cvc5 when `--safe-options` is not
set.

FYI @alex-ozdemir @mudathirmahgoub @yoni206 .
2024-09-27 15:07:07 +00:00
Aina Niemetz
eeb9a97371 c api: Add transcendentals example. (#10980) 2024-07-09 02:52:28 +00:00
Aina Niemetz
4e015283da c api: Add strings example. (#10972) 2024-07-08 23:45:35 +00:00
Aina Niemetz
8f17bd8890 c api: Add sets example. (#10971) 2024-07-08 23:10:27 +00:00
Aina Niemetz
7c6d78c653 c api: Add sequences example. (#10970) 2024-07-08 19:50:05 +00:00
Aina Niemetz
6e3a0aa013 c api: Add relations example. (#10969) 2024-07-08 18:57:16 +00:00
Aina Niemetz
92a4dceb5c c api: Add datatypes example. (#10952)
Note that this fixes a serious problem with DTypeSelector::getName()
where the delimiting 0-byte for self selectors was included, which
caused cutting off the name string for C strings.
2024-07-08 18:06:33 +00:00
Aina Niemetz
2eedebdb6a c api: Add floating_point_arithmetic example. (#10956) 2024-06-30 23:19:52 +00:00
Aina Niemetz
1320c66626 c api: Add finite_field example. (#10954) 2024-06-30 19:41:56 +00:00
Aina Niemetz
b29a7ad434 c api: Add extract example. (#10953) 2024-06-30 17:37:41 +00:00
Aina Niemetz
c9d32d557a c api: Add combination example. (#10951) 2024-06-30 02:21:03 +00:00
Aina Niemetz
91ea1eca40 c api: Add bitvectors_and_arrays example. (#10950) 2024-06-30 01:14:50 +00:00
Aina Niemetz
20a7f71127 c api: Add bitvectors example. (#10949) 2024-06-29 23:09:30 +00:00
Aina Niemetz
3526b28ca9 c api: Add support for input parsing. (#10944) 2024-06-29 20:35:58 +00:00
Aina Niemetz
caf56858a8 c api: Add examples infrastructure and bags example. (#10947) 2024-06-29 20:16:44 +00:00
Aina Niemetz
e3b012c442 examples: Refactor and expand FP examples. (#10686) 2024-06-21 21:32:07 +00:00
yoni206
a640d391ae Adding UF examples (#10824)
We don't have simple UF examples. This PR adds such an example in
smt-lib and all the APIs.
2024-06-06 11:37:44 -03:00
Aina Niemetz
fdf9ce7138 Update copyright headers. (#10459) 2024-03-12 09:35:09 -07:00
Aina Niemetz
58d7c6d556 c++ api: Expose TermManager to the API. (#10426)
This introduces a TermManager object, which will, in the future, be the
sole object responsible for handling/managing terms and sorts. For now,
all corresponding functions in `cvc5::Solver` are marked as deprecated,
as is constructor `cvc5::Solver::Solver()`, since in the future a solver
instance must be constructed from a term manager instance. Currently, we
maintain a static thread_local term manager instance to not break the
API and continue providing constructor `cvc5::Solver::Solver()`.

Note that this already converts all C++ unit tests to use the
TermManager except for a single test `getStatistics()` in
`test/unit/api/cpp/solver_black.cpp`. Statistics handling is currently
still maintained on the solver level. The statistics we maintain,
however, concern terms only and will eventually be refactored to be
tracked in the NodeManager.

Further note that the Java and Python APIs will be refactored in
separate PRs.
2024-03-08 19:39:13 +00:00
Aina Niemetz
2c862d3de4 examples: Enable FF examples when built with cocoa. (#10121) 2023-10-25 19:30:59 +00:00