diff options
author | Andres Noetzli <andres.noetzli@gmail.com> | 2019-04-01 15:07:05 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-01 15:07:05 -0700 |
commit | 8a9ffdbb248ddcc6a41f628f6dcbc070b57e6a28 (patch) | |
tree | bf9e85f9950c2c52f7795bdebdfd0183f114060d /test/regress/regress0/fp | |
parent | 41355e412a142809f63a1939a4515486ccd4c6fb (diff) |
FP: Fix wrong model due to partial assignment (#2910)
For a simple query `(not (= (fp.isSubnormal x) false))`, we were getting
a wrong model. The issue was that `(sign x)` was not assigned a value
and did not appear in the shared terms. In
`TheoryFp::collectModelInfo()`, however, we generate an expression that
connects the components of `x` to `x`, which contains `(sign x)`. As a
result, the normalization while building a model did not result in a
constant. This commit fixes the issue by marking `(sign x)` (and
`(significand x)`) as assignable. Assignable terms can take any value
while building a model if there is no existing value.
Diffstat (limited to 'test/regress/regress0/fp')
-rw-r--r-- | test/regress/regress0/fp/wrong-model.smt2 | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/regress/regress0/fp/wrong-model.smt2 b/test/regress/regress0/fp/wrong-model.smt2 new file mode 100644 index 000000000..4bb7645d5 --- /dev/null +++ b/test/regress/regress0/fp/wrong-model.smt2 @@ -0,0 +1,11 @@ +; REQUIRES: symfpu +; EXPECT: sat + +; NOTE: the (set-logic ALL) is on purpose because the problem was not triggered +; with QF_FP. +(set-logic ALL) +(declare-const r RoundingMode) +(declare-const x (_ FloatingPoint 5 11)) +(declare-const y (_ FloatingPoint 5 11)) +(assert (not (= (fp.isSubnormal x) false))) +(check-sat) |