Skip to content

Commit 472f0ac

Browse files
Populating module documentation md files
by distributiong M. Brain's brief module descriptions from the old wiki
1 parent 2154f54 commit 472f0ac

File tree

24 files changed

+423
-544
lines changed

24 files changed

+423
-544
lines changed

doc/architectural/cprover-architecture-overview.md

Lines changed: 51 additions & 497 deletions
Large diffs are not rendered by default.

src/analyses/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
\ingroup module_hidden
22
\defgroup analyses analyses
3+
34
# Folder analyses
45

6+
This contains the abstract interpretation framework `ai.h` and several
7+
static analyses that instantiate it.
8+
59
FIXME: put here a good introduction describing what is contained
610
in this folder.

src/ansi-c/README.md

Lines changed: 41 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,26 @@
22
\defgroup ansi-c ansi-c
33
# Folder ansi-c
44

5-
\author Kareem Khazem
5+
\author Kareem Khazem, Martin Brain
66

7-
CodeWarrior C Compilers Reference 3.2:
8-
9-
http://cache.freescale.com/files/soft_dev_tools/doc/ref_manual/CCOMPILERRM.pdf
7+
\section overview Overview
108

11-
http://cache.freescale.com/files/soft_dev_tools/doc/ref_manual/ASMX86RM.pdf
9+
Contains the front-end for ANSI C, plus a variety of common extensions.
10+
This parses the file, performs some basic sanity checks (this is one
11+
area in which the UI could be improved; patches most welcome) and then
12+
produces a goto-program (see below). The parser is a traditional Flex /
13+
Bison system.
1214

13-
ARM 4.1 Compiler Reference:
15+
`internal_addition.c` contains the implementation of various ‘magic’
16+
functions that are that allow control of the analysis from the source
17+
code level. These include assertions, assumptions, atomic blocks, memory
18+
fences and rounding modes.
1419

15-
http://infocenter.arm.com/help/topic/com.arm.doc.dui0491c/DUI0491C_arm_compiler_reference.pdf
16-
17-
18-
Parsing performance considerations:
19-
20-
* Measured on trunk/regression/ansi-c/windows_h_VS_2012/main.i
21-
22-
* 13%: Copying into i_preprocessed
23-
24-
* 5%: ansi_c_parser.read()
25-
26-
* 53%: yyansi_clex()
27-
28-
* 29%: parser (without typechecking)
20+
The `library/` subdirectory contains versions of some of the C standard
21+
header files that make use of the CPROVER built-in functions. This
22+
allows CPROVER programs to be ‘aware’ of the functionality and model it
23+
correctly. Examples include `stdio.c`, `string.c`, `setjmp.c` and
24+
various threading interfaces.
2925

3026
\section preprocessing Preprocessing & Parsing
3127

@@ -48,8 +44,6 @@ digraph G {
4844
\enddot
4945

5046

51-
52-
---
5347
\section type-checking Type-checking
5448

5549
In the \ref ansi-c and \ref java_bytecode directories.
@@ -136,3 +130,28 @@ called symbols. Thus, for example:
136130
parameter and return types of the function. The value of the symbol is
137131
the function's body (a \ref codet), and the symbol is stored in the
138132
symbol table with `foo` as the key.
133+
134+
135+
\section performance Parsing performance considerations
136+
137+
* Measured on trunk/regression/ansi-c/windows_h_VS_2012/main.i
138+
139+
* 13%: Copying into i_preprocessed
140+
141+
* 5%: ansi_c_parser.read()
142+
143+
* 53%: yyansi_clex()
144+
145+
* 29%: parser (without typechecking)
146+
147+
\section references Compiler References
148+
149+
CodeWarrior C Compilers Reference 3.2:
150+
151+
http://cache.freescale.com/files/soft_dev_tools/doc/ref_manual/CCOMPILERRM.pdf
152+
153+
http://cache.freescale.com/files/soft_dev_tools/doc/ref_manual/ASMX86RM.pdf
154+
155+
ARM 4.1 Compiler Reference:
156+
157+
http://infocenter.arm.com/help/topic/com.arm.doc.dui0491c/DUI0491C_arm_compiler_reference.pdf

src/big-int/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
\ingroup module_hidden
22
\defgroup big-int big-int
3+
34
# Folder big-int
45

6+
\author Martin Brain
7+
58
CPROVER is distributed with its own multi-precision arithmetic library;
69
mainly for historical and portability reasons. The library is externally
710
developed and thus `big-int` contains the source as it is distributed.

src/cbmc/README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,9 @@
22
\defgroup cbmc cbmc
33
# Folder CBMC
44

5-
The CBMC handles the code related to interacting with CBMC.
5+
This contains the first full application. CBMC is a bounded model
6+
checker that uses the front ends (`ansi-c`, `cpp`, goto-program or
7+
others) to create a goto-program, `goto-symex` to unwind the loops the
8+
given number of times and to produce and equation system and finally
9+
`solvers` to find a counter-example (technically, `goto-symex` is then
10+
used to construct the counter-example trace).

src/cpp/README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
\ingroup module_hidden
22
\defgroup cpp cpp
3+
34
# Folder cpp
45

5-
The C++ Language front-end is for processing C++.
6+
\author Martin Brain
7+
8+
This directory contains the C++ front-end. It supports the subset of C++
9+
commonly found in embedded and system applications. Consequentially it
10+
doesn’t have full support for templates and many of the more advanced
11+
and obscure C++ features. The subset of the language that can be handled
12+
is being extended over time so bug reports of programs that cannot be
13+
parsed are useful.
14+
15+
The functionality is very similar to the ANSI C front end; parsing the
16+
code and converting to goto-programs. It makes use of code from
17+
`langapi` and `ansi-c`.

src/goto-analyzer/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
\ingroup module_hidden
22
\defgroup goto-analyzer goto-analyzer
3+
34
# Folder goto-analyzer
45

5-
`goto-analyzer/` is a module stores information related to interacting with
6-
goto-analyzer. These files are medium risk to change and change frequently.
6+
`goto-analyzer/` is a tool performing static analyses on goto
7+
programs. It provides the front end for many of the static analyses
8+
in the \ref analyses directory.

src/goto-cc/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
\ingroup module_hidden
22
\defgroup goto-cc goto-cc
3+
34
# Folder goto-cc
45

6+
\author Martin Brain
7+
58
`goto-cc` is a compiler replacement that just performs the first step of
69
the process; converting C or C++ programs to goto-binaries. It is
710
intended to be dropped in to an existing build procedure in place of the
@@ -11,3 +14,4 @@ the `goto-cc/` binary. If it is called `goto-cc` then it emulates GCC
1114
flags, `goto-armcc` emulates the ARM compiler, `goto-cl` emulates VCC
1215
and `goto-cw` emulates the Code Warrior compiler. The output of this
1316
tool can then be used with `cbmc` or `goto-instrument`.
17+

src/goto-diff/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
\ingroup module_hidden
22
\defgroup goto-diff goto-diff
3+
34
# Folder goto-diff
45

6+
`goto-diff/` is a tool that offers functionality similar to the `diff`
7+
tool, but for GOTO programs.
8+
59

6-
`goto-diff/` is a module has files which change frequently and are medium
7-
risk.

src/goto-instrument/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
\ingroup module_hidden
22
\defgroup goto-instrument goto-instrument
3+
34
# Folder goto-instrument
45

6+
\author Martin Brain
7+
58
The `goto-instrument/` directory contains a number of tools, one per
69
file, that are built into the `goto-instrument` program. All of them
710
take in a goto-program (produced by `goto-cc`) and either modify it or

0 commit comments

Comments
 (0)