Commit 61ea8ed
committed
Avoid crashing when applying trivial contracts
Requires and ensures are currently treated as conjunctions,
thus empty clauses are mapped to true. This commit also
prevents that trivials `assert(true)` are injected into functions.
Signed-off-by: Felipe R. Monteiro <felisous@amazon.com>1 parent 552beee commit 61ea8ed
File tree
5 files changed
+56
-15
lines changed- regression/contracts
- trivial_contract_enforce
- trivial_contract_replace
- src/goto-instrument/contracts
5 files changed
+56
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
491 | 491 | | |
492 | 492 | | |
493 | 493 | | |
494 | | - | |
495 | | - | |
496 | | - | |
497 | | - | |
498 | | - | |
499 | 494 | | |
500 | 495 | | |
501 | 496 | | |
| |||
559 | 554 | | |
560 | 555 | | |
561 | 556 | | |
562 | | - | |
| 557 | + | |
563 | 558 | | |
564 | 559 | | |
565 | 560 | | |
| |||
584 | 579 | | |
585 | 580 | | |
586 | 581 | | |
587 | | - | |
| 582 | + | |
588 | 583 | | |
589 | 584 | | |
590 | 585 | | |
| |||
619 | 614 | | |
620 | 615 | | |
621 | 616 | | |
622 | | - | |
| 617 | + | |
623 | 618 | | |
624 | 619 | | |
625 | 620 | | |
| |||
1072 | 1067 | | |
1073 | 1068 | | |
1074 | 1069 | | |
1075 | | - | |
1076 | | - | |
1077 | | - | |
1078 | | - | |
1079 | | - | |
1080 | 1070 | | |
1081 | 1071 | | |
1082 | 1072 | | |
| |||
1148 | 1138 | | |
1149 | 1139 | | |
1150 | 1140 | | |
1151 | | - | |
| 1141 | + | |
1152 | 1142 | | |
1153 | 1143 | | |
1154 | 1144 | | |
| |||
1168 | 1158 | | |
1169 | 1159 | | |
1170 | 1160 | | |
1171 | | - | |
| 1161 | + | |
1172 | 1162 | | |
1173 | 1163 | | |
1174 | 1164 | | |
| |||
0 commit comments