Skip to content

Commit 9aa70a7

Browse files
Add doc README.md files to each directory
1 parent 1b7f57d commit 9aa70a7

File tree

32 files changed

+598
-164
lines changed

32 files changed

+598
-164
lines changed

src/analyses/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
\ingroup module_hidden
2+
\defgroup analyses analyses
3+
4+
# Folder analyses
5+
6+
This contains the abstract interpretation framework `ai.h` and several
7+
static analyses that instantiate it.
8+
9+
FIXME: put here a good introduction describing what is contained
10+
in this folder.

src/ansi-c/README

Lines changed: 0 additions & 22 deletions
This file was deleted.

src/ansi-c/module.md renamed to src/ansi-c/README.md

Lines changed: 46 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,27 @@
1+
\ingroup module_hidden
12
\defgroup ansi-c ansi-c
23
# Folder ansi-c
34

4-
\author Kareem Khazem
5+
\author Kareem Khazem, Martin Brain
6+
7+
\section overview Overview
8+
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.
14+
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.
19+
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.
525

626
\section preprocessing Preprocessing & Parsing
727

@@ -24,8 +44,6 @@ digraph G {
2444
\enddot
2545

2646

27-
28-
---
2947
\section type-checking Type-checking
3048

3149
In the \ref ansi-c and \ref java_bytecode directories.
@@ -112,3 +130,28 @@ called symbols. Thus, for example:
112130
parameter and return types of the function. The value of the symbol is
113131
the function's body (a \ref codet), and the symbol is stored in the
114132
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/assembler/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
\ingroup module_hidden
2+
\defgroup assembler assembler
3+
4+
# Folder assembler
5+
6+
`assembler/`provides front-end processing for assembler.

src/big-int/README

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/big-int/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
\ingroup module_hidden
2+
\defgroup big-int big-int
3+
4+
# Folder big-int
5+
6+
\author Martin Brain
7+
8+
CPROVER is distributed with its own multi-precision arithmetic library;
9+
mainly for historical and portability reasons. The library is externally
10+
developed and thus `big-int` contains the source as it is distributed:
11+
[http://www.dirk-zoller.de/](http://www.dirk-zoller.de/).
12+
13+
This should not be used directly, see `util/mp_arith.h` for the CPROVER
14+
interface.

src/cbmc/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
\ingroup module_hidden
2+
\defgroup cbmc cbmc
3+
4+
# Folder CBMC
5+
6+
\author Martin Brain
7+
8+
This contains the first full application. CBMC is a bounded model
9+
checker that uses the front ends (`ansi-c`, `cpp`, goto-program or
10+
others) to create a goto-program, `goto-symex` to unwind the loops the
11+
given number of times and to produce and equation system and finally
12+
`solvers` to find a counter-example (technically, `goto-symex` is then
13+
used to construct the counter-example trace).

src/cbmc/module.md

Lines changed: 0 additions & 47 deletions
This file was deleted.

src/clobber/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
\ingroup module_hidden
2+
\defgroup clobber clobber
3+
4+
# Folder clobber
5+
6+
`clobber\` is a module that is a tool.

src/cpp/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
\ingroup module_hidden
2+
\defgroup cpp cpp
3+
4+
# Folder cpp
5+
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`.

0 commit comments

Comments
 (0)