Debian Codegraph @

test/regress/cli/regress1/quantifiers/bug_743.smt2

raw
1 ; COMMAND-LINE: --lang=smt2.6
2 ; EXPECT: unsat
3
4
5 ;; produced by cvc4_14.drv ;;
6 (set-logic AUFBVDTNIRA)
7 (set-info :source |VC generated by SPARK 2014|)
8 (set-info :smt-lib-version 2.6)
9 (set-info :category industrial)
10 (set-info :status unsat)
11 ;;; generated by SMT-LIB2 driver
12 ;;; SMT-LIB2 driver: bit-vectors, common part
13 ;;; SMT-LIB2: integer arithmetic
14 (declare-datatypes ((tuple0 0)) (((Tuple0))))
15 (declare-sort us_private 0)
16
17 (declare-fun us_null_ext__ () us_private)
18
19 (declare-sort us_type_of_heap 0)
20
21 (declare-datatypes ((us_type_of_heap__ref 0))
22 (((mk___type_of_heap__ref (us_type_of_heap__content us_type_of_heap)))))
23 (declare-sort us_image 0)
24
25 (declare-datatypes ((int__ref 0)) (((mk_int__ref (int__content Int)))))
26 (declare-datatypes ((bool__ref 0)) (((mk_bool__ref (bool__content Bool)))))
27 (declare-datatypes ((real__ref 0)) (((mk_real__ref (real__content Real)))))
28 (declare-datatypes ((us_private__ref 0))
29 (((mk___private__ref (us_private__content us_private)))))
30 (define-fun int__ref___projection ((a int__ref)) Int (int__content a))
31
32 (define-fun bool__ref___projection ((a bool__ref)) Bool (bool__content a))
33
34 (define-fun real__ref___projection ((a real__ref)) Real (real__content a))
35
36 (define-fun us_private__ref___projection ((a us_private__ref)) us_private
37 (us_private__content a))
38
39 (declare-fun us_compatible_tags (Int Int) Bool)
40
41 ;; __compatible_tags_refl
42 (assert (forall ((tag Int)) (us_compatible_tags tag tag)))
43
44 (define-fun to_int1 ((b Bool)) Int (ite (= b true) 1 0))
45
46 (define-fun of_int ((i Int)) Bool (ite (= i 0) false true))
47
48 (define-fun in_range ((x Int)) Bool (or (= x 0) (= x 1)))
49
50 (declare-fun attr__ATTRIBUTE_IMAGE (Bool) us_image)
51
52 (declare-fun attr__ATTRIBUTE_VALUE__pre_check (us_image) Bool)
53
54 (declare-fun attr__ATTRIBUTE_VALUE (us_image) Bool)
55
56 (declare-sort integer 0)
57
58 (define-fun in_range1 ((x Int)) Bool (and (<= (- 2147483648) x)
59 (<= x 2147483647)))
60
61 (define-fun bool_eq ((x Int) (y Int)) Bool (ite (= x y) true false))
62
63 (declare-fun attr__ATTRIBUTE_IMAGE1 (Int) us_image)
64
65 (declare-fun attr__ATTRIBUTE_VALUE__pre_check1 (us_image) Bool)
66
67 (declare-fun attr__ATTRIBUTE_VALUE1 (us_image) Int)
68
69 (declare-fun to_rep (integer) Int)
70
71 (declare-fun of_rep (Int) integer)
72
73 (declare-fun user_eq (integer integer) Bool)
74
75 (declare-fun dummy () integer)
76
77 ;; inversion_axiom
78 (assert
79 (forall ((x integer)) (! (= (of_rep (to_rep x)) x) :pattern ((to_rep x))
80 )))
81
82 ;; range_axiom
83 (assert
84 (forall ((x integer)) (! (in_range1 (to_rep x)) :pattern ((to_rep x))
85 )))
86
87 ;; coerce_axiom
88 (assert
89 (forall ((x Int))
90 (! (=> (in_range1 x) (= (to_rep (of_rep x)) x)) :pattern ((to_rep
91 (of_rep x)))
92 )))
93
94 (declare-datatypes ((integer__ref 0))
95 (((mk_integer__ref (integer__content integer)))))
96 (define-fun integer__ref___projection ((a integer__ref)) integer
97 (integer__content
98 a))
99
100 (declare-sort natural 0)
101
102 (define-fun in_range2 ((x Int)) Bool (and (<= 0 x) (<= x 2147483647)))
103
104 (define-fun bool_eq1 ((x Int) (y Int)) Bool (ite (= x y) true false))
105
106 (declare-fun attr__ATTRIBUTE_IMAGE2 (Int) us_image)
107
108 (declare-fun attr__ATTRIBUTE_VALUE__pre_check2 (us_image) Bool)
109
110 (declare-fun attr__ATTRIBUTE_VALUE2 (us_image) Int)
111
112 (declare-fun to_rep1 (natural) Int)
113
114 (declare-fun of_rep1 (Int) natural)
115
116 (declare-fun user_eq1 (natural natural) Bool)
117
118 (declare-fun dummy1 () natural)
119
120 ;; inversion_axiom
121 (assert
122 (forall ((x natural))
123 (! (= (of_rep1 (to_rep1 x)) x) :pattern ((to_rep1 x)) )))
124
125 ;; range_axiom
126 (assert
127 (forall ((x natural)) (! (in_range2 (to_rep1 x)) :pattern ((to_rep1 x))
128 )))
129
130 ;; coerce_axiom
131 (assert
132 (forall ((x Int))
133 (! (=> (in_range2 x) (= (to_rep1 (of_rep1 x)) x)) :pattern ((to_rep1
134 (of_rep1
135 x))) )))
136
137 (declare-datatypes ((natural__ref 0))
138 (((mk_natural__ref (natural__content natural)))))
139 (define-fun natural__ref___projection ((a natural__ref)) natural
140 (natural__content
141 a))
142
143 (define-fun dynamic_invariant ((temp___expr_33 Int) (temp___is_init_30
144 Bool)
145 (temp___do_constant_31 Bool)
146 (temp___do_toplevel_32 Bool)) Bool (=>
147 (or (= temp___is_init_30 true)
148 (<= 0 2147483647)) (in_range2
149 temp___expr_33)))
150
151 (declare-sort index 0)
152
153 (define-fun in_range3 ((x Int)) Bool (and (<= 1 x) (<= x 100)))
154
155 (define-fun bool_eq2 ((x Int) (y Int)) Bool (ite (= x y) true false))
156
157 (declare-fun attr__ATTRIBUTE_IMAGE3 (Int) us_image)
158
159 (declare-fun attr__ATTRIBUTE_VALUE__pre_check3 (us_image) Bool)
160
161 (declare-fun attr__ATTRIBUTE_VALUE3 (us_image) Int)
162
163 (declare-fun to_rep2 (index) Int)
164
165 (declare-fun of_rep2 (Int) index)
166
167 (declare-fun user_eq2 (index index) Bool)
168
169 (declare-fun dummy2 () index)
170
171 ;; inversion_axiom
172 (assert
173 (forall ((x index))
174 (! (= (of_rep2 (to_rep2 x)) x) :pattern ((to_rep2 x)) )))
175
176 ;; range_axiom
177 (assert
178 (forall ((x index)) (! (in_range3 (to_rep2 x)) :pattern ((to_rep2 x))
179 )))
180
181 ;; coerce_axiom
182 (assert
183 (forall ((x Int))
184 (! (=> (in_range3 x) (= (to_rep2 (of_rep2 x)) x)) :pattern ((to_rep2
185 (of_rep2
186 x))) )))
187
188 (declare-datatypes ((index__ref 0)) (((mk_index__ref (index__content
189 index)))))
190 (define-fun index__ref___projection ((a index__ref)) index (index__content
191 a))
192
193 (define-fun dynamic_invariant1 ((temp___expr_144 Int)
194 (temp___is_init_141 Bool) (temp___do_constant_142 Bool)
195 (temp___do_toplevel_143 Bool)) Bool (=>
196 (or (= temp___is_init_141 true)
197 (<= 1 100)) (in_range3
198 temp___expr_144)))
199
200 (declare-datatypes ((map__ref 0))
201 (((mk_map__ref (map__content (Array Int natural))))))
202 (declare-fun bool_eq3 ((Array Int natural) Int Int (Array Int natural) Int
203 Int) Bool)
204
205 ;; T__ada_array___equal_def
206 (assert
207 (forall ((a (Array Int natural)))
208 (forall ((af Int))
209 (forall ((al Int))
210 (forall ((b (Array Int natural)))
211 (forall ((bf Int))
212 (forall ((bl Int))
213 (! (=
214 (and (ite (<= af al) (= (+ (- al af) 1) (+ (- bl bf) 1)) (< bl bf))
215 (forall ((i Int))
216 (! (=> (and (<= af i) (<= i al))
217 (= (select a i) (select b (+ (- bf af) i)))) :pattern ((select a
218 i)) )))
219 (= (bool_eq3 a af al b bf bl) true)) :pattern ((bool_eq3 a af al b bf
220 bl)) ))))))))
221
222 (declare-fun slide ((Array Int natural) Int Int) (Array Int natural))
223
224 ;; slide_eq
225 (assert
226 (forall ((a (Array Int natural)))
227 (forall ((first Int))
228 (! (= (slide a first first) a) :pattern ((slide a first first)) ))))
229
230 ;; slide_def
231 (assert
232 (forall ((a (Array Int natural)))
233 (forall ((old_first Int))
234 (forall ((new_first Int))
235 (forall ((i Int))
236 (! (= (select (slide a old_first new_first) i) (select a (- i (-
237 new_first old_first)))) :pattern ((select
238 (slide a old_first new_first) i)) ))))))
239
240 (declare-fun concat1 ((Array Int natural) Int Int (Array Int natural) Int
241 Int) (Array Int natural))
242
243 ;; concat_def
244 (assert
245 (forall ((a (Array Int natural)) (b (Array Int natural)))
246 (forall ((a_first Int) (a_last Int) (b_first Int) (b_last Int))
247 (forall ((i Int))
248 (! (and
249 (=> (and (<= a_first i) (<= i a_last))
250 (= (select (concat1 a a_first a_last b b_first b_last) i) (select a
251 i)))
252 (=> (< a_last i)
253 (= (select (concat1 a a_first a_last b b_first b_last) i) (select b
254 (+ (- i a_last) (- b_first 1)))))) :pattern ((select
255 (concat1 a a_first a_last b b_first b_last) i)) )))))
256
257 (declare-fun set.singleton (natural Int) (Array Int natural))
258
259 ;; singleton_def
260 (assert
261 (forall ((v natural))
262 (forall ((i Int))
263 (! (= (select (set.singleton v i) i) v) :pattern ((select (set.singleton v i)
264 i)) ))))
265
266 (declare-fun compare ((Array Int natural) Int Int (Array Int natural) Int
267 Int) Int)
268
269 ;; compare_def
270 (assert
271 (forall ((a (Array Int natural)) (b (Array Int natural)))
272 (forall ((a_first Int) (a_last Int) (b_first Int) (b_last Int))
273 (! (and
274 (= (= (compare a a_first a_last b b_first b_last) 0)
275 (= (bool_eq3 a a_first a_last b b_first b_last) true))
276 (and
277 (= (< (compare a a_first a_last b b_first b_last) 0)
278 (exists ((i Int) (j Int))
279 (and (<= i a_last)
280 (and (< j b_last)
281 (and (= (bool_eq3 a a_first i b b_first j) true)
282 (or (= i a_last)
283 (and (< i a_last)
284 (< (to_rep1 (select a (+ i 1))) (to_rep1 (select b (+ j 1)))))))))))
285 (= (< 0 (compare a a_first a_last b b_first b_last))
286 (exists ((i Int) (j Int))
287 (and (<= i b_last)
288 (and (< j a_last)
289 (and (= (bool_eq3 a a_first j b b_first i) true)
290 (or (= i b_last)
291 (and (< i b_last)
292 (< (to_rep1 (select b (+ i 1))) (to_rep1 (select a (+ j
293 1))))))))))))) :pattern (
294 (compare a a_first a_last b b_first b_last)) ))))
295
296 (declare-sort t 0)
297
298 (declare-fun first (t) integer)
299
300 (declare-fun last (t) integer)
301
302 (declare-fun mk (Int Int) t)
303
304 ;; mk_def
305 (assert
306 (forall ((f Int) (l Int))
307 (! (=> (in_range1 f)
308 (=> (in_range1 l)
309 (and (= (to_rep (first (mk f l))) f) (= (to_rep (last (mk f l)))
310 l)))) :pattern (
311 (mk f l)) )))
312
313 (define-fun dynamic_property ((range_first Int) (range_last Int) (low Int)
314 (high Int)) Bool (and (in_range1 low)
315 (and (in_range1 high)
316 (=> (<= low high) (and (in_range3 low) (in_range3
317 high))))))
318
319 (declare-datatypes ((us_t 0)) (((mk___t (elts (Array Int natural)) (rt t)))))
320 (define-fun to_array ((a us_t)) (Array Int natural) (elts a))
321
322 (define-fun of_array ((a (Array Int natural)) (f Int)
323 (l Int)) us_t (mk___t a (mk f l)))
324
325 (define-fun first1 ((a us_t)) Int (to_rep (first (rt a))))
326
327 (define-fun last1 ((a us_t)) Int (to_rep (last (rt a))))
328
329 (define-fun length ((a us_t)) Int (ite (<= (first1 a) (last1 a))
330 (+ (- (last1 a) (first1 a)) 1) 0))
331
332 (declare-fun value__size () Int)
333
334 (declare-fun object__size ((Array Int natural)) Int)
335
336 (declare-fun value__component__size () Int)
337
338 (declare-fun object__component__size ((Array Int natural)) Int)
339
340 (declare-fun value__alignment () Int)
341
342 (declare-fun object__alignment ((Array Int natural)) Int)
343
344 ;; value__size_axiom
345 (assert (<= 0 value__size))
346
347 ;; object__size_axiom
348 (assert (forall ((a (Array Int natural))) (<= 0 (object__size a))))
349
350 ;; value__component__size_axiom
351 (assert (<= 0 value__component__size))
352
353 ;; object__component__size_axiom
354 (assert
355 (forall ((a (Array Int natural))) (<= 0 (object__component__size a))))
356
357 ;; value__alignment_axiom
358 (assert (<= 0 value__alignment))
359
360 ;; object__alignment_axiom
361 (assert (forall ((a (Array Int natural))) (<= 0 (object__alignment a))))
362
363 (define-fun bool_eq4 ((x us_t)
364 (y us_t)) Bool (bool_eq3 (elts x) (to_rep (first (rt x)))
365 (to_rep (last (rt x))) (elts y) (to_rep (first (rt y)))
366 (to_rep (last (rt y)))))
367
368 (declare-fun user_eq3 (us_t us_t) Bool)
369
370 (declare-fun dummy3 () us_t)
371
372 (declare-datatypes ((nat_array__ref 0))
373 (((mk_nat_array__ref (nat_array__content us_t)))))
374 (define-fun nat_array__ref___projection ((a nat_array__ref)) us_t
375 (nat_array__content
376 a))
377
378 (define-fun dynamic_invariant2 ((temp___expr_150 us_t)
379 (temp___is_init_147 Bool) (temp___do_constant_148 Bool)
380 (temp___do_toplevel_149 Bool)) Bool (=>
381 (not (= temp___do_constant_148
382 true))
383 (dynamic_property 1 100
384 (first1 temp___expr_150)
385 (last1 temp___expr_150))))
386
387 (declare-fun remove_last (us_t) us_t)
388
389 (declare-fun first2 () Int)
390
391 (declare-fun last2 () Int)
392
393 (define-fun dynamic_property1 ((first_int Int) (last_int Int)
394 (x Int)) Bool (and (<= first_int x) (<= x last_int)))
395
396 (define-fun bool_eq5 ((x Int) (y Int)) Bool (ite (= x y) true false))
397
398 (declare-fun attr__ATTRIBUTE_IMAGE4 (Int) us_image)
399
400 (declare-fun attr__ATTRIBUTE_VALUE__pre_check4 (us_image) Bool)
401
402 (declare-fun attr__ATTRIBUTE_VALUE4 (us_image) Int)
403
404 (declare-fun user_eq4 (integer integer) Bool)
405
406 (declare-fun dummy4 () integer)
407
408 (declare-datatypes ((t15s__ref 0)) (((mk_t15s__ref (t15s__content
409 integer)))))
410 (define-fun t15s__ref___projection ((a t15s__ref)) integer (t15s__content
411 a))
412
413 (declare-sort t1 0)
414
415 (declare-fun first3 (t1) integer)
416
417 (declare-fun last3 (t1) integer)
418
419 (declare-fun mk1 (Int Int) t1)
420
421 ;; mk_def
422 (assert
423 (forall ((f Int) (l Int))
424 (! (=> (in_range1 f)
425 (=> (in_range1 l)
426 (and (= (to_rep (first3 (mk1 f l))) f) (= (to_rep (last3 (mk1 f l)))
427 l)))) :pattern (
428 (mk1 f l)) )))
429
430 (define-fun dynamic_property2 ((range_first Int) (range_last Int) (low
431 Int)
432 (high Int)) Bool (and (in_range1 low)
433 (and (in_range1 high)
434 (=> (<= low high)
435 (and (dynamic_property1 range_first range_last low)
436 (dynamic_property1 range_first range_last high))))))
437
438 (declare-datatypes ((us_t1 0))
439 (((mk___t1 (elts1 (Array Int natural)) (rt1 t1)))))
440 (define-fun to_array1 ((a us_t1)) (Array Int natural) (elts1 a))
441
442 (define-fun of_array1 ((a (Array Int natural)) (f Int)
443 (l Int)) us_t1 (mk___t1 a (mk1 f l)))
444
445 (define-fun first4 ((a us_t1)) Int (to_rep (first3 (rt1 a))))
446
447 (define-fun last4 ((a us_t1)) Int (to_rep (last3 (rt1 a))))
448
449 (define-fun length1 ((a us_t1)) Int (ite (<= (first4 a) (last4 a))
450 (+ (- (last4 a) (first4 a)) 1) 0))
451
452 (declare-fun value__size1 () Int)
453
454 (declare-fun object__size1 ((Array Int natural)) Int)
455
456 (declare-fun value__component__size1 () Int)
457
458 (declare-fun object__component__size1 ((Array Int natural)) Int)
459
460 (declare-fun value__alignment1 () Int)
461
462 (declare-fun object__alignment1 ((Array Int natural)) Int)
463
464 ;; value__size_axiom
465 (assert (<= 0 value__size1))
466
467 ;; object__size_axiom
468 (assert (forall ((a (Array Int natural))) (<= 0 (object__size1 a))))
469
470 ;; value__component__size_axiom
471 (assert (<= 0 value__component__size1))
472
473 ;; object__component__size_axiom
474 (assert
475 (forall ((a (Array Int natural))) (<= 0 (object__component__size1 a))))
476
477 ;; value__alignment_axiom
478 (assert (<= 0 value__alignment1))
479
480 ;; object__alignment_axiom
481 (assert (forall ((a (Array Int natural))) (<= 0 (object__alignment1
482 a))))
483
484 (define-fun bool_eq6 ((x us_t1)
485 (y us_t1)) Bool (bool_eq3 (elts1 x) (to_rep (first3 (rt1 x)))
486 (to_rep (last3 (rt1 x))) (elts1 y)
487 (to_rep (first3 (rt1 y))) (to_rep (last3 (rt1 y)))))
488
489 (declare-fun user_eq5 (us_t1 us_t1) Bool)
490
491 (declare-fun dummy5 () us_t1)
492
493 (declare-datatypes ((t16s__ref 0)) (((mk_t16s__ref (t16s__content us_t1)))))
494 (define-fun t16s__ref___projection ((a t16s__ref)) us_t1 (t16s__content
495 a))
496
497 ;; remove_last__post_axiom
498 (assert
499 (forall ((a us_t))
500 (! (=> (and (dynamic_invariant2 a true true true) (< 0 (length a)))
501 (dynamic_invariant2 (remove_last a) true false true)) :pattern (
502 (remove_last a)) )))
503
504 ;; remove_last__def_axiom
505 (assert
506 (forall ((a us_t))
507 (! (=> (dynamic_invariant2 a true true true)
508 (= (remove_last a) (let ((temp___163 (let ((temp___162 (- (last1 a)
509 1)))
510 (let ((temp___161 (first1 a)))
511 (of_array1 (to_array a)
512 temp___161
513 temp___162)))))
514 (of_array (to_array1 temp___163) (first4
515 temp___163)
516 (last4 temp___163))))) :pattern ((remove_last a))
517 )))
518
519 (declare-fun occ (us_t Int) Int)
520
521 (declare-sort nb_occ 0)
522
523 (define-fun in_range4 ((x Int)) Bool (and (<= 0 x) (<= x 100)))
524
525 (define-fun bool_eq7 ((x Int) (y Int)) Bool (ite (= x y) true false))
526
527 (declare-fun attr__ATTRIBUTE_IMAGE5 (Int) us_image)
528
529 (declare-fun attr__ATTRIBUTE_VALUE__pre_check5 (us_image) Bool)
530
531 (declare-fun attr__ATTRIBUTE_VALUE5 (us_image) Int)
532
533 (declare-fun to_rep3 (nb_occ) Int)
534
535 (declare-fun of_rep3 (Int) nb_occ)
536
537 (declare-fun user_eq6 (nb_occ nb_occ) Bool)
538
539 (declare-fun dummy6 () nb_occ)
540
541 ;; inversion_axiom
542 (assert
543 (forall ((x nb_occ))
544 (! (= (of_rep3 (to_rep3 x)) x) :pattern ((to_rep3 x)) )))
545
546 ;; range_axiom
547 (assert
548 (forall ((x nb_occ)) (! (in_range4 (to_rep3 x)) :pattern ((to_rep3 x))
549 )))
550
551 ;; coerce_axiom
552 (assert
553 (forall ((x Int))
554 (! (=> (in_range4 x) (= (to_rep3 (of_rep3 x)) x)) :pattern ((to_rep3
555 (of_rep3
556 x))) )))
557
558 (declare-datatypes ((nb_occ__ref 0))
559 (((mk_nb_occ__ref (nb_occ__content nb_occ)))))
560 (define-fun nb_occ__ref___projection ((a nb_occ__ref)) nb_occ
561 (nb_occ__content
562 a))
563
564 (define-fun dynamic_invariant3 ((temp___expr_155 Int)
565 (temp___is_init_152 Bool) (temp___do_constant_153 Bool)
566 (temp___do_toplevel_154 Bool)) Bool (=>
567 (or (= temp___is_init_152 true)
568 (<= 0 100)) (in_range4
569 temp___expr_155)))
570
571 (declare-fun occ_def (us_t Int) Int)
572
573 ;; occ__post_axiom
574 (assert
575 (forall ((a us_t))
576 (forall ((e Int))
577 (! (=> (and (dynamic_invariant2 a true true true) (in_range2 e))
578 (let ((result (occ a e)))
579 (and (<= result (length a)) (dynamic_invariant3 result true false
580 true)))) :pattern (
581 (occ a e)) ))))
582
583 ;; occ__def_axiom
584 (assert
585 (forall ((a us_t))
586 (forall ((e Int))
587 (! (=> (and (dynamic_invariant2 a true true true) (in_range2 e))
588 (= (occ a e) (occ_def a e))) :pattern ((occ a e)) ))))
589
590 (declare-fun is_set (us_t Int Int us_t) Bool)
591
592 ;; is_set__def_axiom
593 (assert
594 (forall ((a us_t) (r us_t))
595 (forall ((i Int) (v Int))
596 (! (= (= (is_set a i v r) true)
597 (and
598 (and (and (= (first1 r) (first1 a)) (= (last1 r) (last1 a)))
599 (= (to_rep1 (select (to_array r) i)) v))
600 (forall ((j Int))
601 (=> (and (<= (first1 a) j) (<= j (last1 a)))
602 (=> (not (= i j))
603 (= (to_rep1 (select (to_array r) j)) (to_rep1 (select (to_array a)
604 j)))))))) :pattern (
605 (is_set a i v r)) ))))
606
607 (declare-fun a () us_t)
608
609 (declare-fun attr__ATTRIBUTE_ADDRESS () Int)
610
611 (declare-fun i () Int)
612
613 (declare-fun attr__ATTRIBUTE_ADDRESS1 () Int)
614
615 (declare-fun v () Int)
616
617 (declare-fun attr__ATTRIBUTE_ADDRESS2 () Int)
618
619 (declare-fun e () Int)
620
621 (declare-fun attr__ATTRIBUTE_ADDRESS3 () Int)
622
623 (declare-fun r () us_t)
624
625 (declare-fun attr__ATTRIBUTE_ADDRESS4 () Int)
626
627 (declare-fun b__first () integer)
628
629 (declare-fun b__last () integer)
630
631 (declare-fun attr__ATTRIBUTE_ADDRESS5 () Int)
632
633 (define-fun dynamic_invariant4 ((temp___expr_15 Int) (temp___is_init_12
634 Bool)
635 (temp___do_constant_13 Bool)
636 (temp___do_toplevel_14 Bool)) Bool (=>
637 (or (= temp___is_init_12 true)
638 (<= (- 2147483648) 2147483647))
639 (in_range1 temp___expr_15)))
640
641 ;; occ_def__def_axiom
642 (assert
643 (forall ((a1 us_t))
644 (forall ((e1 Int))
645 (! (=> (and (dynamic_invariant2 a1 true true true) (in_range2 e1))
646 (= (occ_def a1 e1) (ite (= (length a1) 0) 0
647 (ite (= (to_rep1 (select (to_array a1) (last1
648 a1))) e1)
649 (+ (occ_def (remove_last a1) e1) 1)
650 (occ_def (remove_last a1) e1))))) :pattern
651 ((occ_def
652 a1
653 e1)) ))))
654
655 (declare-fun b () (Array Int natural))
656
657 (declare-fun perm__occ_set__b__assume () (Array Int natural))
658
659 (declare-fun perm__occ_set__b__assume1 () t)
660
661 (declare-fun o () natural)
662
663 (declare-fun o1 () Int)
664
665 (declare-fun o2 () (Array Int natural))
666
667 (declare-fun o3 () (Array Int natural))
668
669 (declare-fun o4 () t)
670
671 (declare-fun result () (Array Int natural))
672
673 (declare-fun b1 () (Array Int natural))
674
675 (declare-fun result1 () (Array Int natural))
676
677 (declare-fun b2 () (Array Int natural))
678
679 (define-fun o5 () us_t (mk___t o3 o4))
680
681 (define-fun perm__occ_set__b__assume2 () us_t (mk___t
682 perm__occ_set__b__assume
683 perm__occ_set__b__assume1))
684
685 ;; H
686 (assert (dynamic_invariant2 a true false true))
687
688 ;; H
689 (assert (in_range3 i))
690
691 ;; H
692 (assert (in_range2 v))
693
694 ;; H
695 (assert (in_range2 e))
696
697 ;; H
698 (assert (dynamic_invariant2 r true false true))
699
700 ;; H
701 (assert
702 (and (and (<= (to_rep (first (rt a))) i) (<= i (to_rep (last (rt a)))))
703 (= (is_set a i v r) true)))
704
705 ;; H
706 (assert
707 (and (= perm__occ_set__b__assume2 (remove_last a))
708 (and (dynamic_invariant2 perm__occ_set__b__assume2 true false true)
709 (and (= (elts a) perm__occ_set__b__assume)
710 (= (mk
711 (to_rep
712 (first3 (mk1 (to_rep (first (rt a))) (- (to_rep (last (rt a))) 1))))
713 (to_rep
714 (last3 (mk1 (to_rep (first (rt a))) (- (to_rep (last (rt a))) 1)))))
715 perm__occ_set__b__assume1)))))
716
717 ;; H
718 (assert (= (mk_map__ref result) (mk_map__ref b)))
719
720 ;; H
721 (assert (= b1 perm__occ_set__b__assume))
722
723 ;; H
724 (assert (= (to_rep b__first) (to_rep (first
725 perm__occ_set__b__assume1))))
726
727 ;; H
728 (assert (= (to_rep b__last) (to_rep (last perm__occ_set__b__assume1))))
729
730 ;; H
731 (assert (dynamic_property 1 100 (to_rep b__first) (to_rep b__last)))
732
733 ;; H
734 (assert (not (= (length a) 0)))
735
736 ;; H
737 (assert (not (= i (to_rep (last (rt a))))))
738
739 ;; H
740 (assert (= (to_rep1 o) v))
741
742 ;; H
743 (assert (and (<= (to_rep b__first) i) (<= i (to_rep b__last))))
744
745 ;; H
746 (assert (= o1 i))
747
748 ;; H
749 (assert (= o2 (store b1 o1 o)))
750
751 ;; H
752 (assert (= b1 result1))
753
754 ;; H
755 (assert (= b2 o2))
756
757 ;; H
758 (assert
759 (and (= o5 (remove_last r))
760 (and (dynamic_invariant2 o5 true false true)
761 (and (= (elts r) o3)
762 (= (mk
763 (to_rep
764 (first3 (mk1 (to_rep (first (rt r))) (- (to_rep (last (rt r))) 1))))
765 (to_rep
766 (last3 (mk1 (to_rep (first (rt r))) (- (to_rep (last (rt r))) 1)))))
767 o4)))))
768
769 (assert
770 ;; WP_parameter_def
771 ;; File "perm.ads", line 21, characters 0-0
772 (not
773 (= (bool_eq3 o3 (to_rep (first o4)) (to_rep (last o4)) b2
774 (to_rep (first (mk (to_rep b__first) (to_rep b__last))))
775 (to_rep (last (mk (to_rep b__first) (to_rep b__last))))) true)))
776 (check-sat)