Skip to content

Commit fc2a86e

Browse files
authored
Merge pull request #3542 from edstenson/review_goto_cc
Updated language use in goto-cc.md
2 parents 76fb32b + 3674908 commit fc2a86e

File tree

1 file changed

+16
-17
lines changed

1 file changed

+16
-17
lines changed

doc/cprover-manual/goto-cc.md

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
## Integration into Build Systems with goto-cc
44

55
Existing software projects usually do not come in a single source file
6-
that may simply be passed to a model checker. They rather come in a
6+
that may simply be passed to a model checker. Rather, they come in a
77
multitude of source files in different directories and refer to external
88
libraries and system-wide options. A *build system* then collects the
99
configuration options from the system and compiles the software
1010
according to build rules.
1111

12-
The most prevalent build tool on Unix (-based) systems surely is the
12+
The most prevalent build tool on Unix-based systems is the
1313
`make` utility. This tool uses build rules given in a *Makefile* that
1414
comes with the software sources. Running software verification tools on
1515
projects like these is greatly simplified by a compiler that first
@@ -29,20 +29,20 @@ This example assumes a Unix-like machine.
2929
1. Download the sources of wu-ftpd from
3030
[here](ftp://ftp.wu-ftpd.org/pub/wu-ftpd/wu-ftpd-current.tar.gz).
3131

32-
2. Unpack the sources by running ` tar xfz wu-ftpd-current.tar.gz`
32+
2. Unpack the sources by running ` tar xfz wu-ftpd-current.tar.gz`.
3333

34-
3. Change to the source directory, by entering, e.g.,
35-
`cd wu-ftpd-2.6.2`
34+
3. Change to the source directory, for example by entering,
35+
`cd wu-ftpd-2.6.2`.
3636

37-
4. Configure the project for verification by running
37+
4. Configure the project for verification by running:
3838

3939
`./configure YACC=byacc CC=goto-cc --host=none-none-none`
4040

4141
5. Build the project by running `make`. This creates multiple model
4242
files in the `src` directory. Among them is a model for the main
4343
executable `ftpd`.
4444

45-
6. Run a model-checker, e.g., CBMC, on the model file:
45+
6. Run a model-checker, for example CBMC, on the model file:
4646

4747
`cbmc src/ftpd`
4848

@@ -52,20 +52,20 @@ This example assumes a Unix-like machine.
5252

5353
More elaborate build or configuration scripts often make use of features
5454
of the compiler or the system library to detect configuration options
55-
automatically, e.g., in a `configure` script. Replacing `gcc` by goto-cc
56-
at this stage may confuse the script, or detect wrong options. For
55+
automatically, for example, in a `configure` script. Replacing `gcc` by goto-cc
56+
at this stage may confuse the script, or detect incorrect options. For
5757
example, missing library functions do not cause goto-cc to throw an
5858
error (only to issue a warning). Because of this, configuration scripts
5959
sometimes falsely assume the availability of a system function or
6060
library.
6161

6262
In the case of this or similar problems, it is more advisable to
6363
configure the project using the normal routine, and replacing the
64-
compiler setting manually in the generated Makefiles, e.g., by replacing
64+
compiler setting manually in the generated Makefiles, for example, by replacing
6565
lines like `CC=gcc` by `CC=goto-cc`.
6666

6767
A helpful command that accomplishes this task successfully for many
68-
projects is the following:
68+
projects is:
6969

7070
```plaintext
7171
for i in `find . -name Makefile`; do sed -e 's/^\(\s*CC[ \t]*=\)\(.*$\)/\1goto-cc/g' -i $i done
@@ -81,7 +81,7 @@ is \ref man_instrumentation-vs "here".
8181

8282
### Linking Libraries
8383

84-
Some software projects come with their own libraries; also, the goal may
84+
Some software projects come with their own libraries. Also, the goal may
8585
be to analyze a library by itself. For this purpose it is possible to
8686
use goto-cc to link multiple model files into a library of model files.
8787
An object file can then be linked against this model library. For this
@@ -103,16 +103,16 @@ The behavior of a C/C++ program depends on a number of parameters that
103103
are specific to the architecture the program was compiled for. The three
104104
most important architectural parameters are:
105105

106-
- The width of the various scalar types; e.g., compare the value of
106+
- The width of the various scalar types; for example, compare the value of
107107
`sizeof(long int)` on various machines.
108-
- The width of pointers; e.g., compare the value of `sizeof(int *)` on
108+
- The width of pointers; for example, compare the value of `sizeof(int *)` on
109109
various machines.
110110
- The [endianness](http://en.wikipedia.org/wiki/Endianness) of
111111
the architecture.
112112

113113
In general, the CPROVER tools attempt to adopt the settings of the
114114
particular architecture the tool itself was compiled for. For example,
115-
when running a 64 bit binary of CBMC on Linux, the program will be
115+
when running a 64-bit binary of CBMC on Linux, the program will be
116116
processed assuming that `sizeof(long int)==8`.
117117

118118
As a consequence of these architectural parameters, you may observe
@@ -126,7 +126,7 @@ following command-line arguments can be passed to the CPROVER tools:
126126
`--big-endian`.
127127

128128
When using a goto binary, CBMC and the other tools read the
129-
configuration from the binary, i.e., the setting when running goto-cc is
129+
configuration from the binary. The setting when running goto-cc is
130130
the one that matters; the option given to the model checker is ignored
131131
in this case.
132132

@@ -161,4 +161,3 @@ int main() {
161161
assert(0);
162162
}
163163
```
164-

0 commit comments

Comments
 (0)