diff options
author | Andrew Reynolds <andrew.j.reynolds@gmail.com> | 2020-11-10 07:43:19 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-10 07:43:19 -0600 |
commit | c2757f0440c5d5b841e05c60d1fd93dc9ee3763a (patch) | |
tree | dde6e588873a20c5bb9edf28f383f2eb00c39eb5 /test/api | |
parent | 0df0954069d56e3323a225ffa72c5913d0333ac2 (diff) |
Add proper support for the declare-heap command for separation logic (#5405)
This adds proper support for the (declare-heap (T U)) command, which declares the type of the heap in separation logic. This command is part of the standard for separation logic.
This previous was handled in an ad-hoc way where the type of the heap would be inferred on demand. This was a poor solution and has led to a number of issues related to when the heap is inferred.
Fixes #5343, fixes #4926.
Work towards CVC4/cvc4-wishues#22.
Diffstat (limited to 'test/api')
-rw-r--r-- | test/api/sep_log_api.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/api/sep_log_api.cpp b/test/api/sep_log_api.cpp index 1b1efb07e..cc20f1ed1 100644 --- a/test/api/sep_log_api.cpp +++ b/test/api/sep_log_api.cpp @@ -46,6 +46,8 @@ int validate_exception(void) /* Our integer type */ Sort integer = slv.getIntegerSort(); + /** we intentionally do not set the separation logic heap */ + /* Our SMT constants */ Term x = slv.mkConst(integer, "x"); Term y = slv.mkConst(integer, "y"); @@ -134,6 +136,9 @@ int validate_getters(void) /* Our integer type */ Sort integer = slv.getIntegerSort(); + /** Declare the separation logic heap types */ + slv.declareSeparationHeap(integer, integer); + /* A "random" constant */ Term random_constant = slv.mkInteger(0xDEADBEEF); |