14 Commits

Author SHA1 Message Date
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
Aina Niemetz
0a8baa0f0a Update copyright headers. (#9736) 2023-05-09 18:06:18 +00:00
mudathirmahgoub
17d5e26a9a Add rel.project operator to sets (#8929) 2022-07-06 21:02:23 +00:00
Gereon Kremer
79cf93488f Add missing tests for some corners of the API (#8688)
This PR adds a bunch of unit tests for some not yet covered corners of the API.
2022-05-02 21:08:58 +00:00
Gereon Kremer
13d891a718 Add some missing API tests (#8669)
This PR adds a couple of simple API tests for parts of the API that are not covered yet.
2022-04-29 00:47:10 +00:00
Mathias Preiner
d01e59c13b Update copyright headers for release 1.0 (#8539) 2022-04-05 20:38:57 +00:00
Mathias Preiner
bbcd471ed4 Introduce internal namespace and remove api namespace. (#8443)
The public cvc5 API now lives in the cvc5 namespace. All internal parts were moved into the (new) internal namespace.
The final hierarchy will be as follows:

cvc5
  ~~ public API
  ::context
  ::internal
  ::parser
  ::main

After this PR it will be:

cvc5
  ~~ public API
  ::internal
      ::context
      ::main
  ::parser
2022-03-29 23:23:01 +00:00
Mathias Preiner
cc808da53d api: Unify mkOp variants. (#8369)
Co-authored-by: Gereon Kremer <nafur42@gmail.com>
2022-03-25 23:57:10 +00:00
Andres Noetzli
3a97480ffa [FP] Remove FLOATINGPOINT_TO_FP_GENERIC kind (#8334)
This commit removes the `FLOATINGPOINT_TO_FP_GENERIC` kind, which was
only used in the parser and immediately rewritten by the floating-point
arithmetic solver. It extends the `ParseOp` class to handle indexed
operators of which we do not know the kind (`to_fp` in this case) by
storing the name and the indices. The name is then resolved later when
we have parsed the arguments.
2022-03-22 08:36:54 +00:00
Andres Noetzli
e3f8ea1932 [API] Support Op::operator[] in Java and Python (#8356)
This commit adds support for `Op::operator[]` in Java and Python and
updates all unit tests to be consistent.
2022-03-21 17:00:58 -07:00
Andres Noetzli
c0bfa39a98 Remove Op::getIndices() (#8355)
This commit removes `Op::getIndices()`. As discussed offline, the
semantics of that method were confusing and the use cases are covered by
`Op::getNumIndices()` and `Op::operator[]()` (which mirror
`Term::getNumChildren()` and `Term::operator[]()`).

Future changes are going to update the Python and Java bindings to
support `Op::operator[]()`.
2022-03-21 23:27:40 +00:00
Aina Niemetz
d2f0f6d468 Rename TO_FP operator kinds. (#8285)
FLOATINGPOINT_TO_FP_FP -> FLOATINGPOINT_TO_FP_FROM_FP
FLOATINGPOINT_TO_FP_IEEE_BITVECTOR -> FLOATINGPOINT_TO_FP_FROM_IEEE_BV
FLOATINGPOINT_TO_FP_SIGNED_BITVECTOR -> FLOATINGPOINT_TO_FP_FROM_SBV
FLOATINGPOINT_TO_FP_UNSIGNED_BITVECTOR -> FLOATINGPOINT_TO_FP_FROM_UBV
FLOATINGPOINT_TO_FP_REAL -> FLOATINGPOINT_TO_FP_FROM_REAL
2022-03-15 00:18:52 +00:00
Aina Niemetz
c335e4d3fa Rename kind PLUS -> ADD. (#8036)
This renames the arithmetic internal and API kind PLUS to ADD for
consistency with our naming scheme for other operators (e.g.,
BITVECTOR_ADD, FLOATINGPOINT_ADD).
2022-02-03 04:25:14 +00:00
Aina Niemetz
eea329d3e0 Reorganize test/unit/api directory. (#7612)
This moves .cpp files to directory test/unit/api/cpp and python files in
test/python/unit/api to test/unit/api/python.
2021-11-10 00:08:29 +00:00