89 Commits

Author SHA1 Message Date
Vinícius Camillo
1fc0f6416f Fixed CI actions on macOS. (#9448)
I increased cmake's minimum version in order to use the FindPython module, which allows the build system to specify python versions that are supported. Currently the support is extended to 3.6 through 3.10. I also removed some backward compatible conditions that do not apply anymore provided that cmake's minimum version is guaranteed to be 3.12.

MacOS builds are reenabled in ci.yml.
2023-01-24 19:01:36 +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
yoni206
1ac06eb879 Changing curly braces to brackets in python sygus examples (#9279)
The examples used {...} for lists rather than [...].
2022-11-21 21:46:04 +00:00
yoni206
9da13ed2aa Removing semi-colons from python example (#9117)
This PR removes the (redundant) semi-colons from the end of the lines in the python quickstart example.
2022-09-06 16:44:59 +00: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
Alex Ozdemir
b2c7ea88a3 Write-up for Pythonic API quickstart (#8566) 2022-04-05 02:49:30 +00:00
Andrew Reynolds
df6ce0361d Rename mkSygusGrammar to mkGrammar (#8544) 2022-04-02 19:40:41 +00:00
Andrew Reynolds
40910fb3c6 Remove variant of mkDatatypeDecl with one sort parameter (#8543)
Subsumed by the vector version.

Also marks more methods as experimetnal.
2022-04-02 19:21:46 +00:00
Aina Niemetz
5dcb750667 api: Rename get(Selector|Constructor)Term() to getTerm(). (#8537) 2022-04-02 18:57:50 +00:00
Aina Niemetz
93247764b8 api: Remove DatatypeConstructor::getSelectorTerm(). (#8535) 2022-04-02 01:53:15 +00:00
Aina Niemetz
a735215651 api: Remove Datatype::getConstructorTerm(). (#8529) 2022-04-01 21:36:07 +00:00
Aina Niemetz
506a7b8c4a Python API: Do not rename enumerators. (#8507)
Co-authored-by: Mathias Preiner <mathias.preiner@gmail.com>
Co-authored-by: mudathirmahgoub <mudathirmahgoub@gmail.com>
Co-authored-by: Gereon Kremer <gkremer@stanford.edu>
2022-04-01 19:45:36 +00:00
Gereon Kremer
a7779de22d Remove decorator from python API (#8505)
This PR removes the expand_list_arg decorator from the python API. It was used to allow calling a function f(x, *args) with a list as second argument and automatically expand the list into *args. While it merely allows for calling f(x, l) instead of f(x, *l), it adds considerable complexity to the code and documentation. Thus, following the Zen of python (have only one way to do it) we remove this decorator. This is also consistent with the pythonic API, were we made the same decision.
2022-04-01 16:58:00 +00:00
Mathias Preiner
8d7787f310 api: Swap arguments of declareSygusVar. (#8499)
Make it consistent with other declare*/define* functions.
2022-04-01 01:32:44 +00:00
mudathirmahgoub
6c421a8221 Add examples/bags.cpp (#8463) 2022-03-31 15:17:22 +00:00
Abdalrhman Mohamed
f1ba9b8542 Show the code for utilities in the docs. (#8387)
This PR adds the code for printing synthesis solutions to the docs. Various other changes are made to increase the consistency between the different bindings.

Signed-off-by: Abdalrhman M Mohamed <abdalrhman-mohamed@uiowa.edu>
2022-03-30 02:11:08 +00:00
Andres Noetzli
bf2d64336c Move RoundingMode to cvc5_types.h (#8427)
This moves RoundingMode to cvc5_types.h and switches to using the
auto-generated enum bindings. It also fixes the Java-bindings generator
for enums (certain parts were previously hardcoded for Kind) and
extends the unit tests for Solver::mkRoundingMode() to actually check
the value being created.
2022-03-29 01:13:46 +00:00
Andrew Reynolds
bf8ec7d9f1 Update checkSynth and checkSynthNext to return SynthResult (#8382)
Also extends to non-trivial unit test of SynthResult.

Note this also changes the expected output when using --sygus-out=status from unsat/sat/unknown to feasible/infeasible/fail (the option is used mostly just for our regressions). The output mode status-or-def is now equivalent to standard and is hence deleted.
2022-03-25 20:00:14 +00:00
Andrew Reynolds
7ae28c6038 Properly guard commands in the SyGuS API (#8390)
This commit ensures we don't segfault in the SyGuS API (for non-text inputs) if the option sygus is not set to true. It also renames mkSygusVar to declareSygusVar for consistency with the sygus input format.

For SyGuS API inputs, we now use the option sygus to true instead of setting the language to sygus2.

This furthermore changes a few details in set-defaults regarding the relationship between the language, the sygus option, and when to apply default options for sygus.

It also adds a unit test for checkSynth.
2022-03-25 02:21:44 +00: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
Andrew Reynolds
2f1483e2e3 Remove unecessary methods from the API (#8260)
Removes checkEntailed from Solver.
Removes isEntailed, isNotEntailed, isEntailedUnknown from Result.
Removes isSubsortOf, isFunctionLike, getUninterpretedSortName, getSortConstructorName from Sort.

Updates examples and unit tests.
2022-03-14 18:29:30 +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
3cc0fe4d64 api: Rename kinds MINUS -> SUB and UMINUS -> NEG. (#8034)
This renames the arithmetic kinds MINUS and UMINUS on the
API level for consistency with our naming scheme for other
operators (e.g., BITVECTOR_SUB, FLOATINGPOINT_SUB).
2022-02-03 02:18:51 +00:00