99 Commits

Author SHA1 Message Date
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
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
Andres Noetzli
c93de62d8b Move Java package to io.github.cvc5 (#8469)
Previously, we were using io.github.cvc5.api to mirror the C++
namespace that the API was in. The namespace of the C++ API changed to
simply cvc5 and so this commit updates the Java package accordingly.
2022-03-31 04:09:03 +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
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
Gereon Kremer
81eb37c149 Add API unit tests for statistics (#8341)
This PR adds some unit tests that cover getStatistics() and the api::Stat class.
2022-03-23 22:59:23 +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
Andrew Reynolds
4972960da7 Check for free variables in several SolverEngine calls (#8130)
Fixes the nightlies due to ensuring that a unit test fails in production (it was failing only in debug).

Fixes #8127.
2022-02-24 18:28:58 +00:00
Aina Niemetz
f33c9b608b FP: Rename tester kinds. (#8037)
This renames FP tester kinds for consistency:
FLOATINGPOINT_ISINF -> FLOATINGPOINT_IS_INF
FLOATINGPOINT_ISN -> FLOATINGPOINT_IS_NORMAL
FLOATINGPOINT_ISNAN -> FLOATINGPOINT_IS_NAN
FLOATINGPOINT_ISNEG -> FLOATINGPOINT_IS_NEG
FLOATINGPOINT_ISPOS -> FLOATINGPOINT_IS_POS
FLOATINGPOINT_ISZ -> FLOATINGPOINT_IS_ZERO
2022-02-04 15:01:42 +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
Aina Niemetz
5b458eceb6 api: Rename mk<Value> functions for FP for consistency. (#8033) 2022-02-02 20:59:37 +00:00
mudathirmahgoub
437c346559 Add relations.cpp, relations.py examples (#7801) 2021-12-17 19:23:16 +00:00
mudathirmahgoub
b7164b4592 Update Relations.java (#7796) 2021-12-13 17:47:40 +00:00
mudathirmahgoub
6f8f56513c Add documentation for QuickStart.java (#7730)
Improve java documentation: add QuickStart and a java API overview.
2021-12-06 17:31:47 -08:00
mudathirmahgoub
6adff7575f Enable Java examples (#7702) 2021-12-01 15:08:31 +00:00
Aina Niemetz
9c672a9d14 examples: Update Java datatypes example with recent extensions. (#7693)
The C++ datatypes example was extended in #7689. This updates the Java
API datatypes example accordingly.
2021-11-24 17:53:29 +00:00
mudathirmahgoub
1a79f9534c Fix compile errors with java examples (#7646)
Fix compile errors with java examples
2021-11-16 18:13:19 +00:00
Aina Niemetz
e8c0874f92 api: Rename BOUND_VAR_LIST to VARIABLE_LIST. (#7632) 2021-11-15 16:10:26 +00:00
mudathirmahgoub
690a392656 Enable CI for Junit tests (#7436)
This PR enables CI for java tests by adding --java-bindings to ci.yml.
It also replaces the unreliable finalize method and instead uses AutoCloseable and explicit close method to clean up dynamic memory allocated by java native interface.
The PR fixes compile errors for SolverTest.java and runtime errors for Solver.defineFun.
2021-11-03 21:32:10 +00:00