diff options
author | Andres Noetzli <andres.noetzli@gmail.com> | 2019-12-18 00:27:18 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-18 00:27:18 -0800 |
commit | 9c2c0581e0a325aad8cef463cfcc72b1164f79f5 (patch) | |
tree | c410dd85e4fcb64ee855ba75ffa6110c37969173 /test | |
parent | e9499c41f405df8b42fd9ae10004b1b91a869106 (diff) |
Avoid calling rewriter from type checker (#3548)
Fixes #3536. The type checker for the chain operator was calling the
rewriter. However, the floating-point rewriter was expecting
`TheoryFp::expandDefinition()` to be applied before rewriting. If the
chain operator had subterms that were supposed to be removed by
`TheoryFp::expandDefinition()`, the FP rewriter was throwing an
exception. This commit fixes the issue by not calling the full rewriter
in the type checker but by just expanding the chain operator. This is a
bit less efficient than before because the rewriter does not cache the
result of expanding the chain operator anymore but assuming that there
are no long chains, the performance impact should be negligible. It also
seemed like a reasonable assumption that the rewriter can expect to run
after `expandDefinition()` because otherwise the rewriter has to expand
definitions, which may be too restrictive.
Diffstat (limited to 'test')
-rw-r--r-- | test/regress/CMakeLists.txt | 1 | ||||
-rw-r--r-- | test/regress/regress0/fp/issue3536.smt2 | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/test/regress/CMakeLists.txt b/test/regress/CMakeLists.txt index b05393258..7bd626ff0 100644 --- a/test/regress/CMakeLists.txt +++ b/test/regress/CMakeLists.txt @@ -470,6 +470,7 @@ set(regress_0_tests regress0/fp/abs-unsound2.smt2 regress0/fp/down-cast-RNA.smt2 regress0/fp/ext-rew-test.smt2 + regress0/fp/issue3536.smt2 regress0/fp/rti_3_5_bug.smt2 regress0/fp/rti_3_5_bug_report.smt2 regress0/fp/simple.smt2 diff --git a/test/regress/regress0/fp/issue3536.smt2 b/test/regress/regress0/fp/issue3536.smt2 new file mode 100644 index 000000000..4293cbdee --- /dev/null +++ b/test/regress/regress0/fp/issue3536.smt2 @@ -0,0 +1,6 @@ +; REQUIRES: symfpu +(set-logic QF_FP) +(declare-const x (_ FloatingPoint 11 53)) +(assert (= true (fp.eq x ((_ to_fp 11 53) (_ bv13831004815617530266 64))) true)) +(set-info :status sat) +(check-sat) |