Fix handling of conversions between FP and reals (#7149)
authorAndres Noetzli <andres.noetzli@gmail.com>
Tue, 21 Sep 2021 00:10:46 +0000 (17:10 -0700)
committerGitHub <noreply@github.com>
Tue, 21 Sep 2021 00:10:46 +0000 (17:10 -0700)
commit3a0fc2e7f21d797b4f9f7f43a7f4331fec97e05d
tree80d0a0081a53b8b3837d50b65679d2055344c97c
parent41b0ff8aa962d2da9b213cf7eee2e360d2094928
Fix handling of conversions between FP and reals (#7149)

Fixes #7056. Currently, we introduce a UF for conversions between FP
numbers and reals. This is done as part of `ppRewrite()`. The problem is
that terms sent to `ppRewrite()` are not fully preprocessed yet and the
FP theory solver was storing terms that were not fully preprocessed in a
map for later lookup. For the issue at hand, the conversion term
contained an `ite`, which was later removed. As a result, the theory
solver did not consider the term to be relevant when refining
abstractions. This commit changes the handling of conversion functions
to instead adding purification lemmas for conversion terms when they are
registered. The purification lemmas are needed, because otherwise, we
can't retrieve the model values for the term without the rewriter
interferring.
src/theory/fp/theory_fp.cpp
src/theory/fp/theory_fp.h
test/regress/CMakeLists.txt
test/regress/regress1/fp/fp_to_real.smt2 [new file with mode: 0644]
test/regress/regress2/fp/issue7056.smt2 [new file with mode: 0644]