| 1 |
; COMMAND-LINE: --lang=smt2.6 |
| 2 |
; SCRUBBER: sed -e 's/The fact in question: .*$/The fact in question: TERM/' -e 's/in a linear logic: .*$/in a linear logic: TERM/' |
| 3 |
; EXPECT: (error "A non-linear fact was asserted to arithmetic in a linear logic. |
| 4 |
; EXPECT: The fact in question: TERM |
| 5 |
; EXPECT: ") |
| 6 |
; EXIT: 1 |
| 7 |
(set-logic AUFBVDTLIRA) |
| 8 |
;; produced by cvc4_15.drv ;; |
| 9 |
(set-info :source |VC generated by SPARK 2014|) |
| 10 |
(set-info :smt-lib-version 2.6) |
| 11 |
(set-info :category industrial) |
| 12 |
(set-info :status unknown) |
| 13 |
;;; generated by SMT-LIB2 driver |
| 14 |
;;; SMT-LIB2 driver: bit-vectors, common part |
| 15 |
(set-option :produce-models true) |
| 16 |
;;; SMT-LIB2: integer arithmetic |
| 17 |
;;; SMT-LIB2: real arithmetic |
| 18 |
(declare-datatypes ((tuple0 0)) (((Tuple0)))) |
| 19 |
(declare-sort us_private 0) |
| 20 |
|
| 21 |
(declare-fun us_null_ext__ () us_private) |
| 22 |
|
| 23 |
(declare-sort us_type_of_heap 0) |
| 24 |
|
| 25 |
(declare-datatypes ((us_type_of_heap__ref 0)) |
| 26 |
(((mk___type_of_heap__ref (us_type_of_heap__content us_type_of_heap))))) |
| 27 |
(declare-sort us_image 0) |
| 28 |
|
| 29 |
(declare-datatypes ((int__ref 0)) (((mk_int__ref (int__content Int))))) |
| 30 |
(declare-datatypes ((bool__ref 0)) (((mk_bool__ref (bool__content Bool))))) |
| 31 |
(declare-datatypes ((real__ref 0)) (((mk_real__ref (real__content Real))))) |
| 32 |
(declare-datatypes ((us_private__ref 0)) |
| 33 |
(((mk___private__ref (us_private__content us_private))))) |
| 34 |
(define-fun int__ref___projection ((a int__ref)) Int (int__content a)) |
| 35 |
|
| 36 |
(define-fun bool__ref___projection ((a bool__ref)) Bool (bool__content a)) |
| 37 |
|
| 38 |
(define-fun real__ref___projection ((a real__ref)) Real (real__content a)) |
| 39 |
|
| 40 |
(define-fun us_private__ref___projection ((a us_private__ref)) us_private |
| 41 |
(us_private__content a)) |
| 42 |
|
| 43 |
(declare-fun us_compatible_tags (Int Int) Bool) |
| 44 |
|
| 45 |
;; __compatible_tags_refl |
| 46 |
(assert (forall ((tag Int)) (us_compatible_tags tag tag))) |
| 47 |
|
| 48 |
(define-fun to_int1 ((b Bool)) Int (ite (= b true) 1 0)) |
| 49 |
|
| 50 |
(define-fun of_int ((i Int)) Bool (ite (= i 0) false true)) |
| 51 |
|
| 52 |
(define-fun in_range ((x Int)) Bool (or (= x 0) (= x 1))) |
| 53 |
|
| 54 |
(declare-fun attr__ATTRIBUTE_IMAGE (Bool) us_image) |
| 55 |
|
| 56 |
(declare-fun attr__ATTRIBUTE_VALUE__pre_check (us_image) Bool) |
| 57 |
|
| 58 |
(declare-fun attr__ATTRIBUTE_VALUE (us_image) Bool) |
| 59 |
|
| 60 |
(declare-fun power (Real Int) Real) |
| 61 |
|
| 62 |
;; Power_0 |
| 63 |
(assert (forall ((x Real)) (= (power x 0) 1.0))) |
| 64 |
|
| 65 |
;; Power_s |
| 66 |
(assert |
| 67 |
(forall ((x Real) (n Int)) |
| 68 |
(=> (<= 0 n) (= (power x (+ n 1)) (* x (power x n)))))) |
| 69 |
|
| 70 |
;; Power_s_alt |
| 71 |
(assert |
| 72 |
(forall ((x Real) (n Int)) |
| 73 |
(=> (< 0 n) (= (power x n) (* x (power x (- n 1))))))) |
| 74 |
|
| 75 |
;; Power_1 |
| 76 |
(assert (forall ((x Real)) (= (power x 1) x))) |
| 77 |
|
| 78 |
;; Power_sum |
| 79 |
(assert |
| 80 |
(forall ((x Real) (n Int) (m Int)) |
| 81 |
(=> (<= 0 n) |
| 82 |
(=> (<= 0 m) (= (power x (+ n m)) (* (power x n) (power x m))))))) |
| 83 |
|
| 84 |
;; Power_mult |
| 85 |
(assert |
| 86 |
(forall ((x Real) (n Int) (m Int)) |
| 87 |
(=> (<= 0 n) (=> (<= 0 m) (= (power x (* n m)) (power (power x n) m)))))) |
| 88 |
|
| 89 |
;; Power_mult2 |
| 90 |
(assert |
| 91 |
(forall ((x Real) (y Real) (n Int)) |
| 92 |
(=> (<= 0 n) (= (power (* x y) n) (* (power x n) (power y n)))))) |
| 93 |
|
| 94 |
;; Pow_ge_one |
| 95 |
(assert |
| 96 |
(forall ((x Real) (n Int)) |
| 97 |
(=> (and (<= 0 n) (<= 1.0 x)) (<= 1.0 (power x n))))) |
| 98 |
|
| 99 |
(declare-datatypes ((mode 0)) |
| 100 |
(((NearestTiesToEven) (ToZero) (Up) (Down) (NearestTiesToAway)))) |
| 101 |
(declare-sort single 0) |
| 102 |
|
| 103 |
(declare-fun round (mode Real) Real) |
| 104 |
|
| 105 |
(declare-fun value (single) Real) |
| 106 |
|
| 107 |
(declare-fun exact (single) Real) |
| 108 |
|
| 109 |
(declare-fun model (single) Real) |
| 110 |
|
| 111 |
(define-fun round_error ((x single)) Real (ite (>= (- (value x) (exact x)) 0.0) (- |
| 112 |
(value x) (exact x)) (- (- (value x) (exact x))))) |
| 113 |
|
| 114 |
(define-fun total_error ((x single)) Real (ite (>= (- (value x) (model x)) 0.0) (- |
| 115 |
(value x) (model x)) (- (- (value x) (model x))))) |
| 116 |
|
| 117 |
(define-fun no_overflow ((m mode) |
| 118 |
(x Real)) Bool (<= (ite (>= (round m x) 0.0) (round m x) (- (round m x))) 340282346638528859811704183484516925440.0)) |
| 119 |
|
| 120 |
;; Bounded_real_no_overflow |
| 121 |
(assert |
| 122 |
(forall ((m mode) (x Real)) |
| 123 |
(=> (<= (ite (>= x 0.0) x (- x)) 340282346638528859811704183484516925440.0) |
| 124 |
(no_overflow m x)))) |
| 125 |
|
| 126 |
;; Round_monotonic |
| 127 |
(assert |
| 128 |
(forall ((m mode) (x Real) (y Real)) |
| 129 |
(=> (<= x y) (<= (round m x) (round m y))))) |
| 130 |
|
| 131 |
;; Round_idempotent |
| 132 |
(assert |
| 133 |
(forall ((m1 mode) (m2 mode) (x Real)) |
| 134 |
(= (round m1 (round m2 x)) (round m2 x)))) |
| 135 |
|
| 136 |
;; Round_value |
| 137 |
(assert (forall ((m mode) (x single)) (= (round m (value x)) (value x)))) |
| 138 |
|
| 139 |
;; Bounded_value |
| 140 |
(assert |
| 141 |
(forall ((x single)) |
| 142 |
(<= (ite (>= (value x) 0.0) (value x) (- (value x))) 340282346638528859811704183484516925440.0))) |
| 143 |
|
| 144 |
;; Exact_rounding_for_integers |
| 145 |
(assert |
| 146 |
(forall ((m mode) (i Int)) |
| 147 |
(=> (and (<= (- 16777216) i) (<= i 16777216)) |
| 148 |
(= (round m (to_real i)) (to_real i))))) |
| 149 |
|
| 150 |
;; Round_down_le |
| 151 |
(assert (forall ((x Real)) (<= (round Down x) x))) |
| 152 |
|
| 153 |
;; Round_up_ge |
| 154 |
(assert (forall ((x Real)) (<= x (round Up x)))) |
| 155 |
|
| 156 |
;; Round_down_neg |
| 157 |
(assert (forall ((x Real)) (= (round Down (- x)) (- (round Up x))))) |
| 158 |
|
| 159 |
;; Round_up_neg |
| 160 |
(assert (forall ((x Real)) (= (round Up (- x)) (- (round Down x))))) |
| 161 |
|
| 162 |
(declare-fun round_logic (mode Real) single) |
| 163 |
|
| 164 |
;; Round_logic_def |
| 165 |
(assert |
| 166 |
(forall ((m mode) (x Real)) |
| 167 |
(=> (no_overflow m x) (= (value (round_logic m x)) (round m x))))) |
| 168 |
|
| 169 |
(define-fun of_real_post ((m mode) (x Real) |
| 170 |
(res single)) Bool (and (= (value res) (round m x)) |
| 171 |
(and (= (exact res) x) (= (model res) x)))) |
| 172 |
|
| 173 |
(define-fun add_post ((m mode) (x single) (y single) |
| 174 |
(res single)) Bool (and (= (value res) (round m (+ (value x) (value y)))) |
| 175 |
(and (= (exact res) (+ (exact x) (exact y))) |
| 176 |
(= (model res) (+ (model x) (model y)))))) |
| 177 |
|
| 178 |
(define-fun sub_post ((m mode) (x single) (y single) |
| 179 |
(res single)) Bool (and (= (value res) (round m (- (value x) (value y)))) |
| 180 |
(and (= (exact res) (- (exact x) (exact y))) |
| 181 |
(= (model res) (- (model x) (model y)))))) |
| 182 |
|
| 183 |
(define-fun mul_post ((m mode) (x single) (y single) |
| 184 |
(res single)) Bool (and (= (value res) (round m (* (value x) (value y)))) |
| 185 |
(and (= (exact res) (* (exact x) (exact y))) |
| 186 |
(= (model res) (* (model x) (model y)))))) |
| 187 |
|
| 188 |
(define-fun div_post ((m mode) (x single) (y single) |
| 189 |
(res single)) Bool (and (= (value res) (round m (/ (value x) (value y)))) |
| 190 |
(and (= (exact res) (/ (exact x) (exact y))) |
| 191 |
(= (model res) (/ (model x) (model y)))))) |
| 192 |
|
| 193 |
(define-fun neg_post ((x single) |
| 194 |
(res single)) Bool (and (= (value res) (- (value x))) |
| 195 |
(and (= (exact res) (- (exact x))) |
| 196 |
(= (model res) (- (model x)))))) |
| 197 |
|
| 198 |
(define-fun lt ((x single) (y single)) Bool (< (value x) (value y))) |
| 199 |
|
| 200 |
(define-fun gt ((x single) (y single)) Bool (< (value y) (value x))) |
| 201 |
|
| 202 |
(declare-sort double 0) |
| 203 |
|
| 204 |
(declare-fun round1 (mode Real) Real) |
| 205 |
|
| 206 |
(declare-fun value1 (double) Real) |
| 207 |
|
| 208 |
(declare-fun exact1 (double) Real) |
| 209 |
|
| 210 |
(declare-fun model1 (double) Real) |
| 211 |
|
| 212 |
(define-fun round_error1 ((x double)) Real (ite (>= (- (value1 x) (exact1 x)) 0.0) (- |
| 213 |
(value1 x) (exact1 x)) (- (- (value1 x) (exact1 x))))) |
| 214 |
|
| 215 |
(define-fun total_error1 ((x double)) Real (ite (>= (- (value1 x) (model1 x)) 0.0) (- |
| 216 |
(value1 x) (model1 x)) (- (- (value1 x) (model1 x))))) |
| 217 |
|
| 218 |
(define-fun no_overflow1 ((m mode) |
| 219 |
(x Real)) Bool (<= (ite (>= (round1 m x) 0.0) (round1 m x) (- (round1 m x))) 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0)) |
| 220 |
|
| 221 |
;; Bounded_real_no_overflow |
| 222 |
(assert |
| 223 |
(forall ((m mode) (x Real)) |
| 224 |
(=> |
| 225 |
(<= (ite (>= x 0.0) x (- x)) 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0) |
| 226 |
(no_overflow1 m x)))) |
| 227 |
|
| 228 |
;; Round_monotonic |
| 229 |
(assert |
| 230 |
(forall ((m mode) (x Real) (y Real)) |
| 231 |
(=> (<= x y) (<= (round1 m x) (round1 m y))))) |
| 232 |
|
| 233 |
;; Round_idempotent |
| 234 |
(assert |
| 235 |
(forall ((m1 mode) (m2 mode) (x Real)) |
| 236 |
(= (round1 m1 (round1 m2 x)) (round1 m2 x)))) |
| 237 |
|
| 238 |
;; Round_value |
| 239 |
(assert |
| 240 |
(forall ((m mode) (x double)) (= (round1 m (value1 x)) (value1 x)))) |
| 241 |
|
| 242 |
;; Bounded_value |
| 243 |
(assert |
| 244 |
(forall ((x double)) |
| 245 |
(<= (ite (>= (value1 x) 0.0) (value1 x) (- (value1 x))) 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0))) |
| 246 |
|
| 247 |
;; Exact_rounding_for_integers |
| 248 |
(assert |
| 249 |
(forall ((m mode) (i Int)) |
| 250 |
(=> (and (<= (- 9007199254740992) i) (<= i 9007199254740992)) |
| 251 |
(= (round1 m (to_real i)) (to_real i))))) |
| 252 |
|
| 253 |
;; Round_down_le |
| 254 |
(assert (forall ((x Real)) (<= (round1 Down x) x))) |
| 255 |
|
| 256 |
;; Round_up_ge |
| 257 |
(assert (forall ((x Real)) (<= x (round1 Up x)))) |
| 258 |
|
| 259 |
;; Round_down_neg |
| 260 |
(assert (forall ((x Real)) (= (round1 Down (- x)) (- (round1 Up x))))) |
| 261 |
|
| 262 |
;; Round_up_neg |
| 263 |
(assert (forall ((x Real)) (= (round1 Up (- x)) (- (round1 Down x))))) |
| 264 |
|
| 265 |
(declare-fun round_logic1 (mode Real) double) |
| 266 |
|
| 267 |
;; Round_logic_def |
| 268 |
(assert |
| 269 |
(forall ((m mode) (x Real)) |
| 270 |
(=> (no_overflow1 m x) (= (value1 (round_logic1 m x)) (round1 m x))))) |
| 271 |
|
| 272 |
(define-fun of_real_post1 ((m mode) (x Real) |
| 273 |
(res double)) Bool (and (= (value1 res) (round1 m x)) |
| 274 |
(and (= (exact1 res) x) (= (model1 res) x)))) |
| 275 |
|
| 276 |
(define-fun add_post1 ((m mode) (x double) (y double) |
| 277 |
(res double)) Bool (and |
| 278 |
(= (value1 res) (round1 m (+ (value1 x) (value1 y)))) |
| 279 |
(and (= (exact1 res) (+ (exact1 x) (exact1 y))) |
| 280 |
(= (model1 res) (+ (model1 x) (model1 y)))))) |
| 281 |
|
| 282 |
(define-fun sub_post1 ((m mode) (x double) (y double) |
| 283 |
(res double)) Bool (and |
| 284 |
(= (value1 res) (round1 m (- (value1 x) (value1 y)))) |
| 285 |
(and (= (exact1 res) (- (exact1 x) (exact1 y))) |
| 286 |
(= (model1 res) (- (model1 x) (model1 y)))))) |
| 287 |
|
| 288 |
(define-fun mul_post1 ((m mode) (x double) (y double) |
| 289 |
(res double)) Bool (and |
| 290 |
(= (value1 res) (round1 m (* (value1 x) (value1 y)))) |
| 291 |
(and (= (exact1 res) (* (exact1 x) (exact1 y))) |
| 292 |
(= (model1 res) (* (model1 x) (model1 y)))))) |
| 293 |
|
| 294 |
(define-fun div_post1 ((m mode) (x double) (y double) |
| 295 |
(res double)) Bool (and |
| 296 |
(= (value1 res) (round1 m (/ (value1 x) (value1 y)))) |
| 297 |
(and (= (exact1 res) (/ (exact1 x) (exact1 y))) |
| 298 |
(= (model1 res) (/ (model1 x) (model1 y)))))) |
| 299 |
|
| 300 |
(define-fun neg_post1 ((x double) |
| 301 |
(res double)) Bool (and (= (value1 res) (- (value1 x))) |
| 302 |
(and (= (exact1 res) (- (exact1 x))) |
| 303 |
(= (model1 res) (- (model1 x)))))) |
| 304 |
|
| 305 |
(define-fun lt1 ((x double) (y double)) Bool (< (value1 x) (value1 y))) |
| 306 |
|
| 307 |
(define-fun gt1 ((x double) (y double)) Bool (< (value1 y) (value1 x))) |
| 308 |
|
| 309 |
;; round_single_bound |
| 310 |
(assert |
| 311 |
(forall ((x Real)) |
| 312 |
(! (and |
| 313 |
(<= (- (- x (* (/ 1.0 16777216.0) (ite (>= x 0.0) x (- x)))) (/ 1.0 1427247692705959881058285969449495136382746624.0)) |
| 314 |
(round NearestTiesToEven x)) |
| 315 |
(<= (round NearestTiesToEven x) (+ (+ x (* (/ 1.0 16777216.0) (ite (>= x 0.0) x (- x)))) (/ 1.0 1427247692705959881058285969449495136382746624.0)))) :pattern ( |
| 316 |
(round NearestTiesToEven x)) ))) |
| 317 |
|
| 318 |
;; round_double_bound |
| 319 |
(assert |
| 320 |
(forall ((x Real)) |
| 321 |
(! (and |
| 322 |
(<= (- (- x (* (/ 1.0 9007199254740992.0) (ite (>= x 0.0) x (- x)))) (/ 1.0 404804506614621236704990693437834614099113299528284236713802716054860679135990693783920767402874248990374155728633623822779617474771586953734026799881477019843034848553132722728933815484186432682479535356945490137124014966849385397236206711298319112681620113024717539104666829230461005064372655017292012526615415482186989568.0)) |
| 323 |
(round1 NearestTiesToEven x)) |
| 324 |
(<= (round1 NearestTiesToEven x) (+ (+ x (* (/ 1.0 9007199254740992.0) (ite (>= x 0.0) x (- x)))) (/ 1.0 404804506614621236704990693437834614099113299528284236713802716054860679135990693783920767402874248990374155728633623822779617474771586953734026799881477019843034848553132722728933815484186432682479535356945490137124014966849385397236206711298319112681620113024717539104666829230461005064372655017292012526615415482186989568.0)))) :pattern ( |
| 325 |
(round1 NearestTiesToEven x)) ))) |
| 326 |
|
| 327 |
;; round_double_single |
| 328 |
(assert |
| 329 |
(forall ((x Real)) |
| 330 |
(! (= (round1 NearestTiesToEven (round NearestTiesToEven x)) (round |
| 331 |
NearestTiesToEven |
| 332 |
x)) :pattern ( |
| 333 |
(round NearestTiesToEven x)) ))) |
| 334 |
|
| 335 |
(declare-fun round2 (Real) Int) |
| 336 |
|
| 337 |
;; Round_down |
| 338 |
(assert |
| 339 |
(forall ((x Real)) |
| 340 |
(=> (< (- x (to_real (to_int x))) (/ 5.0 10.0)) (= (round2 x) (to_int x))))) |
| 341 |
|
| 342 |
;; Round_up |
| 343 |
(assert |
| 344 |
(forall ((x Real)) |
| 345 |
(=> (< (- (to_real (- 1 (to_int (- 1.0 x)))) x) (/ 5.0 10.0)) |
| 346 |
(= (round2 x) (- 1 (to_int (- 1.0 x))))))) |
| 347 |
|
| 348 |
;; Round_neg_tie |
| 349 |
(assert |
| 350 |
(forall ((x Real)) |
| 351 |
(=> (and (= (- x (to_real (to_int x))) (/ 5.0 10.0)) (< x 0.0)) |
| 352 |
(= (round2 x) (to_int x))))) |
| 353 |
|
| 354 |
;; Round_pos_tie |
| 355 |
(assert |
| 356 |
(forall ((x Real)) |
| 357 |
(=> |
| 358 |
(and (= (- (to_real (- 1 (to_int (- 1.0 x)))) x) (/ 5.0 10.0)) (< 0.0 x)) |
| 359 |
(= (round2 x) (- 1 (to_int (- 1.0 x))))))) |
| 360 |
|
| 361 |
;; Round_int |
| 362 |
(assert |
| 363 |
(forall ((i Int)) |
| 364 |
(! (= (round2 (to_real i)) i) :pattern ((round2 (to_real i))) ))) |
| 365 |
|
| 366 |
;; Round_near_int |
| 367 |
(assert |
| 368 |
(forall ((i Int)) |
| 369 |
(forall ((x Real)) |
| 370 |
(=> (and (< (- (/ 5.0 10.0)) x) (< x (/ 5.0 10.0))) |
| 371 |
(= (round2 (+ (to_real i) x)) i))))) |
| 372 |
|
| 373 |
;; Round_monotonic |
| 374 |
(assert |
| 375 |
(forall ((x Real) (y Real)) (=> (<= x y) (<= (round2 x) (round2 y))))) |
| 376 |
|
| 377 |
;; Round_monotonic_int1 |
| 378 |
(assert |
| 379 |
(forall ((x Real) (i Int)) (=> (<= x (to_real i)) (<= (round2 x) i)))) |
| 380 |
|
| 381 |
;; Round_monotonic_int2 |
| 382 |
(assert |
| 383 |
(forall ((x Real) (i Int)) (=> (<= (to_real i) x) (<= i (round2 x))))) |
| 384 |
|
| 385 |
;; Round_bound |
| 386 |
(assert |
| 387 |
(forall ((x Real)) |
| 388 |
(and (<= (- x (/ 5.0 10.0)) (to_real (round2 x))) |
| 389 |
(<= (to_real (round2 x)) (+ x (/ 5.0 10.0)))))) |
| 390 |
|
| 391 |
(declare-fun remainder (Real Real) Real) |
| 392 |
|
| 393 |
(declare-sort float 0) |
| 394 |
|
| 395 |
(define-fun in_range1 ((x Real)) Bool (and |
| 396 |
(<= (- 340282346638528859811704183484516925440.0) x) |
| 397 |
(<= x 340282346638528859811704183484516925440.0))) |
| 398 |
|
| 399 |
(declare-fun to_real1 (float) Real) |
| 400 |
|
| 401 |
(declare-fun of_real (Real) float) |
| 402 |
|
| 403 |
(declare-fun user_eq (float float) Bool) |
| 404 |
|
| 405 |
(declare-fun next_representable (Real) Real) |
| 406 |
|
| 407 |
(declare-fun prev_representable (Real) Real) |
| 408 |
|
| 409 |
;; next_representable_def |
| 410 |
(assert |
| 411 |
(forall ((x Real)) |
| 412 |
(! (< x (next_representable x)) :pattern ((next_representable x)) ))) |
| 413 |
|
| 414 |
;; prev_representable_def |
| 415 |
(assert |
| 416 |
(forall ((x Real)) |
| 417 |
(! (< (prev_representable x) x) :pattern ((prev_representable x)) ))) |
| 418 |
|
| 419 |
(declare-fun attr__ATTRIBUTE_IMAGE1 (Real) us_image) |
| 420 |
|
| 421 |
(declare-fun attr__ATTRIBUTE_VALUE__pre_check1 (us_image) Bool) |
| 422 |
|
| 423 |
(declare-fun attr__ATTRIBUTE_VALUE1 (us_image) Real) |
| 424 |
|
| 425 |
(declare-fun dummy () float) |
| 426 |
|
| 427 |
;; inversion_axiom |
| 428 |
(assert |
| 429 |
(forall ((x float)) |
| 430 |
(! (= (of_real (to_real1 x)) x) :pattern ((to_real1 x)) ))) |
| 431 |
|
| 432 |
;; representable_first |
| 433 |
(assert |
| 434 |
(= (round NearestTiesToEven (- 340282346638528859811704183484516925440.0)) (- 340282346638528859811704183484516925440.0))) |
| 435 |
|
| 436 |
;; representable_last |
| 437 |
(assert |
| 438 |
(= (round NearestTiesToEven 340282346638528859811704183484516925440.0) 340282346638528859811704183484516925440.0)) |
| 439 |
|
| 440 |
;; range_axiom |
| 441 |
(assert (forall ((x float)) (in_range1 (to_real1 x)))) |
| 442 |
|
| 443 |
(declare-datatypes ((float__ref 0)) (((mk_float__ref (float__content float))))) |
| 444 |
(define-fun float__ref___projection ((a float__ref)) float (float__content a)) |
| 445 |
|
| 446 |
(declare-sort weapon_kind 0) |
| 447 |
|
| 448 |
(define-fun in_range2 ((x Int)) Bool (and (<= 0 x) (<= x 2))) |
| 449 |
|
| 450 |
(define-fun bool_eq ((x Int) (y Int)) Bool (ite (= x y) true false)) |
| 451 |
|
| 452 |
(declare-fun attr__ATTRIBUTE_IMAGE2 (Int) us_image) |
| 453 |
|
| 454 |
(declare-fun attr__ATTRIBUTE_VALUE__pre_check2 (us_image) Bool) |
| 455 |
|
| 456 |
(declare-fun attr__ATTRIBUTE_VALUE2 (us_image) Int) |
| 457 |
|
| 458 |
(declare-fun to_rep (weapon_kind) Int) |
| 459 |
|
| 460 |
(declare-fun of_rep (Int) weapon_kind) |
| 461 |
|
| 462 |
(declare-fun user_eq1 (weapon_kind weapon_kind) Bool) |
| 463 |
|
| 464 |
(declare-fun dummy1 () weapon_kind) |
| 465 |
|
| 466 |
;; inversion_axiom |
| 467 |
(assert |
| 468 |
(forall ((x weapon_kind)) |
| 469 |
(! (= (of_rep (to_rep x)) x) :pattern ((to_rep x)) ))) |
| 470 |
|
| 471 |
;; range_axiom |
| 472 |
(assert |
| 473 |
(forall ((x weapon_kind)) (! (in_range2 |
| 474 |
(to_rep x)) :pattern ((to_rep x)) ))) |
| 475 |
|
| 476 |
;; coerce_axiom |
| 477 |
(assert |
| 478 |
(forall ((x Int)) |
| 479 |
(! (=> (in_range2 x) (= (to_rep (of_rep x)) x)) :pattern ((to_rep |
| 480 |
(of_rep x))) ))) |
| 481 |
|
| 482 |
(declare-datatypes ((weapon_kind__ref 0)) |
| 483 |
(((mk_weapon_kind__ref (weapon_kind__content weapon_kind))))) |
| 484 |
(define-fun weapon_kind__ref___projection ((a weapon_kind__ref)) weapon_kind |
| 485 |
(weapon_kind__content a)) |
| 486 |
|
| 487 |
(declare-fun dps (Int) float) |
| 488 |
|
| 489 |
(declare-fun damage (Int) Int) |
| 490 |
|
| 491 |
(declare-fun bullet (Int) Int) |
| 492 |
|
| 493 |
(declare-fun cooldown (Int) Int) |
| 494 |
|
| 495 |
;; dps__post_axiom |
| 496 |
(assert true) |
| 497 |
|
| 498 |
;; dps__def_axiom |
| 499 |
(assert |
| 500 |
(forall ((self Int)) |
| 501 |
(! (=> (in_range2 self) |
| 502 |
(= (to_real1 (dps self)) (round NearestTiesToEven |
| 503 |
(/ (round NearestTiesToEven |
| 504 |
(to_real (damage (bullet self)))) (round |
| 505 |
NearestTiesToEven |
| 506 |
(to_real |
| 507 |
(cooldown |
| 508 |
self))))))) :pattern ( |
| 509 |
(dps self)) ))) |
| 510 |
|
| 511 |
(declare-sort integer 0) |
| 512 |
|
| 513 |
(define-fun in_range3 ((x Int)) Bool (and (<= (- 2147483648) x) |
| 514 |
(<= x 2147483647))) |
| 515 |
|
| 516 |
(define-fun bool_eq1 ((x Int) (y Int)) Bool (ite (= x y) true false)) |
| 517 |
|
| 518 |
(declare-fun attr__ATTRIBUTE_IMAGE3 (Int) us_image) |
| 519 |
|
| 520 |
(declare-fun attr__ATTRIBUTE_VALUE__pre_check3 (us_image) Bool) |
| 521 |
|
| 522 |
(declare-fun attr__ATTRIBUTE_VALUE3 (us_image) Int) |
| 523 |
|
| 524 |
(declare-fun to_rep1 (integer) Int) |
| 525 |
|
| 526 |
(declare-fun of_rep1 (Int) integer) |
| 527 |
|
| 528 |
(declare-fun user_eq2 (integer integer) Bool) |
| 529 |
|
| 530 |
(declare-fun dummy2 () integer) |
| 531 |
|
| 532 |
;; inversion_axiom |
| 533 |
(assert |
| 534 |
(forall ((x integer)) |
| 535 |
(! (= (of_rep1 (to_rep1 x)) x) :pattern ((to_rep1 x)) ))) |
| 536 |
|
| 537 |
;; range_axiom |
| 538 |
(assert |
| 539 |
(forall ((x integer)) (! (in_range3 (to_rep1 x)) :pattern ((to_rep1 x)) ))) |
| 540 |
|
| 541 |
;; coerce_axiom |
| 542 |
(assert |
| 543 |
(forall ((x Int)) |
| 544 |
(! (=> (in_range3 x) (= (to_rep1 (of_rep1 x)) x)) :pattern ((to_rep1 |
| 545 |
(of_rep1 x))) ))) |
| 546 |
|
| 547 |
(declare-datatypes ((integer__ref 0)) |
| 548 |
(((mk_integer__ref (integer__content integer))))) |
| 549 |
(define-fun integer__ref___projection ((a integer__ref)) integer (integer__content |
| 550 |
a)) |
| 551 |
|
| 552 |
(define-fun dynamic_invariant ((temp___expr_15 Int) (temp___is_init_12 Bool) |
| 553 |
(temp___do_constant_13 Bool) |
| 554 |
(temp___do_toplevel_14 Bool)) Bool (=> |
| 555 |
(or (= temp___is_init_12 true) |
| 556 |
(<= (- 2147483648) 2147483647)) |
| 557 |
(in_range3 temp___expr_15))) |
| 558 |
|
| 559 |
(declare-sort bullet_kind 0) |
| 560 |
|
| 561 |
(define-fun in_range4 ((x Int)) Bool (and (<= 0 x) (<= x 4))) |
| 562 |
|
| 563 |
(define-fun bool_eq2 ((x Int) (y Int)) Bool (ite (= x y) true false)) |
| 564 |
|
| 565 |
(declare-fun attr__ATTRIBUTE_IMAGE4 (Int) us_image) |
| 566 |
|
| 567 |
(declare-fun attr__ATTRIBUTE_VALUE__pre_check4 (us_image) Bool) |
| 568 |
|
| 569 |
(declare-fun attr__ATTRIBUTE_VALUE4 (us_image) Int) |
| 570 |
|
| 571 |
(declare-fun to_rep2 (bullet_kind) Int) |
| 572 |
|
| 573 |
(declare-fun of_rep2 (Int) bullet_kind) |
| 574 |
|
| 575 |
(declare-fun user_eq3 (bullet_kind bullet_kind) Bool) |
| 576 |
|
| 577 |
(declare-fun dummy3 () bullet_kind) |
| 578 |
|
| 579 |
;; inversion_axiom |
| 580 |
(assert |
| 581 |
(forall ((x bullet_kind)) |
| 582 |
(! (= (of_rep2 (to_rep2 x)) x) :pattern ((to_rep2 x)) ))) |
| 583 |
|
| 584 |
;; range_axiom |
| 585 |
(assert |
| 586 |
(forall ((x bullet_kind)) (! (in_range4 |
| 587 |
(to_rep2 x)) :pattern ((to_rep2 x)) ))) |
| 588 |
|
| 589 |
;; coerce_axiom |
| 590 |
(assert |
| 591 |
(forall ((x Int)) |
| 592 |
(! (=> (in_range4 x) (= (to_rep2 (of_rep2 x)) x)) :pattern ((to_rep2 |
| 593 |
(of_rep2 x))) ))) |
| 594 |
|
| 595 |
(declare-datatypes ((bullet_kind__ref 0)) |
| 596 |
(((mk_bullet_kind__ref (bullet_kind__content bullet_kind))))) |
| 597 |
(define-fun bullet_kind__ref___projection ((a bullet_kind__ref)) bullet_kind |
| 598 |
(bullet_kind__content a)) |
| 599 |
|
| 600 |
(define-fun dynamic_invariant1 ((temp___expr_180 Int) |
| 601 |
(temp___is_init_177 Bool) (temp___do_constant_178 Bool) |
| 602 |
(temp___do_toplevel_179 Bool)) Bool (=> |
| 603 |
(or (= temp___is_init_177 true) |
| 604 |
(<= 0 4)) (in_range4 temp___expr_180))) |
| 605 |
|
| 606 |
;; damage__post_axiom |
| 607 |
(assert |
| 608 |
(forall ((self Int)) |
| 609 |
(! (=> (in_range4 self) (dynamic_invariant (damage self) true false true)) :pattern ( |
| 610 |
(damage self)) ))) |
| 611 |
|
| 612 |
;; damage__def_axiom |
| 613 |
(assert |
| 614 |
(forall ((self Int)) |
| 615 |
(! (=> (in_range4 self) |
| 616 |
(= (damage self) (ite (= self 0) 0 |
| 617 |
(ite (= self 1) 1 |
| 618 |
(ite (= self 2) 8 (ite (= self 3) 10 1)))))) :pattern ( |
| 619 |
(damage self)) ))) |
| 620 |
|
| 621 |
(define-fun dynamic_invariant2 ((temp___expr_186 Int) |
| 622 |
(temp___is_init_183 Bool) (temp___do_constant_184 Bool) |
| 623 |
(temp___do_toplevel_185 Bool)) Bool (=> |
| 624 |
(or (= temp___is_init_183 true) |
| 625 |
(<= 0 2)) (in_range2 temp___expr_186))) |
| 626 |
|
| 627 |
;; bullet__post_axiom |
| 628 |
(assert |
| 629 |
(forall ((self Int)) |
| 630 |
(! (=> (in_range2 self) (dynamic_invariant1 (bullet self) true false true)) :pattern ( |
| 631 |
(bullet self)) ))) |
| 632 |
|
| 633 |
;; bullet__def_axiom |
| 634 |
(assert |
| 635 |
(forall ((self Int)) |
| 636 |
(! (=> (in_range2 self) |
| 637 |
(= (bullet self) (ite (= self 0) 1 (ite (= self 1) 1 2)))) :pattern ( |
| 638 |
(bullet self)) ))) |
| 639 |
|
| 640 |
;; cooldown__post_axiom |
| 641 |
(assert |
| 642 |
(forall ((self Int)) |
| 643 |
(! (=> (in_range2 self) (dynamic_invariant (cooldown self) true false |
| 644 |
true)) :pattern ((cooldown self)) ))) |
| 645 |
|
| 646 |
;; cooldown__def_axiom |
| 647 |
(assert |
| 648 |
(forall ((self Int)) |
| 649 |
(! (=> (in_range2 self) |
| 650 |
(= (cooldown self) (ite (= self 0) 4 (ite (= self 1) 1 8)))) :pattern ( |
| 651 |
(cooldown self)) ))) |
| 652 |
|
| 653 |
(assert |
| 654 |
;; WP_parameter_def |
| 655 |
;; File "weapons.ads", line 34, characters 0-0 |
| 656 |
(not |
| 657 |
(forall ((w Int)) |
| 658 |
(=> (and (<= 0 w) (<= w 2)) |
| 659 |
(or (= w 2) (<= (to_real1 (dps w)) (to_real1 (dps (+ w 1))))))))) |
| 660 |
(check-sat) |
| 661 |
(get-info :reason-unknown) |