Commit Graph

61 Commits

Author SHA1 Message Date
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
Andrew Reynolds
26308ebd1d Minor change to parser example, fix for bags doc (#10086)
* Minor change to parser example, fix for bags doc

* Format
2023-10-05 09:34:21 -05:00
Andrew Reynolds
74443f10ab Adding API checks, unit tests, and examples for the parser API (#10048)
This PR adds the proper checks for the parser API. It furthermore adds examples and unit tests for the parser API.

Note that InputParser::nextCommand and InputParser::nextTerm don't catch exceptions, since we want to throw ParserExceptions containing the parsing information, not API exceptions.

Also, at the moment, the InputParser can throw an exception during initialization, which is not caught either.
2023-10-02 15:51:32 +00:00
Aina Niemetz
7a4a17b193 c api: Introduce C/C++ specific handling of public enums. (#9915)
This introduces a general way to use public enums both in the C++ and
the (upcoming) C API. For the C++ case, we now use enum classes rather
than enums for public enums. This also includes definitions for
C API to_string conversions for public enums. C API definitions in
cvc5_types.h are only included from the C API, guarded via a macro
(thus, for now, not included yet when the header is included).
2023-08-22 18:17:16 +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