Commit 1d99b30
committed
SMT back-end: fix parsing of Z3 models involving let
Z3 produces models such as
```
((|main::1::arr!0@1#3[[1]]| (let ((a!1 (store (store (store ((as const (Array (_ BitVec 64) (_ BitVec 8)))
#x00)
#x0000000000000003
#x02)
#x0000000000000002
#x01)
#x0000000000000004
#x01)))
(mk-struct.0 #x00 #x00 a!1))))
```
(for cbmc/Array_operations2), which is a `let` around a struct. Our code
previously would only handle these for arrays, and not for arrays within
other compound types. Also, Z3 may use multiple bindings (observable in
the same regression test), which we did not cater for at all.
This commit promotes `let` parsing to the top level, expanding bindings
as needed.1 parent f6cb64a commit 1d99b30
2 files changed
+28
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
537 | 537 | | |
538 | 538 | | |
539 | 539 | | |
540 | | - | |
541 | | - | |
542 | | - | |
543 | | - | |
544 | | - | |
545 | | - | |
546 | | - | |
547 | | - | |
548 | 540 | | |
549 | 541 | | |
550 | 542 | | |
| |||
554 | 546 | | |
555 | 547 | | |
556 | 548 | | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
557 | 555 | | |
558 | 556 | | |
559 | 557 | | |
| |||
633 | 631 | | |
634 | 632 | | |
635 | 633 | | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
636 | 655 | | |
637 | 656 | | |
638 | 657 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
| 190 | + | |
190 | 191 | | |
191 | 192 | | |
192 | 193 | | |
| |||
0 commit comments