|
| 1 | +CORE dfcc-only |
| 2 | +main.c |
| 3 | +--dfcc main --enforce-contract foo |
| 4 | +^\[foo.assertion.\d+\] line 15 assertion 0: FAILURE$ |
| 5 | +^\[foo.assertion.\d+\] line 16 assertion __CPROVER_POINTER_OBJECT\(\(.*\)a\) == __CPROVER_POINTER_OBJECT\(\(.*\)x\): SUCCESS$ |
| 6 | +^\[foo.assigns.\d+\] line 17 Check that \*x is assignable: SUCCESS$ |
| 7 | +^\[foo.pointer_dereference.\d+\] line 17 dereference failure: pointer NULL in \*x: SUCCESS$ |
| 8 | +^\[foo.pointer_dereference.\d+\] line 17 dereference failure: pointer invalid in \*x: SUCCESS$ |
| 9 | +^\[foo.pointer_dereference.\d+\] line 17 dereference failure: deallocated dynamic object in \*x: SUCCESS$ |
| 10 | +^\[foo.pointer_dereference.\d+\] line 17 dereference failure: dead object in \*x: SUCCESS$ |
| 11 | +^\[foo.pointer_dereference.\d+\] line 17 dereference failure: pointer outside object bounds in \*x: SUCCESS$ |
| 12 | +^\[foo.pointer_dereference.\d+\] line 17 dereference failure: invalid integer address in \*x: SUCCESS$ |
| 13 | +^\[foo.assertion.\d+\] line 21 assertion 0: FAILURE$ |
| 14 | +^\[foo.assertion.\d+\] line 22 assertion x == \(\(.*\)NULL\): SUCCESS$ |
| 15 | +^\[foo.assertion.\d+\] line 23 assertion __CPROVER_POINTER_OBJECT\(\(.*\)a\) == __CPROVER_POINTER_OBJECT\(\(.*\)y\): SUCCESS$ |
| 16 | +^\[foo.assigns.\d+\] line 24 Check that \*y is assignable: SUCCESS$ |
| 17 | +^\[foo.pointer_dereference.\d+\] line 24 dereference failure: pointer NULL in \*y: SUCCESS$ |
| 18 | +^\[foo.pointer_dereference.\d+\] line 24 dereference failure: pointer invalid in \*y: SUCCESS$ |
| 19 | +^\[foo.pointer_dereference.\d+\] line 24 dereference failure: deallocated dynamic object in \*y: SUCCESS$ |
| 20 | +^\[foo.pointer_dereference.\d+\] line 24 dereference failure: dead object in \*y: SUCCESS$ |
| 21 | +^\[foo.pointer_dereference.\d+\] line 24 dereference failure: pointer outside object bounds in \*y: SUCCESS$ |
| 22 | +^\[foo.pointer_dereference.\d+\] line 24 dereference failure: invalid integer address in \*y: SUCCESS$ |
| 23 | +^EXIT=10$ |
| 24 | +^SIGNAL=0$ |
| 25 | +^VERIFICATION FAILED$ |
| 26 | +-- |
| 27 | +-- |
| 28 | +Illustrates the behaviour of `__CPROVER_pointer_in_range_dfcc` under disjunctions in assume contexts. |
| 29 | +The precondition of `foo` describes a disjunction of cases, either `x` is in range of `a` and `y` is null, |
| 30 | +or `x` is null and `y` is in range of `a`. The function `foo` branches on `y == NULL`. |
| 31 | +The test suceeds if the two `assert(0)` in `foo` are falsifiable, which which shows |
| 32 | +that both cases of the disjunction expressed in the requires clause are reachable. |
0 commit comments