sbv-14.1: SBVTestSuite/GoldFiles/adt05.gold
** Calling: cvc5 --lang smt --incremental --nl-cov
[GOOD] ; Automatically generated by SBV. Do not edit.
[GOOD] (set-option :print-success true)
[GOOD] (set-option :global-declarations true)
[GOOD] (set-option :diagnostic-output-channel "stdout")
[GOOD] (set-option :produce-models true)
[GOOD] (set-logic HO_ALL) ; has unbounded values, using catch-all.
[GOOD] ; --- tuples ---
[GOOD] (declare-datatypes ((SBVTuple2 2)) ((par (T1 T2)
((mkSBVTuple2 (proj_1_SBVTuple2 T1)
(proj_2_SBVTuple2 T2))))))
[GOOD] (declare-datatypes ((SBVTuple3 3)) ((par (T1 T2 T3)
((mkSBVTuple3 (proj_1_SBVTuple3 T1)
(proj_2_SBVTuple3 T2)
(proj_3_SBVTuple3 T3))))))
[GOOD] ; --- sums ---
[GOOD] (declare-datatype SBVRational ((SBV.Rational (sbv.rat.numerator Int) (sbv.rat.denominator Int))))
[GOOD] (define-fun sbv.rat.eq ((x SBVRational) (y SBVRational)) Bool
(= (* (sbv.rat.numerator x) (sbv.rat.denominator y))
(* (sbv.rat.denominator x) (sbv.rat.numerator y)))
)
[GOOD] (define-fun sbv.rat.notEq ((x SBVRational) (y SBVRational)) Bool
(not (sbv.rat.eq x y))
)
[GOOD] ; --- ADTs ---
[GOOD] ; User defined ADT: Maybe
[GOOD] (declare-datatype Maybe (par (a) (
(Nothing)
(Just (getJust_1 a))
)))
[GOOD] ; User defined ADT: Either
[GOOD] (declare-datatype Either (par (a b) (
(Left (getLeft_1 a))
(Right (getRight_1 b))
)))
[GOOD] ; User defined ADT: ADT
[GOOD] (declare-datatype ADT (
(AEmpty)
(ABool (getABool_1 Bool))
(AInteger (getAInteger_1 Int))
(AWord8 (getAWord8_1 (_ BitVec 8)))
(AWord16 (getAWord16_1 (_ BitVec 16)))
(AWord32 (getAWord32_1 (_ BitVec 32)))
(AWord64 (getAWord64_1 (_ BitVec 64)))
(AInt8 (getAInt8_1 (_ BitVec 8)))
(AInt16 (getAInt16_1 (_ BitVec 16)))
(AInt32 (getAInt32_1 (_ BitVec 32)))
(AInt64 (getAInt64_1 (_ BitVec 64)))
(AWord1 (getAWord1_1 (_ BitVec 1)))
(AWord5 (getAWord5_1 (_ BitVec 5)))
(AWord30 (getAWord30_1 (_ BitVec 30)))
(AInt1 (getAInt1_1 (_ BitVec 1)))
(AInt5 (getAInt5_1 (_ BitVec 5)))
(AInt30 (getAInt30_1 (_ BitVec 30)))
(AReal (getAReal_1 Real))
(AFloat (getAFloat_1 (_ FloatingPoint 8 24)))
(ADouble (getADouble_1 (_ FloatingPoint 11 53)))
(AFP (getAFP_1 (_ FloatingPoint 5 12)))
(AString (getAString_1 String))
(AList (getAList_1 (Seq Int)))
(ATuple (getATuple_1 (SBVTuple2 (_ FloatingPoint 11 53) (Seq (SBVTuple2 (_ BitVec 5) (Seq (_ FloatingPoint 8 24)))))))
(AMaybe (getAMaybe_1 (Maybe (SBVTuple3 Real (_ FloatingPoint 8 24) (SBVTuple2 (Either Int (_ FloatingPoint 8 24)) (Seq Bool))))))
(AEither (getAEither_1 (Either (SBVTuple2 (Maybe Int) Bool) (Seq Int))))
(APair (getAPair_1 ADT) (getAPair_2 ADT))
(KChar (getKChar_1 String))
(KRational (getKRational_1 SBVRational))
))
[GOOD] ; --- literal constants ---
[GOOD] (define-fun s4 () (_ FloatingPoint 8 24) (fp #b0 #b10000001 #b00000000000000000000000))
[GOOD] ; --- top level inputs ---
[GOOD] (declare-fun s0 () ADT) ; tracks user variable "a"
[GOOD] (assert (and (= 1 (str.len (getKChar_1 s0)))
(< 0 (sbv.rat.denominator (getKRational_1 s0)))
))
[GOOD] (declare-fun s1 () ADT) ; tracks user variable "b"
[GOOD] (assert (and (= 1 (str.len (getKChar_1 s1)))
(< 0 (sbv.rat.denominator (getKRational_1 s1)))
))
[GOOD] ; --- constant tables ---
[GOOD] ; --- non-constant tables ---
[GOOD] ; --- uninterpreted constants ---
[GOOD] ; --- user defined functions ---
[GOOD] ; --- assignments ---
[GOOD] (define-fun s2 () Bool (is-AFloat s0))
[GOOD] (define-fun s3 () (_ FloatingPoint 8 24) (getAFloat_1 s0))
[GOOD] (define-fun s5 () Bool (fp.eq s3 s4))
[GOOD] (define-fun s6 () Bool (and s2 s5))
[GOOD] (define-fun s7 () Bool (is-AFloat s1))
[GOOD] (define-fun s8 () (_ FloatingPoint 8 24) (getAFloat_1 s1))
[GOOD] (define-fun s9 () Bool (fp.isNaN s8))
[GOOD] (define-fun s10 () Bool (and s7 s9))
[GOOD] ; --- delayedEqualities ---
[GOOD] ; --- formula ---
[GOOD] (assert s6)
[GOOD] (assert s10)
*** Checking Satisfiability, all solutions..
Fast allSat, Looking for solution 1
[SEND] (check-sat)
[RECV] sat
[SEND] (get-value (s0))
[RECV] ((s0 (AFloat (fp #b0 #b10000001 #b00000000000000000000000))))
[SEND] (get-value (s1))
[RECV] ((s1 (AFloat (fp #b0 #b11111111 #b10000000000000000000000))))
[GOOD] (push 1)
[GOOD] (define-fun s11 () ADT ((as AFloat ADT) (fp #b0 #b10000001 #b00000000000000000000000)))
[GOOD] (define-fun s12 () Bool (= s0 s11))
[GOOD] (define-fun s13 () Bool (not s12))
[GOOD] (assert s13)
Fast allSat, Looking for solution 2
[SEND] (check-sat)
[RECV] unsat
[GOOD] (pop 1)
[GOOD] (push 1)
[GOOD] (define-fun s14 () ADT ((as AFloat ADT) (_ NaN 8 24)))
[GOOD] (define-fun s15 () Bool (= s1 s14))
[GOOD] (define-fun s16 () Bool (not s15))
[GOOD] (assert s16)
[GOOD] (assert s12)
Fast allSat, Looking for solution 2
[SEND] (check-sat)
[RECV] unsat
[GOOD] (pop 1)
*** Solver : CVC5
*** Exit code: ExitSuccess
MODEL:Satisfiable. Model:
a = AFloat 4.0 :: ADT
b = AFloat NaN :: ADT