Add documentation for z3py compatibility API (#7652)
authorGereon Kremer <gkremer@stanford.edu>
Wed, 17 Nov 2021 19:40:49 +0000 (11:40 -0800)
committerGitHub <noreply@github.com>
Wed, 17 Nov 2021 19:40:49 +0000 (19:40 +0000)
This PR includes documentation for the z3py compatibility API into our general API.
It does so by adding the z3py compatibility API as an external project to download it and then have sphinx document it via the autodoc extension that we already use for our regular python API.
Right now we simply show everything on one page, which should be refactored in the future.

32 files changed:
docs/api/api.rst
docs/api/python/CMakeLists.txt
docs/api/python/datatype.rst [deleted file]
docs/api/python/datatypeconstructor.rst [deleted file]
docs/api/python/datatypeconstructordecl.rst [deleted file]
docs/api/python/datatypedecl.rst [deleted file]
docs/api/python/datatypeselector.rst [deleted file]
docs/api/python/grammar.rst [deleted file]
docs/api/python/op.rst [deleted file]
docs/api/python/python.rst
docs/api/python/quickstart.rst [deleted file]
docs/api/python/regular/datatype.rst [new file with mode: 0644]
docs/api/python/regular/datatypeconstructor.rst [new file with mode: 0644]
docs/api/python/regular/datatypeconstructordecl.rst [new file with mode: 0644]
docs/api/python/regular/datatypedecl.rst [new file with mode: 0644]
docs/api/python/regular/datatypeselector.rst [new file with mode: 0644]
docs/api/python/regular/grammar.rst [new file with mode: 0644]
docs/api/python/regular/op.rst [new file with mode: 0644]
docs/api/python/regular/python.rst [new file with mode: 0644]
docs/api/python/regular/quickstart.rst [new file with mode: 0644]
docs/api/python/regular/result.rst [new file with mode: 0644]
docs/api/python/regular/roundingmode.rst [new file with mode: 0644]
docs/api/python/regular/solver.rst [new file with mode: 0644]
docs/api/python/regular/sort.rst [new file with mode: 0644]
docs/api/python/regular/unknownexplanation.rst [new file with mode: 0644]
docs/api/python/result.rst [deleted file]
docs/api/python/roundingmode.rst [deleted file]
docs/api/python/solver.rst [deleted file]
docs/api/python/sort.rst [deleted file]
docs/api/python/unknownexplanation.rst [deleted file]
docs/api/python/z3compat/z3compat.rst [new file with mode: 0644]
docs/conf.py.in

index 4a1fb72022086f7354ae3753bf4f22d1e8770e6e..727caea4d5b5c6ddbabfb6ad37a36dd240610316 100644 (file)
@@ -9,6 +9,6 @@ Additionally, a more pythonic Python API is availble at https://github.com/cvc5/
 .. toctree::
    :maxdepth: 1
 
-   cpp/cpp
-   java/index
-   python/python
+   C++ API <cpp/cpp>
+   Java API <java/index>
+   Python API <python/python>
index cdac14de09e5d72696263b0e3650bb19b2375f1e..a6e46752ad4fe2f429cafab2b72bf540a33fc52c 100644 (file)
@@ -17,5 +17,16 @@ add_custom_target(docs-python)
 
 if (BUILD_BINDINGS_PYTHON)
     # Python API docs are generated from built python API
-    add_dependencies(docs-python pycvc5)
+    ExternalProject_Add(
+        z3pycompat-EP
+        ${COMMON_EP_CONFIG}
+        GIT_REPOSITORY https://github.com/cvc5/cvc5_z3py_compat.git
+        GIT_TAG main
+        CONFIGURE_COMMAND ""
+        BUILD_COMMAND ""
+        INSTALL_COMMAND ""
+        DEPENDS pycvc5
+    )
+
+    add_dependencies(docs-python pycvc5 z3pycompat-EP)
 endif()
diff --git a/docs/api/python/datatype.rst b/docs/api/python/datatype.rst
deleted file mode 100644 (file)
index a6052b1..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-Datatype
-========
-
-.. autoclass:: pycvc5.Datatype
-    :members:
-    :undoc-members:
diff --git a/docs/api/python/datatypeconstructor.rst b/docs/api/python/datatypeconstructor.rst
deleted file mode 100644 (file)
index ed45756..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-DatatypeConstructor
-===================
-
-.. autoclass:: pycvc5.DatatypeConstructor
-    :members:
-    :undoc-members:
diff --git a/docs/api/python/datatypeconstructordecl.rst b/docs/api/python/datatypeconstructordecl.rst
deleted file mode 100644 (file)
index 77b1ea3..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-DatatypeConstructorDecl
-=======================
-
-.. autoclass:: pycvc5.DatatypeConstructorDecl
-    :members:
-    :undoc-members:
diff --git a/docs/api/python/datatypedecl.rst b/docs/api/python/datatypedecl.rst
deleted file mode 100644 (file)
index 0f61471..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-DatatypeDecl
-============
-
-.. autoclass:: pycvc5.DatatypeDecl
-    :members:
-    :undoc-members:
diff --git a/docs/api/python/datatypeselector.rst b/docs/api/python/datatypeselector.rst
deleted file mode 100644 (file)
index 9c2ae22..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-DatatypeSelector
-================
-
-.. autoclass:: pycvc5.DatatypeSelector
-    :members:
-    :undoc-members:
diff --git a/docs/api/python/grammar.rst b/docs/api/python/grammar.rst
deleted file mode 100644 (file)
index a2059fa..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-Grammar
-================
-
-.. autoclass:: pycvc5.Grammar
-    :members:
-    :undoc-members:
diff --git a/docs/api/python/op.rst b/docs/api/python/op.rst
deleted file mode 100644 (file)
index 7769b33..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-Op
-================
-
-.. autoclass:: pycvc5.Op
-    :members:
-    :undoc-members:
index 0cf78d0ce1b1634e8fd5fc89cb5089334fd4e7bc..3697cf5791deb09b95f881ef73ddad7d2bdd693f 100644 (file)
@@ -1,25 +1,27 @@
 Python API Documentation
 ========================
 
+.. toctree::
+    :maxdepth: 1
+    :hidden:
+
+    z3py compatibility API <z3compat/z3compat>
+    regular Python API <regular/python>
+
 .. only:: not bindings_python
 
     .. warning::
 
         This documentation was built while python bindings were disabled. This part of the documentation is likely either empty or outdated. Please enable :code:`BUILD_BINDINGS_PYTHON` in :code:`cmake` and build the documentation again.
 
-.. toctree::
-    :maxdepth: 1
+cvc5 offers two separate APIs for Python users.
+The :doc:`regular Python API <regular/python>` is an almost exact copy of the :doc:`C++ API <../cpp/cpp>`.
+Alternatively, the :doc:`z3py compatibility API <z3compat/z3compat>` is a more pythonic API that aims to be fully compatible with `Z3s Python API <https://z3prover.github.io/api/html/namespacez3py.html>`_ while adding functionality that Z3 does not support.
+
+
+Which Python API should I use?
+------------------------------
+
+If you are a new user, or already have an application that uses Z3's python API, use the :doc:`z3py compatibility API <z3compat/z3compat>`.
 
-    quickstart
-    datatype
-    datatypeconstructor
-    datatypeconstructordecl
-    datatypedecl
-    datatypeselector
-    grammar
-    op
-    result
-    roundingmode
-    solver
-    sort
-    unknownexplanation
+If you would like a more feature-complete python API, with the ability to do almost everything that the cpp API allows, use the :doc:`regular Python API <regular/python>`.
diff --git a/docs/api/python/quickstart.rst b/docs/api/python/quickstart.rst
deleted file mode 100644 (file)
index 22a9470..0000000
+++ /dev/null
@@ -1,175 +0,0 @@
-Quickstart Guide
-================
-
-First, create a cvc5 solver instance:
-
-.. literalinclude:: ../../../examples/api/python/quickstart.py
-     :language: python
-     :lines: 22
-
-We will ask the solver to produce models and unsat cores in the following,
-and for this we have to enable the following options.
-
-.. literalinclude:: ../../../examples/api/python/quickstart.py
-     :language: python
-     :lines: 26-27
-
-Next we set the logic.
-The simplest way to set a logic for the solver is to choose ``"ALL"``.
-This enables all logics in the solver.
-Alternatively, ``"QF_ALL"`` enables all logics without quantifiers.
-To optimize the solver's behavior for a more specific logic,
-use the logic name, e.g. ``"QF_BV"`` or ``"QF_AUFBV"``.
-
-.. literalinclude:: ../../../examples/api/python/quickstart.py
-     :language: python
-     :lines: 36
-
-In the following, we will define constraints of reals and integers.
-For this, we first query the solver for the corresponding sorts.
-
-.. literalinclude:: ../../../examples/api/python/quickstart.py
-     :language: python
-     :lines: 40-41
-
-Now, we create two constants ``x`` and ``y`` of sort ``Real``,
-and two constants ``a`` and ``b`` of sort ``Integer``.
-Notice that these are *symbolic* constants, but not actual values.
-
-.. literalinclude:: ../../../examples/api/python/quickstart.py
-     :language: python
-     :lines: 46-49
-
-We define the following constraints regarding ``x`` and ``y``:
-
-.. math::
-
-  (0 < x) \wedge (0 < y) \wedge (x + y < 1) \wedge (x \leq y)
-
-We construct the required terms and assert them as follows:
-
-.. literalinclude:: ../../../examples/api/python/quickstart.py
-     :language: python
-     :lines: 59-81
-
-Now we check if the asserted formula is satisfiable, that is, we check if
-there exist values of sort ``Real`` for ``x`` and ``y`` that satisfy all
-the constraints.
-
-.. literalinclude:: ../../../examples/api/python/quickstart.py
-     :language: python
-     :lines: 85
-
-The result we get from this satisfiability check is either ``sat``, ``unsat``
-or ``unknown``.
-It's status can be queried via `isSat`, `isUnsat` and `isSatUnknown` functions.
-Alternatively, it can also be printed.
-
-.. literalinclude:: ../../../examples/api/python/quickstart.py
-     :language: python
-     :lines: 89-90
-
-This will print:
-
-.. code:: text
-
-  expected: sat
-  result: sat
-
-Now, we query the solver for the values for ``x`` and ``y`` that satisfy
-the constraints.
-
-.. literalinclude:: ../../../examples/api/python/quickstart.py
-     :language: python
-     :lines: 93-94
-
-It is also possible to get values for terms that do not appear in the original
-formula.
-
-.. literalinclude:: ../../../examples/api/python/quickstart.py
-     :language: python
-     :lines: 98-99
-
-We can retrieve the Python representation of these values as follows.
-
-.. literalinclude:: ../../../examples/api/python/quickstart.py
-     :language: python
-     :lines: 102-108
-
-This will print the following:
-
-.. code:: text
-
-  value for x: 1/6
-  value for y: 1/6
-  value for x - y: 0
-
-Another way to independently compute the value of ``x - y`` would be to
-use the Python minus operator instead of asking the solver.
-However, for more complex terms, it is easier to let the solver do the
-evaluation.
-
-.. literalinclude:: ../../../examples/api/python/quickstart.py
-     :language: python
-     :lines: 114-118
-
-This will print:
-
-.. code:: text
-
-  computed correctly
-
-Next, we will check satisfiability of the same formula,
-only this time over integer variables ``a`` and ``b``.
-For this, we first reset the assertions added to the solver.
-
-.. literalinclude:: ../../../examples/api/python/quickstart.py
-     :language: python
-     :lines: 130
-
-Next, we assert the same assertions as above, but with integers.
-This time, we inline the construction of terms
-to the assertion command.
-
-.. literalinclude:: ../../../examples/api/python/quickstart.py
-     :language: python
-     :lines: 135-139
-
-Now, we check whether the revised assertion is satisfiable.
-
-.. literalinclude:: ../../../examples/api/python/quickstart.py
-     :language: python
-     :lines: 142, 145-146
-
-This time the asserted formula is unsatisfiable:
-
-.. code:: text
-
-  expected: unsat
-  result: unsat
-
-We can query the solver for an unsatisfiable core, that is, a subset
-of the assertions that is already unsatisfiable.
-
-.. literalinclude:: ../../../examples/api/python/quickstart.py
-     :language: python
-     :lines: 150-152
-
-This will print:
-
-.. code:: text
-
-  unsat core size: 3
-  unsat core: [(< 0 a), (< 0 b), (< (+ a b) 1)]
-
-Example
--------
-
-| The SMT-LIB input for this example can be found at `examples/api/smtlib/quickstart.smt2 <https://github.com/cvc5/cvc5/blob/master/examples/api/smtlib/quickstart.smt2>`_.
-| The source code for this example can be found at `examples/api/python/quickstart.py <https://github.com/cvc5/cvc5/blob/master/examples/api/python/quickstart.cpp>`_.
-
-.. api-examples::
-    ../../../examples/api/cpp/quickstart.cpp
-    ../../../examples/api/java/QuickStart.java
-    ../../../examples/api/python/quickstart.py
-    ../../../examples/api/smtlib/quickstart.smt2
diff --git a/docs/api/python/regular/datatype.rst b/docs/api/python/regular/datatype.rst
new file mode 100644 (file)
index 0000000..a6052b1
--- /dev/null
@@ -0,0 +1,6 @@
+Datatype
+========
+
+.. autoclass:: pycvc5.Datatype
+    :members:
+    :undoc-members:
diff --git a/docs/api/python/regular/datatypeconstructor.rst b/docs/api/python/regular/datatypeconstructor.rst
new file mode 100644 (file)
index 0000000..ed45756
--- /dev/null
@@ -0,0 +1,6 @@
+DatatypeConstructor
+===================
+
+.. autoclass:: pycvc5.DatatypeConstructor
+    :members:
+    :undoc-members:
diff --git a/docs/api/python/regular/datatypeconstructordecl.rst b/docs/api/python/regular/datatypeconstructordecl.rst
new file mode 100644 (file)
index 0000000..77b1ea3
--- /dev/null
@@ -0,0 +1,6 @@
+DatatypeConstructorDecl
+=======================
+
+.. autoclass:: pycvc5.DatatypeConstructorDecl
+    :members:
+    :undoc-members:
diff --git a/docs/api/python/regular/datatypedecl.rst b/docs/api/python/regular/datatypedecl.rst
new file mode 100644 (file)
index 0000000..0f61471
--- /dev/null
@@ -0,0 +1,6 @@
+DatatypeDecl
+============
+
+.. autoclass:: pycvc5.DatatypeDecl
+    :members:
+    :undoc-members:
diff --git a/docs/api/python/regular/datatypeselector.rst b/docs/api/python/regular/datatypeselector.rst
new file mode 100644 (file)
index 0000000..9c2ae22
--- /dev/null
@@ -0,0 +1,6 @@
+DatatypeSelector
+================
+
+.. autoclass:: pycvc5.DatatypeSelector
+    :members:
+    :undoc-members:
diff --git a/docs/api/python/regular/grammar.rst b/docs/api/python/regular/grammar.rst
new file mode 100644 (file)
index 0000000..a2059fa
--- /dev/null
@@ -0,0 +1,6 @@
+Grammar
+================
+
+.. autoclass:: pycvc5.Grammar
+    :members:
+    :undoc-members:
diff --git a/docs/api/python/regular/op.rst b/docs/api/python/regular/op.rst
new file mode 100644 (file)
index 0000000..7769b33
--- /dev/null
@@ -0,0 +1,6 @@
+Op
+================
+
+.. autoclass:: pycvc5.Op
+    :members:
+    :undoc-members:
diff --git a/docs/api/python/regular/python.rst b/docs/api/python/regular/python.rst
new file mode 100644 (file)
index 0000000..0cf78d0
--- /dev/null
@@ -0,0 +1,25 @@
+Python API Documentation
+========================
+
+.. only:: not bindings_python
+
+    .. warning::
+
+        This documentation was built while python bindings were disabled. This part of the documentation is likely either empty or outdated. Please enable :code:`BUILD_BINDINGS_PYTHON` in :code:`cmake` and build the documentation again.
+
+.. toctree::
+    :maxdepth: 1
+
+    quickstart
+    datatype
+    datatypeconstructor
+    datatypeconstructordecl
+    datatypedecl
+    datatypeselector
+    grammar
+    op
+    result
+    roundingmode
+    solver
+    sort
+    unknownexplanation
diff --git a/docs/api/python/regular/quickstart.rst b/docs/api/python/regular/quickstart.rst
new file mode 100644 (file)
index 0000000..bf8773c
--- /dev/null
@@ -0,0 +1,175 @@
+Quickstart Guide
+================
+
+First, create a cvc5 solver instance:
+
+.. literalinclude:: ../../../../examples/api/python/quickstart.py
+     :language: python
+     :lines: 22
+
+We will ask the solver to produce models and unsat cores in the following,
+and for this we have to enable the following options.
+
+.. literalinclude:: ../../../../examples/api/python/quickstart.py
+     :language: python
+     :lines: 26-27
+
+Next we set the logic.
+The simplest way to set a logic for the solver is to choose ``"ALL"``.
+This enables all logics in the solver.
+Alternatively, ``"QF_ALL"`` enables all logics without quantifiers.
+To optimize the solver's behavior for a more specific logic,
+use the logic name, e.g. ``"QF_BV"`` or ``"QF_AUFBV"``.
+
+.. literalinclude:: ../../../../examples/api/python/quickstart.py
+     :language: python
+     :lines: 36
+
+In the following, we will define constraints of reals and integers.
+For this, we first query the solver for the corresponding sorts.
+
+.. literalinclude:: ../../../../examples/api/python/quickstart.py
+     :language: python
+     :lines: 40-41
+
+Now, we create two constants ``x`` and ``y`` of sort ``Real``,
+and two constants ``a`` and ``b`` of sort ``Integer``.
+Notice that these are *symbolic* constants, but not actual values.
+
+.. literalinclude:: ../../../../examples/api/python/quickstart.py
+     :language: python
+     :lines: 46-49
+
+We define the following constraints regarding ``x`` and ``y``:
+
+.. math::
+
+  (0 < x) \wedge (0 < y) \wedge (x + y < 1) \wedge (x \leq y)
+
+We construct the required terms and assert them as follows:
+
+.. literalinclude:: ../../../../examples/api/python/quickstart.py
+     :language: python
+     :lines: 59-81
+
+Now we check if the asserted formula is satisfiable, that is, we check if
+there exist values of sort ``Real`` for ``x`` and ``y`` that satisfy all
+the constraints.
+
+.. literalinclude:: ../../../../examples/api/python/quickstart.py
+     :language: python
+     :lines: 85
+
+The result we get from this satisfiability check is either ``sat``, ``unsat``
+or ``unknown``.
+It's status can be queried via `isSat`, `isUnsat` and `isSatUnknown` functions.
+Alternatively, it can also be printed.
+
+.. literalinclude:: ../../../../examples/api/python/quickstart.py
+     :language: python
+     :lines: 89-90
+
+This will print:
+
+.. code:: text
+
+  expected: sat
+  result: sat
+
+Now, we query the solver for the values for ``x`` and ``y`` that satisfy
+the constraints.
+
+.. literalinclude:: ../../../../examples/api/python/quickstart.py
+     :language: python
+     :lines: 93-94
+
+It is also possible to get values for terms that do not appear in the original
+formula.
+
+.. literalinclude:: ../../../../examples/api/python/quickstart.py
+     :language: python
+     :lines: 98-99
+
+We can retrieve the Python representation of these values as follows.
+
+.. literalinclude:: ../../../../examples/api/python/quickstart.py
+     :language: python
+     :lines: 102-108
+
+This will print the following:
+
+.. code:: text
+
+  value for x: 1/6
+  value for y: 1/6
+  value for x - y: 0
+
+Another way to independently compute the value of ``x - y`` would be to
+use the Python minus operator instead of asking the solver.
+However, for more complex terms, it is easier to let the solver do the
+evaluation.
+
+.. literalinclude:: ../../../../examples/api/python/quickstart.py
+     :language: python
+     :lines: 114-118
+
+This will print:
+
+.. code:: text
+
+  computed correctly
+
+Next, we will check satisfiability of the same formula,
+only this time over integer variables ``a`` and ``b``.
+For this, we first reset the assertions added to the solver.
+
+.. literalinclude:: ../../../../examples/api/python/quickstart.py
+     :language: python
+     :lines: 130
+
+Next, we assert the same assertions as above, but with integers.
+This time, we inline the construction of terms
+to the assertion command.
+
+.. literalinclude:: ../../../../examples/api/python/quickstart.py
+     :language: python
+     :lines: 135-139
+
+Now, we check whether the revised assertion is satisfiable.
+
+.. literalinclude:: ../../../../examples/api/python/quickstart.py
+     :language: python
+     :lines: 142, 145-146
+
+This time the asserted formula is unsatisfiable:
+
+.. code:: text
+
+  expected: unsat
+  result: unsat
+
+We can query the solver for an unsatisfiable core, that is, a subset
+of the assertions that is already unsatisfiable.
+
+.. literalinclude:: ../../../../examples/api/python/quickstart.py
+     :language: python
+     :lines: 150-152
+
+This will print:
+
+.. code:: text
+
+  unsat core size: 3
+  unsat core: [(< 0 a), (< 0 b), (< (+ a b) 1)]
+
+Example
+-------
+
+| The SMT-LIB input for this example can be found at `examples/api/smtlib/quickstart.smt2 <https://github.com/cvc5/cvc5/blob/master/examples/api/smtlib/quickstart.smt2>`_.
+| The source code for this example can be found at `examples/api/python/quickstart.py <https://github.com/cvc5/cvc5/blob/master/examples/api/python/quickstart.cpp>`_.
+
+.. api-examples::
+    ../../../../examples/api/cpp/quickstart.cpp
+    ../../../../examples/api/java/QuickStart.java
+    ../../../../examples/api/python/quickstart.py
+    ../../../../examples/api/smtlib/quickstart.smt2
diff --git a/docs/api/python/regular/result.rst b/docs/api/python/regular/result.rst
new file mode 100644 (file)
index 0000000..9edb12b
--- /dev/null
@@ -0,0 +1,6 @@
+Result
+================
+
+.. autoclass:: pycvc5.Result
+    :members:
+    :undoc-members:
diff --git a/docs/api/python/regular/roundingmode.rst b/docs/api/python/regular/roundingmode.rst
new file mode 100644 (file)
index 0000000..0c22608
--- /dev/null
@@ -0,0 +1,6 @@
+RoundingMode
+================
+
+.. autoclass:: pycvc5.RoundingMode
+    :members:
+    :undoc-members:
diff --git a/docs/api/python/regular/solver.rst b/docs/api/python/regular/solver.rst
new file mode 100644 (file)
index 0000000..2147a1f
--- /dev/null
@@ -0,0 +1,6 @@
+Solver
+========
+
+.. autoclass:: pycvc5.Solver
+    :members:
+    :undoc-members:
diff --git a/docs/api/python/regular/sort.rst b/docs/api/python/regular/sort.rst
new file mode 100644 (file)
index 0000000..270113e
--- /dev/null
@@ -0,0 +1,6 @@
+Sort
+================
+
+.. autoclass:: pycvc5.Sort
+    :members:
+    :undoc-members:
diff --git a/docs/api/python/regular/unknownexplanation.rst b/docs/api/python/regular/unknownexplanation.rst
new file mode 100644 (file)
index 0000000..aee1345
--- /dev/null
@@ -0,0 +1,6 @@
+UnknownExplanation
+==================
+
+.. autoclass:: pycvc5.UnknownExplanation
+    :members:
+    :undoc-members:
diff --git a/docs/api/python/result.rst b/docs/api/python/result.rst
deleted file mode 100644 (file)
index 9edb12b..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-Result
-================
-
-.. autoclass:: pycvc5.Result
-    :members:
-    :undoc-members:
diff --git a/docs/api/python/roundingmode.rst b/docs/api/python/roundingmode.rst
deleted file mode 100644 (file)
index 0c22608..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-RoundingMode
-================
-
-.. autoclass:: pycvc5.RoundingMode
-    :members:
-    :undoc-members:
diff --git a/docs/api/python/solver.rst b/docs/api/python/solver.rst
deleted file mode 100644 (file)
index 2147a1f..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-Solver
-========
-
-.. autoclass:: pycvc5.Solver
-    :members:
-    :undoc-members:
diff --git a/docs/api/python/sort.rst b/docs/api/python/sort.rst
deleted file mode 100644 (file)
index 270113e..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-Sort
-================
-
-.. autoclass:: pycvc5.Sort
-    :members:
-    :undoc-members:
diff --git a/docs/api/python/unknownexplanation.rst b/docs/api/python/unknownexplanation.rst
deleted file mode 100644 (file)
index aee1345..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-UnknownExplanation
-==================
-
-.. autoclass:: pycvc5.UnknownExplanation
-    :members:
-    :undoc-members:
diff --git a/docs/api/python/z3compat/z3compat.rst b/docs/api/python/z3compat/z3compat.rst
new file mode 100644 (file)
index 0000000..a9db13d
--- /dev/null
@@ -0,0 +1,14 @@
+z3py compatibility API
+=========================================
+
+.. only:: not bindings_python
+
+    .. warning::
+
+        This documentation was built while python bindings were disabled. This part of the documentation is likely either empty or outdated. Please enable :code:`BUILD_BINDINGS_PYTHON` in :code:`cmake` and build the documentation again.
+
+
+.. automodule:: cvc5_z3py_compat
+   :members:
+   :private-members:
+   :imported-members:
index f919976464acf363f40662486e5d31de58a9e6ef..b8aacf12948b1de15961f13059216bce6735d4bc 100644 (file)
@@ -18,6 +18,7 @@ sys.path.insert(0, '${CMAKE_CURRENT_SOURCE_DIR}/ext/')
 
 # path to python api
 sys.path.insert(0, '${CMAKE_BINARY_DIR}/src/api/python')
+sys.path.insert(0, '${CMAKE_BINARY_DIR}/deps/src/z3pycompat-EP')
 
 if("${BUILD_BINDINGS_PYTHON}" == "ON"):
         tags.add('bindings_python')