Add proper support for the declare-heap command for separation logic (#5405)
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>
Tue, 10 Nov 2020 13:43:19 +0000 (07:43 -0600)
committerGitHub <noreply@github.com>
Tue, 10 Nov 2020 13:43:19 +0000 (07:43 -0600)
commitc2757f0440c5d5b841e05c60d1fd93dc9ee3763a
treedde6e588873a20c5bb9edf28f383f2eb00c39eb5
parent0df0954069d56e3323a225ffa72c5913d0333ac2
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.
68 files changed:
src/api/cvc4cpp.cpp
src/api/cvc4cpp.h
src/api/python/cvc4.pxd
src/api/python/cvc4.pxi
src/parser/smt2/Smt2.g
src/printer/printer.cpp
src/printer/printer.h
src/printer/smt2/smt2_printer.cpp
src/printer/smt2/smt2_printer.h
src/smt/command.cpp
src/smt/command.h
src/smt/smt_engine.cpp
src/smt/smt_engine.h
src/theory/sep/theory_sep.cpp
src/theory/sep/theory_sep.h
src/theory/smt_engine_subsolver.cpp
src/theory/smt_engine_subsolver.h
src/theory/theory.h
src/theory/theory_engine.cpp
src/theory/theory_engine.h
test/api/sep_log_api.cpp
test/regress/regress0/sep/dispose-1.smt2
test/regress/regress0/sep/dup-nemp.smt2
test/regress/regress0/sep/issue3720-check-model.smt2
test/regress/regress0/sep/nemp.smt2
test/regress/regress0/sep/nil-no-elim.smt2
test/regress/regress0/sep/nspatial-simp.smt2
test/regress/regress0/sep/pto-01.smt2
test/regress/regress0/sep/pto-02.smt2
test/regress/regress0/sep/sep-01.smt2
test/regress/regress0/sep/sep-plus1.smt2
test/regress/regress0/sep/sep-simp-unsat-emp.smt2
test/regress/regress0/sep/simple-080420-const-sets.smt2
test/regress/regress0/sep/skolem_emp.smt2
test/regress/regress0/sep/trees-1.smt2
test/regress/regress0/sep/wand-crash.smt2
test/regress/regress1/sep/chain-int.smt2
test/regress/regress1/sep/crash1220.smt2
test/regress/regress1/sep/dispose-list-4-init.smt2
test/regress/regress1/sep/emp2-quant-unsat.smt2
test/regress/regress1/sep/finite-witness-sat.smt2
test/regress/regress1/sep/fmf-nemp-2.smt2
test/regress/regress1/sep/loop-1220.smt2
test/regress/regress1/sep/pto-04.smt2
test/regress/regress1/sep/quant_wand.smt2
test/regress/regress1/sep/sep-02.smt2
test/regress/regress1/sep/sep-03.smt2
test/regress/regress1/sep/sep-find2.smt2
test/regress/regress1/sep/sep-fmf-priority.smt2
test/regress/regress1/sep/sep-neg-1refine.smt2
test/regress/regress1/sep/sep-neg-nstrict.smt2
test/regress/regress1/sep/sep-neg-nstrict2.smt2
test/regress/regress1/sep/sep-neg-simple.smt2
test/regress/regress1/sep/sep-neg-swap.smt2
test/regress/regress1/sep/sep-nterm-again.smt2
test/regress/regress1/sep/sep-nterm-val-model.smt2
test/regress/regress1/sep/sep-simp-unc.smt2
test/regress/regress1/sep/simple-neg-sat.smt2
test/regress/regress1/sep/split-find-unsat-w-emp.smt2
test/regress/regress1/sep/split-find-unsat.smt2
test/regress/regress1/sep/wand-0526-sat.smt2
test/regress/regress1/sep/wand-false.smt2
test/regress/regress1/sep/wand-nterm-simp.smt2
test/regress/regress1/sep/wand-nterm-simp2.smt2
test/regress/regress1/sep/wand-simp-sat.smt2
test/regress/regress1/sep/wand-simp-sat2.smt2
test/regress/regress1/sep/wand-simp-unsat.smt2
test/unit/api/solver_black.h