99 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
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
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
Aina Niemetz
91ea1eca40 c api: Add bitvectors_and_arrays example. (#10950) 2024-06-30 01:14:50 +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
Daniel Larraz
b4189cace4 Fixes for Java bindings on Windows (#10741) 2024-05-13 17:27:32 +00:00
Aina Niemetz
fdf9ce7138 Update copyright headers. (#10459) 2024-03-12 09:35:09 -07:00
Andrew Reynolds
68fc815e03 Add setStringInput to the parser APIs (#10230)
This PR:

Updates the functionality of setIncrementalStringInput / appendIncrementalStringInput to a more intuitive behavior where append does not replace the current contents of the input.
Adds setStringInput to the API and updates the interactive shell to use this interface.
Updates the examples
Adds new unit tests
2023-12-15 19:50:57 +00:00
Sarkoxed
3185d5c293 cpp api: Extend the FiniteField related initialization functions (#9926)
This adds a general way to initialize the finite field and the element
of the final field in the C++ API from a string of an arbitrary base.

---------

Signed-off-by: Sarkoxed <sarkoxed2013@yandex.ru>
Co-authored-by: Aina Niemetz <aina.niemetz@gmail.com>
2023-12-13 22:21:14 +00:00
mudathirmahgoub
6ac22579c7 Add parser java examples (#10224) 2023-12-13 11:50:22 -06:00
Aina Niemetz
2c862d3de4 examples: Enable FF examples when built with cocoa. (#10121) 2023-10-25 19:30:59 +00:00
mudathirmahgoub
7ff15aa749 Refctor Solver.java to extend AbstractPointer (#10064)
This refactors the Solver class in the java API to extend AbstractPointer similar to other cvc5 classes.
It also cleans up redundant code for Abstract pointers. and adds Context.deletePointers to java examples as mentioned in issue #10052.
2023-10-02 06:20:26 +00:00
Andrew Reynolds
79ae0eeaec Remove support for synth-inv and fix command execution (#9882)
This removes synth-inv and corrects several issues in the parser concerning when commands should be executed.
2023-07-14 12:43:25 -05:00
Andrew Reynolds
2e41f64d47 Simplify API for constructing tuple values (#9766)
In preparation for 1.1.
2023-06-12 17:28:05 +00:00
Abdalrhman Mohamed
cde90cdf97 Minor improvements to Sygus rcons procedure. (#9781)
This PR adds minor improvements to the SyGuS solver:

Changes the weight of identity rules in the grammar, giving them higher priority during enumeration.
Replaces n-ary operators with their binary version before matching in rcons.
Splits the pattern enumerator for rcons into two enumerators: pattern enumerator and term enumerator.
Adds an option to control geometric distribution parameter used to interleave the 2 enumerators.
Additionally, this PR moves the implementation of the grammar API to an internal class with the Grammar class now a wrapper for the internal class.
2023-06-06 19:24:23 +00:00
Alex Ozdemir
368f3c3ed6 ff: connect sub-theories to main solver & test (#9218)
Organizing the PR a bit:

we hook up the subtheories to TheoryFf
we expose FF-related things via the C++/Pytohn API and SMT-LIB2 interface.
we add a bunch of tests against these interfaces.
2022-12-16 16:36:41 +00:00
mudathirmahgoub
590af04a10 Remove reference to solver from java objects (#9147) 2022-10-04 17:06:02 +00:00
Andres Noetzli
2773c6380c [Java API] Do not link JNI libraries (#8870)
Fixes #8869. We are not using `libjawt.so` or `libjvm.so` (we are not
using the Java Invocation API), so we don't need to link `libcvc5jni`
against `JNI_LIBRARIES`. This change allows us to use cvc5 from Java
without linking against the JNI libraries (see changes in the `examples`
folder).
2022-06-08 19:30:40 -07:00
Aina Niemetz
9c176f263b docs: Do not use explicit line numbers in literalinclude. (#8690) 2022-05-02 20:13:00 +00:00
mudathirmahgoub
12293a35d5 Add Relation and Table types to SMTLib parser (#8605) 2022-04-13 13:54:27 -05:00
Mathias Preiner
d01e59c13b Update copyright headers for release 1.0 (#8539) 2022-04-05 20:38:57 +00:00
Andrew Reynolds
df6ce0361d Rename mkSygusGrammar to mkGrammar (#8544) 2022-04-02 19:40:41 +00:00