Interpret Models Returned by QF_FPABV Logic

I wrote a z3 request in SMT2 format using QF_FPABV logic (without floating point quantization of arithmetic and bit vector logic ??). The request is displayed as follows:

(set-logic QF_FPABV)
(set-option :produce-models true)

(declare-fun f0 () (_ FP 8 24))
(declare-fun f1 () (_ FP 8 24))
(declare-fun f2 () (_ FP 8 24))

(assert (= f2 (* roundNearestTiesToEven f0 f1)))
(assert (>= f2 ((_ asFloat 8 24) roundNearestTiesToEven 3.0 0)))

(check-sat)
; (check-sat-using (then simplify solve-eqs bit-blast smt))
(get-model)

WITH

(check-sat), 

I got the result and model as:

sat                                                                             
(model                                                                          
  (define-fun f2 () (_ FP 8 24)                                                 
    (as +1.44919359683990478515625p127 (_ FP 8 24)))                            
  (define-fun f1 () (_ FP 8 24)                                                 
    (as +1.476345062255859375p0 (_ FP 8 24)))                                   
  (define-fun f0 () (_ FP 8 24)                                                 
    (as +1.9632179737091064453125p126 (_ FP 8 24)))                             
)

This is what I expect. However, if I use

(check-sat-using (then simplify solve-eqs bit-blast smt)) 

instead, I acquired:

sat
(model
  ;; universe for RoundingMode:
  ;;   RoundingMode!val!0
  ;; -----------
  ;; definitions for universe elements:
  (declare-fun RoundingMode!val!0 () RoundingMode)
  ;; cardinality constraint:
  (forall ((x RoundingMode)) (= x RoundingMode!val!0))
  ;; -----------
  ;; universe for (_ FP 8 24):
  ;;   FP!val!0 FP!val!1 FP!val!2 FP!val!3
  ;; -----------
  ;; definitions for universe elements:
  (declare-fun FP!val!0 () (_ FP 8 24))
  (declare-fun FP!val!1 () (_ FP 8 24))
  (declare-fun FP!val!2 () (_ FP 8 24))
  (declare-fun FP!val!3 () (_ FP 8 24))
  ;; cardinality constraint:
  (forall ((x (_ FP 8 24)))
          (or (= x FP!val!0) (= x FP!val!1) (= x FP!val!2) (= x FP!val!3)))
  ;; -----------
  (define-fun f1 () (_ FP 8 24)
    FP!val!2)
  (define-fun f0 () (_ FP 8 24)
    FP!val!1)
  (define-fun f2 () (_ FP 8 24)
    (* roundNearestTiesToEven FP!val!1 FP!val!2))
)

This model is not trivial to interpret ...

For this simple example, I can simply use (check-sat) to get readable results. For some complex examples that contain non-linear operations, I need to use (check-sat-using (then simplify the smt bit) to avoid the "Unknown" from z3 ...

Is there any document that can teach me to interpret such a model unreadable by man?

+4
2

, SMT Z3 ( ). - ​​ , (). - fpa2bv, ,

(check-sat-using (then simplify solve-eqs bit-blast smt)) 

(check-sat-using (then simplify fpa2bv simplify solve-eqs bit-blast smt)) 

fpa2bv, -, , .

+3

, Z3. : Z3 FP:

, , z3 4.3.2, , , , , , .

+1

Source: https://habr.com/ru/post/1541811/


All Articles