1
+ \ingroup module_hidden
1
2
\defgroup ansi-c ansi-c
2
3
# Folder ansi-c
3
4
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.
5
25
6
26
\section preprocessing Preprocessing & Parsing
7
27
@@ -24,8 +44,6 @@ digraph G {
24
44
\enddot
25
45
26
46
27
-
28
- ---
29
47
\section type-checking Type-checking
30
48
31
49
In the \ref ansi-c and \ref java_bytecode directories.
@@ -112,3 +130,28 @@ called symbols. Thus, for example:
112
130
parameter and return types of the function. The value of the symbol is
113
131
the function's body (a \ref codet), and the symbol is stored in the
114
132
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
0 commit comments