Turn kinds in python API into a proper Enum (#7686)
authorGereon Kremer <gkremer@stanford.edu>
Wed, 8 Dec 2021 04:16:03 +0000 (20:16 -0800)
committerGitHub <noreply@github.com>
Wed, 8 Dec 2021 04:16:03 +0000 (04:16 +0000)
commit881464ade13c187e9455e2f4cb9b5d6a8682c536
treea971eea63a5d2111ff1ac690d5350dab05443340
parenta8e45781feeb2d3fe9556de69e25c190f0030501
Turn kinds in python API into a proper Enum (#7686)

This PR does multiple things:
- the kinds are changed from custom objects to a proper enum.Enum class
  (including according changes to the cython code and the kind generation scripts)
- all examples and tests are modified to account for the change how to use kinds
  (Kind instead of kinds)
- add docstrings to the kind enum values
- add a custom documenter that properly renders enums via autodoc
- extend doxygen setup so that we can write comments as rst (allowing us to copy
  the documentation for kinds from the cpp api to the other apis)
51 files changed:
docs/api/api.rst
docs/api/cpp/Doxyfile.in
docs/api/cpp/cpp.rst
docs/api/java/index.rst
docs/api/java/java.rst
docs/api/python/python.rst
docs/api/python/regular/kind.rst
docs/api/python/regular/python.rst
docs/api/python/z3compat/z3compat.rst
docs/conf.py.in
docs/examples/examples.rst
docs/ext/autoenum.py [new file with mode: 0644]
examples/api/python/bitvectors.py
examples/api/python/bitvectors_and_arrays.py
examples/api/python/combination.py
examples/api/python/datatypes.py
examples/api/python/exceptions.py
examples/api/python/extract.py
examples/api/python/floating_point.py
examples/api/python/helloworld.py
examples/api/python/id.py
examples/api/python/linear_arith.py
examples/api/python/quickstart.py
examples/api/python/sequences.py
examples/api/python/sets.py
examples/api/python/strings.py
examples/api/python/sygus-fun.py
examples/api/python/sygus-grammar.py
examples/api/python/sygus-inv.py
examples/api/python/transcendentals.py
examples/api/python/utils.py
src/api/java/genkinds.py.in
src/api/parsekinds.py
src/api/python/CMakeLists.txt
src/api/python/__init__.py.in
src/api/python/cvc5.pxi
src/api/python/genkinds.py.in
test/api/python/issue4889.py
test/api/python/issue5074.py
test/api/python/issue6111.py
test/api/python/proj-issue306.py
test/api/python/reset_assertions.py
test/api/python/sep_log_api.py
test/unit/api/python/test_datatype_api.py
test/unit/api/python/test_grammar.py
test/unit/api/python/test_op.py
test/unit/api/python/test_result.py
test/unit/api/python/test_solver.py
test/unit/api/python/test_sort.py
test/unit/api/python/test_term.py
test/unit/api/python/test_to_python_obj.py