diff options
author | makaimann <makaim@stanford.edu> | 2020-06-04 15:18:35 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-04 15:18:35 -0700 |
commit | 6c608754e8058098e410e208d0b6cc0f586b79ca (patch) | |
tree | 6e1f58c09e6dd08eab04ec43acebd796d7cf8c99 /src/api/python/cvc4.pxd | |
parent | f0169b253759632aee0d21db916fe68702c66116 (diff) |
Wrap Result in Python API (#4473)
This PR would change the Python API to wrap the C++ Result class instead of translating it to a pure Python class. This is more convenient because there are several possibilities other than sat/unsat/unknown. Furthermore, this PR updates the bitvectors.py example which had an incorrect function name "checkEntailment" and adds a floating point example contributed by Eva Darulova.
Diffstat (limited to 'src/api/python/cvc4.pxd')
-rw-r--r-- | src/api/python/cvc4.pxd | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/api/python/cvc4.pxd b/src/api/python/cvc4.pxd index 2ca4b3645..1e0b9893b 100644 --- a/src/api/python/cvc4.pxd +++ b/src/api/python/cvc4.pxd @@ -86,13 +86,16 @@ cdef extern from "api/cvc4cpp.h" namespace "CVC4::api": cdef cppclass Result: - # Note: don't even need constructor + Result() except+ + bint isNull() except + bint isSat() except + bint isUnsat() except + bint isSatUnknown() except + bint isEntailed() except + bint isNotEntailed() except + bint isEntailmentUnknown() except + + bint operator==(const Result& r) except + + bint operator!=(const Result& r) except + string getUnknownExplanation() except + string toString() except + |