Add method to get Python object from constant value term in Python API (#5083)
authormakaimann <makaim@stanford.edu>
Tue, 22 Sep 2020 18:58:03 +0000 (11:58 -0700)
committerGitHub <noreply@github.com>
Tue, 22 Sep 2020 18:58:03 +0000 (11:58 -0700)
commit2e2424a1a8ce19a3c4e357cf491ca027a5d1b4cc
tree10b686d148298b0cdecd2695909c79fca16fc0ca
parente3cd4670a080554e4ae1f2f26ee4353d11f02f6b
Add method to get Python object from constant value term in Python API (#5083)

This PR addresses issue https://github.com/CVC4/CVC4/issues/5014. It simply interprets the SMT-LIB string representation and produces a Python object. It currently supports booleans, ints, reals, bit-vectors, and arrays. The method (`toPythonObj`) is only valid to call if `isConst` returns true.
src/api/python/cvc4.pxi
test/unit/api/python/test_to_python_obj.py [new file with mode: 0644]