20 Commits

Author SHA1 Message Date
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
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
Andres Noetzli
01061af730 [API] Remove redundant version of mkFunctionSort (#8503)
mkFunctionSort that takes two sorts as arguments is redundant, because
the first argument is equivalent to a vector of size one passed to the
other overload of mkFunctionSort. This commit removes the method from
the C++ API but keeps the existing semantics for the Java and Python
bindings for convenience and consistency with, e.g. mkTerm.
2022-04-01 04:50:25 +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
Aina Niemetz
bf06678fee api: Add Sort::getUninterpretedSortConstructor(). (#8459)
This further introduces TypeNode::isInstantiatedUninterpretedSort().
2022-03-30 19:39:52 +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
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
29258e0c85 api: Add unit test for null case of Sort::toString(). (#7865) 2022-01-04 01:37:47 +00:00
Aina Niemetz
94c5c54989 api: Add Sort::hasSymbol() and Sort::getSymbol(). (#7825) 2021-12-16 18:50:01 +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