24 Commits

Author SHA1 Message Date
Andrew Reynolds
3f30adabe9 Add tests for uncovered API methods for abstract sorts (#9430) 2023-01-20 19:17:50 +00:00
Andrew Reynolds
b3fbf9afcc Add infrastructure and API for abstract sorts (#9263)
Adds necessary API methods for supporting abstract sorts in the cpp, java, python APIs.

An abstract sort represents a class of sorts. It is parameterized by a kind. For example, the abstract sort parameterized by the kind BITVECTOR_SORT denotes bitvectors of unspecified bit-width.

To support the above functionality, the kinds of Sort must be exported in the API, which is done in this PR.

This is the first step towards supporting the rewrite DSL for parameterized sorts, and planned SyGuS extensions that use gradual typing.
2023-01-17 19:37:10 +00:00
mudathirmahgoub
590af04a10 Remove reference to solver from java objects (#9147) 2022-10-04 17:06:02 +00:00
mudathirmahgoub
f5a9a12b21 Add declareOracleFun to the Java API (#8815) 2022-06-06 18:58:22 +00:00
Gereon Kremer
6007962d5e Add test coverage for almost everything from the Java API (#8723)
This PR adds tests for almost everything that is not yet covered by the java API tests.
2022-05-10 14:55:44 +00:00
Mathias Preiner
d01e59c13b Update copyright headers for release 1.0 (#8539) 2022-04-05 20:38:57 +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
Mathias Preiner
467c95cffb api: Use std::optional for symbols in mk* functions. (#8495)
Makes all symbols in mk* functions optional.
2022-04-01 01:10:29 +00:00
Aina Niemetz
27fbec71ee Sort, TypeNode: Rename functions related to datatypes. (#8472) 2022-03-31 20:50:45 +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
mudathirmahgoub
c56a361253 Patch cross reference in Kind.java documentation (#8458)
This PR patches cross reference links in Kind.java comments for now until a proper way is implemented that handles documentation for cpp, python and Java API.
2022-03-30 21:58:08 +00:00
Aina Niemetz
bf06678fee api: Add Sort::getUninterpretedSortConstructor(). (#8459)
This further introduces TypeNode::isInstantiatedUninterpretedSort().
2022-03-30 19:39:52 +00:00
Aina Niemetz
e7fe90e7b8 api: Add Sort::getInstantiatedParameters(). (#8445)
This adds a function to retrieve the sort arguments an instantiated
sort has been instantiated with. It further deletes
Sort::getDatatypeParamSorts() and
Sort::getUninterpretedSortParamSorts().
2022-03-29 21:36:12 +00:00
Aina Niemetz
4f57370210 api: Add Sort::isInstantiated(). (#8425)
This further removes Sort::isUinterpretedSortParameterized().
2022-03-29 01:37:13 +00:00
Aina Niemetz
615dd8b360 api: Remove left-over Sort::getUninterpretedSortName from header. (#8421) 2022-03-28 19:25:19 +00:00
Aina Niemetz
748c884353 api: Rename *SortConstructor* to *UninterpretedSortConstructor*. (#8406) 2022-03-26 05:40:42 +00:00
Aina Niemetz
a94548b57c api: Remove Sort::isParametricDatatype(). (#8405)
Previously, Sort::isParametricDatatype() returned true for both
instantiated and non-instantiated parametric datatypes.

This deletes the method, instead one can check getDatatype().isParametric(). Parametric datatypes will be distinguished from instantiated parametric datatypes via a forthcoming method Sort::isInstantiated.

Co-authored-by: ajreynol <andrew.j.reynolds@gmail.com>
2022-03-25 22:43:35 +00:00
Aina Niemetz
e8ef445fe7 api: Remove Sort::isFirstClass(). (#8312) 2022-03-15 22:51:42 +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
acba737109 api: Remove Sort::isComparableTo(). (#7903)
Since we do not support arithmetic subtyping on the API level anymore,
this function is obsolete. Consequently, this now requires that
replacement terms as arguments to Term::substitute() are of the same
sort as the replaced terms.
2022-01-10 19:27:04 +00:00
Aina Niemetz
94c5c54989 api: Add Sort::hasSymbol() and Sort::getSymbol(). (#7825) 2021-12-16 18:50:01 +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
mudathirmahgoub
60c9b49809 Refactor java package name from cvc5 to io.github.cvc5.api (#7340)
This PR refactors java package name from cvc5 to io.github.cvc5.api.
It also refactor the names of cpp and java files.
2021-10-22 23:00:06 +00:00