Fixed side conditions for CBQI BV, added unit tests. (#1434)
authorAina Niemetz <aina.niemetz@gmail.com>
Fri, 8 Dec 2017 22:32:16 +0000 (14:32 -0800)
committerGitHub <noreply@github.com>
Fri, 8 Dec 2017 22:32:16 +0000 (14:32 -0800)
commit707571c8b4a572b9554f9068df796f1257cb587d
treee7773fec0ee9d2460149a391d183448956ec1d63
parent1bf7e9db3bb501e1f3deeb905e8dec68bc028b71
Fixed side conditions for CBQI BV, added unit tests. (#1434)

This fixes the side conditions for BITVECTOR_UREM_TOTAL, BITVECTOR_UDIV_TOTAL,
BITVECTOR_LSHR, BITVECTOR_ASHR, BITVECTOR_SHL.

It refactors side condition generation for better readability and unit testing.
It further adds unit tests for all side conditions we generate in order to check if they too weak
or to restrictive (which may result in unsound behavior).

This is achieved by checking the following two implications:
not (exists x. s * x = t => SC) ... if sat, SC is too restrictive
not (SC => exists x. s * x = t) ... if sat SC is too weak

This simplifies to checking not (SC <=> exists x. s * x = t).
src/theory/bv/theory_bv_utils.cpp
src/theory/bv/theory_bv_utils.h
src/theory/quantifiers/bv_inverter.cpp
src/theory/quantifiers/bv_inverter.h
src/theory/quantifiers/ceg_t_instantiator.cpp
test/regress/regress0/quantifiers/qbv-test-invert-udiv-1.smt2
test/unit/Makefile.am
test/unit/theory/theory_quantifiers_bv_inverter_white.h [new file with mode: 0644]