Skip to content

Commit d666534

Browse files
author
Daniel Kroening
authored
Merge pull request #3539 from edstenson/review_modeling_pointers
Updated language use in modeling-pointers.md
2 parents a3f8e59 + e0db272 commit d666534

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

doc/cprover-manual/modeling-pointers.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ within the object.
1919
In C, objects are simply continuous fragments of memory (this definition
2020
of "object" is not to be confused with the use of the term in
2121
object-oriented programming). Variables of any type are guaranteed to be
22-
stored as one object, irrespectively of their type. As an example, all
22+
stored as one object, irrespective of their type. As an example, all
2323
members of a struct or array belong to the same object. CPROVER simply
2424
assigns a number to each active object. The object number of a pointer
2525
`p` can be extracted using the expression `__CPROVER_POINTER_OBJECT(p)`.
@@ -28,7 +28,7 @@ which is not sound.
2828

2929
The offset (the second member of the pair that forms a pointer) is
3030
relative to the beginning of the object; it uses byte granularity. As an
31-
example, the code fragment
31+
example, the code fragment:
3232

3333
```C
3434
unsigned array[10];
@@ -51,14 +51,14 @@ dynamically allocated objects have not yet been deallocated.
5151

5252
Furthermore, the CPROVER tools check that dynamically allocated memory
5353
is not deallocated twice. The goto-instrument tool is also able to add
54-
checks for memory leaks, i.e., it detects dynamically allocated objects
54+
checks for memory leaks, that is, it detects dynamically allocated objects
5555
that are not deallocated once the program terminates.
5656

5757
The CPROVER tools support pointer typecasts. Most casts are supported,
5858
with the following exceptions:
5959

60-
1. One notable exception is that pointers can only be accessed using a
61-
pointer type. The conversion of a pointer into an integer-type using
60+
1. Pointers can only be accessed using a
61+
pointer type. The conversion of a pointer into an integer type using
6262
a pointer typecast is not supported.
6363

6464
2. Casts from integers to pointers yield a pointer that is either NULL
@@ -73,8 +73,8 @@ with the following exceptions:
7373

7474
### Pointers in Open Programs
7575

76-
It is frequently desired to validate an open program, i.e., a fragment
77-
of a program. Some variables are left undefined. In case an undefined
76+
It is frequently desired to validate an open program (a fragment
77+
of a program). Some variables are left undefined. When an undefined
7878
pointer is dereferenced, CBMC assumes that the pointer points to a
7979
separate object of appropriate type with unbounded size. The object is
8080
assumed not to alias with any other object. This assumption may

0 commit comments

Comments
 (0)