packages feed

sbv-14.1: SBVTestSuite/GoldFiles/adt01.gold

** Calling: z3 -nw -in -smt2
[GOOD] ; Automatically generated by SBV. Do not edit.
[GOOD] (set-option :print-success true)
[GOOD] (set-option :global-declarations true)
[GOOD] (set-option :smtlib2_compliant true)
[GOOD] (set-option :diagnostic-output-channel "stdout")
[GOOD] (set-option :produce-models true)
[GOOD] (set-option :pp.max_depth      4294967295)
[GOOD] (set-option :pp.min_alias_size 4294967295)
[GOOD] (set-option :model.inline_def  true      )
[GOOD] (set-logic 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 s1 () ADT ((as APair ADT) ((as AInt64 ADT) #x0000000000000004) ((as AMaybe ADT) ((as Just (Maybe (SBVTuple3 Real (_ FloatingPoint  8 24) (SBVTuple2 (Either Int (_ FloatingPoint  8 24)) (Seq Bool))))) (mkSBVTuple3 0.0 (fp #b0 #b10000010 #b10000000000000000000000) (mkSBVTuple2 ((as Left (Either Int (_ FloatingPoint  8 24))) 3) (seq.++ (seq.unit false) (seq.unit true))))))))
[GOOD] ; --- top level inputs ---
[GOOD] (declare-fun s0 () ADT) ; tracks user variable "e"
[GOOD] (assert (and (= 1 (str.len (getKChar_1 s0)))
                    (< 0 (sbv.rat.denominator (getKRational_1 s0)))
               ))
[GOOD] ; --- constant tables ---
[GOOD] ; --- non-constant tables ---
[GOOD] ; --- uninterpreted constants ---
[GOOD] ; --- user defined functions ---
[GOOD] ; --- assignments ---
[GOOD] (define-fun s2 () Bool (= s0 s1))
[GOOD] ; --- delayedEqualities ---
[GOOD] ; --- formula ---
[GOOD] (assert s2)
[SEND] (check-sat)
[RECV] sat
[SEND] (get-value (s0))
[RECV] ((s0 (APair (AInt64 #x0000000000000004)
              (AMaybe (Just (mkSBVTuple3 0.0
                                         (fp #b0 #x82 #b10000000000000000000000)
                                         (mkSBVTuple2 (Left 3)
                                                      (seq.++ (seq.unit false)
                                                              (seq.unit true)))))))))

MODEL: SMTModel {modelObjectives = [], modelBindings = Nothing, modelAssocs = [("e",APair (AInt64 4) (AMaybe (Just (0.0,12.0,(Left 3,[False,True])))) :: ADT)], modelUIFuns = []}
DONE.*** Solver   : Z3
*** Exit code: ExitSuccess