diff options
author | Andres Noetzli <andres.noetzli@gmail.com> | 2020-06-27 00:12:26 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-27 00:12:26 -0700 |
commit | fa833542f0e96187b3a02c4e15ec33ba45428b62 (patch) | |
tree | 649809fcc16a8308da86acd528a70eba338d4858 /src/api/python | |
parent | ccd4500c03685952ebf571b3539bd9e29c829cb5 (diff) |
Add API for retrieving separation heap/nil term (#4663)
This commit extends the API to support the retrieval of heap/nil term
when separation logic is used and changes the corresponding system test
accordingly. This commit is in preparation of making the constructor of
`ExprManager` private.
Diffstat (limited to 'src/api/python')
-rw-r--r-- | src/api/python/cvc4.pxd | 2 | ||||
-rw-r--r-- | src/api/python/cvc4.pxi | 10 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/api/python/cvc4.pxd b/src/api/python/cvc4.pxd index eb4254560..ee05709b7 100644 --- a/src/api/python/cvc4.pxd +++ b/src/api/python/cvc4.pxd @@ -197,6 +197,8 @@ cdef extern from "api/cvc4cpp.h" namespace "CVC4::api": vector[Term] getUnsatCore() except + Term getValue(Term term) except + vector[Term] getValue(const vector[Term]& terms) except + + Term getSeparationHeap() except + + Term getSeparationNilTerm() except + void pop(uint32_t nscopes) except + void printModel(ostream& out) void push(uint32_t nscopes) except + diff --git a/src/api/python/cvc4.pxi b/src/api/python/cvc4.pxi index 5abbfb113..ab174ef0d 100644 --- a/src/api/python/cvc4.pxi +++ b/src/api/python/cvc4.pxi @@ -917,6 +917,16 @@ cdef class Solver: term.cterm = self.csolver.getValue(t.cterm) return term + def getSeparationHeap(self): + cdef Term term = Term() + term.cterm = self.csolver.getSeparationHeap() + return term + + def getSeparationNilTerm(self): + cdef Term term = Term() + term.cterm = self.csolver.getSeparationNilTerm() + return term + def pop(self, nscopes=1): self.csolver.pop(nscopes) |