sbv-14.0: SBVTestSuite/GoldFiles/recursive5_badContract.gold
[MEASURE] Verifying termination measures for: mc91bad @(SBV Integer -> SBV Integer)
[MEASURE] Checking: mc91bad @(SBV Integer -> SBV Integer)
[MEASURE] mc91bad @(SBV Integer -> SBV Integer) (contract): verifying with 0 helper(s)
[MEASURE] mc91bad @(SBV Integer -> SBV Integer) (contract): 0 helper axiom(s) collected, checking measure+contract
[MEASURE] replayDAG {mc91bad @(SBV Integer -> SBV Integer)}: replaying 6 node(s)
** 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-logic ALL) ; has unbounded values, using catch-all.
[GOOD] ; --- tuples ---
[GOOD] ; --- sums ---
[GOOD] ; --- literal constants ---
[GOOD] (define-fun s1 () Int 10)
[GOOD] (define-fun s2 () Int 11)
[GOOD] (define-fun s3 () Int 100)
[GOOD] (define-fun s10 () Int 0)
[GOOD] (define-fun s11 () Int 101)
[GOOD] ; --- top level inputs ---
[GOOD] (declare-fun s0 () Int) ; tracks user variable "arg"
[GOOD] (declare-fun s7 () Int) ; tracks user variable "__internal_sbv_s7"
[GOOD] (declare-fun s8 () Int) ; tracks user variable "__internal_sbv_s8"
[GOOD] ; --- constant tables ---
[GOOD] ; --- non-constant tables ---
[GOOD] ; --- uninterpreted constants ---
[GOOD] ; --- user defined functions ---
[GOOD] ; --- assignments ---
[GOOD] (define-fun s4 () Bool (> s0 s3))
[GOOD] (define-fun s5 () Int (- s0 s1))
[GOOD] (define-fun s6 () Int (+ s0 s2))
[GOOD] (define-fun s9 () Int (ite s4 s5 s8))
[GOOD] (define-fun s12 () Int (- s11 s0))
[GOOD] (define-fun s13 () Bool (<= s10 s12))
[GOOD] (define-fun s14 () Int (ite s13 s12 s10))
[GOOD] (define-fun s15 () Bool (>= s14 s10))
[GOOD] ; --- delayedEqualities ---
[GOOD] ; --- formula ---
[GOOD] (assert (not s15))
[SEND] (check-sat)
[RECV] unsat
*** Solver : Z3
*** Exit code: ExitSuccess
[MEASURE] replayDAG {mc91bad @(SBV Integer -> SBV Integer)}: replaying 6 node(s)
[MEASURE] replayDAG {mc91bad @(SBV Integer -> SBV Integer)}: replaying 6 node(s)
[MEASURE] replayDAG {mc91bad @(SBV Integer -> SBV Integer)}: replaying 6 node(s)
** 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-logic ALL) ; has unbounded values, using catch-all.
[GOOD] ; --- tuples ---
[GOOD] ; --- sums ---
[GOOD] ; --- literal constants ---
[GOOD] (define-fun s1 () Int 10)
[GOOD] (define-fun s2 () Int 11)
[GOOD] (define-fun s3 () Int 100)
[GOOD] (define-fun s24 () Int 0)
[GOOD] (define-fun s27 () Int 101)
[GOOD] ; --- top level inputs ---
[GOOD] (declare-fun s0 () Int) ; tracks user variable "arg"
[GOOD] (declare-fun s7 () Int) ; tracks user variable "__internal_sbv_s7"
[GOOD] (declare-fun s8 () Int) ; tracks user variable "__internal_sbv_s8"
[GOOD] (declare-fun s13 () Int) ; tracks user variable "__internal_sbv_s13"
[GOOD] (declare-fun s14 () Int) ; tracks user variable "__internal_sbv_s14"
[GOOD] (declare-fun s20 () Int) ; tracks user variable "__internal_sbv_s20"
[GOOD] (declare-fun s21 () Int) ; tracks user variable "__internal_sbv_s21"
[GOOD] ; --- constant tables ---
[GOOD] ; --- non-constant tables ---
[GOOD] ; --- uninterpreted constants ---
[GOOD] ; --- user defined functions ---
[GOOD] ; --- assignments ---
[GOOD] (define-fun s4 () Bool (> s0 s3))
[GOOD] (define-fun s5 () Int (- s0 s1))
[GOOD] (define-fun s6 () Int (+ s0 s2))
[GOOD] (define-fun s9 () Int (ite s4 s5 s8))
[GOOD] (define-fun s10 () Bool (> s6 s3))
[GOOD] (define-fun s11 () Int (- s6 s1))
[GOOD] (define-fun s12 () Int (+ s2 s6))
[GOOD] (define-fun s15 () Int (ite s10 s11 s14))
[GOOD] (define-fun s16 () Bool (= s7 s15))
[GOOD] (define-fun s17 () Bool (> s7 s3))
[GOOD] (define-fun s18 () Int (- s7 s1))
[GOOD] (define-fun s19 () Int (+ s2 s7))
[GOOD] (define-fun s22 () Int (ite s17 s18 s21))
[GOOD] (define-fun s23 () Bool (= s8 s22))
[GOOD] (define-fun s25 () Bool (= s7 s24))
[GOOD] (define-fun s26 () Bool (= s8 s24))
[GOOD] (define-fun s28 () Int (- s27 s0))
[GOOD] (define-fun s29 () Bool (<= s24 s28))
[GOOD] (define-fun s30 () Int (ite s29 s28 s24))
[GOOD] (define-fun s31 () Int (- s27 s6))
[GOOD] (define-fun s32 () Bool (<= s24 s31))
[GOOD] (define-fun s33 () Int (ite s32 s31 s24))
[GOOD] (define-fun s34 () Int (- s27 s7))
[GOOD] (define-fun s35 () Bool (<= s24 s34))
[GOOD] (define-fun s36 () Int (ite s35 s34 s24))
[GOOD] (define-fun s37 () Bool (not s4))
[GOOD] (define-fun s38 () Bool (> s30 s33))
[GOOD] (define-fun s39 () Bool (=> s37 s38))
[GOOD] (define-fun s40 () Bool (> s30 s36))
[GOOD] (define-fun s41 () Bool (=> s37 s40))
[GOOD] (define-fun s42 () Bool (and s39 s41))
[GOOD] (define-fun s43 () Bool (= s9 s24))
[GOOD] (define-fun s44 () Bool (and s42 s43))
[GOOD] ; --- delayedEqualities ---
[GOOD] ; --- formula ---
[GOOD] (assert s16)
[GOOD] (assert s23)
[GOOD] (assert s25)
[GOOD] (assert s26)
[GOOD] (assert (not s44))
[SEND] (check-sat)
[RECV] sat
[SEND] (get-value (s30))
[RECV] ((s30 92))
[SEND] (get-value (s33))
[RECV] ((s33 81))
[SEND] (get-value (s36))
[RECV] ((s36 101))
[SEND] (get-value (s0))
[RECV] ((s0 9))
[SEND] (get-value (s7))
[RECV] ((s7 0))
[SEND] (get-value (s8))
[RECV] ((s8 0))
[SEND] (get-value (s13))
[RECV] ((s13 0))
[SEND] (get-value (s14))
[RECV] ((s14 0))
[SEND] (get-value (s20))
[RECV] ((s20 0))
[SEND] (get-value (s21))
[RECV] ((s21 0))
*** Solver : Z3
*** Exit code: ExitSuccess
EXCEPTION:
*** Data.SBV: Measure+contract verification failed.
***
*** Function: mc91bad :: SBV Integer -> SBV Integer
***
*** Falsifiable. Counter-example:
*** arg = 9 :: Integer
*** before = 92 :: Integer
*** then[1] = 81 :: Integer
*** then[2] = 101 :: Integer
***
*** The measure must strictly decrease at every recursive call,
*** and the contract must hold for the function's output.
*** The inductive hypothesis provides the contract on recursive call
*** results for inputs with strictly smaller measure.