1- \ingroup module_hidden
1+ \ingroup module_hidden
22\page cprover-architecture-overview CProver Architecture Overview
33
4- \author Martin Brain
4+ \author Martin Brain, Peter Schrammel
55
6- Background Information
6+ # Overview of CPROVER Directories
7+
8+ ` src/ `
9+ ------
10+
11+ The source code is divided into a number of sub-directories, each
12+ containing the code for a different part of the system. In the top level
13+ files there are only a few files:
14+
15+ * ` config.inc ` : The user-editable configuration parameters for the
16+ build process. The main use of this file is setting the paths for the
17+ various external SAT solvers that are used. As such, anyone building
18+ from source will likely need to edit this.
19+
20+ * ` Makefile ` : The main systems Make file. Parallel builds are
21+ supported and encouraged; please don’t break them!
22+
23+ * ` common ` : System specific magic required to get the system to build.
24+ This should only need to be edited if porting CBMC to a new platform /
25+ build environment.
26+
27+ * ` doxygen.cfg ` : The config file for doxygen.cfg
28+
29+
30+ - GOTO-Programs
31+
32+ * \ref goto-programs
33+ * \ref linking
34+
35+ - Symbolic Execution
36+ * \ref goto-symex
37+
38+ - Static Analyses
39+
40+ * \ref analyses
41+ * \ref pointer-analysis
42+
43+ - Solvers
44+ * \ref solvers
45+
46+ - Language Front Ends
47+
48+ * Language API: \ref langapi
49+ * C: \ref ansi-c
50+ * C++: \ref cpp
51+ * Java: \ref java_bytecode
52+ * JavaScript: \ref jsil
53+
54+ - Tools
55+
56+ * \ref cbmc
57+ * \ref clobber
58+ * \ref goto-analyzer
59+ * \ref goto-instrument
60+ * \ref goto-diff
61+ * \ref memory-models
62+ * \ref goto-cc
63+ * \ref jbmc
64+
65+ - Utilities
66+
67+ * \ref big-int
68+ * \ref json
69+ * \ref xmllang
70+ * \ref util
71+ * \ref miniz
72+ * \ref nonstd
73+
74+
75+ ` doc `
76+ -----
77+
78+ Contains the CBMC man page. Doxygen HTML pages are generated
79+ into the ` doc/html ` directory when running ` doxygen ` from ` src ` .
80+
81+ ` regression/ `
82+ -------------
83+
84+ The ` regression/ ` directory contains the test suites.
85+ They are grouped into directories for each of the tools/modules.
86+ Each of these contains a directory per test case, containing a C or C++
87+ file that triggers the bug and a ` .desc ` file that describes
88+ the tests, expected output and so on. There is a Perl script,
89+ ` test.pl ` that is used to invoke the tests as:
90+
91+ ../test.pl -c PATH_TO_CBMC
92+
93+ The ` –help ` option gives instructions for use and the
94+ format of the description files.
95+
96+ General Information
797======================
898
999First off; read the \ref cbmc-user-manual "CBMC User Manual". It describes
@@ -35,16 +125,21 @@ transformation tools (see Section \ref other-apps "Other apps").
35125Coding Standards
36126----------------
37127
128+ See [ CODING_STANDARD] ( https://github.com/diffblue/cbmc/blob/develop/CODING_STANDARD.md ) .
129+
38130CPROVER is written in a fairly minimalist subset of C++; templates and
39- meta-programming are avoided except where necessary. The standard
40- library is used but in many cases there are alternatives provided in
41- ` util/ ` (see Section \ref util-section Util ) which are preferred. Boost is
42- not used .
131+ meta-programming are avoided except where necessary.
132+ External library dependencies are avoided (only STL and a SAT solver
133+ are required). Boost is not used. The ` util ` directory contains many
134+ utilities that are not (yet) in the standard library .
43135
44136Patches should be formatted so that code is indented with two space
45- characters, not tab and wrapped to 75 or 72 columns. Headers for doxygen
137+ characters, not tab and wrapped to 80 columns. Headers for doxygen
46138should be given (and preferably filled!) and the author will be the
47- person who first created the file.
139+ person who first created the file. Add doxygen comments to
140+ undocumented functions as you touch them. Coding standards
141+ and doxygen comments are enforced by CI before a patch can be
142+ merged by running ` clang-format ` and ` cpplint ` .
48143
49144Identifiers should be lower case with underscores to separate words.
50145Types (classes, structures and typedefs) names must[ ^ 1 ] end with a ` t ` .
@@ -53,61 +148,12 @@ interpreted) are named with `_typet`. For example `ui_message_handlert`
53148rather than ` UI_message_handlert ` or ` UIMessageHandler ` and
54149` union_typet ` .
55150
56- # Overview of CPROVER directories
57-
58- - language front ends
59-
60- * \ref ansi-c
61- * \ref cpp
62- * \ref langapi
63- * \ref jsil
64-
65-
66- - static analysis
67-
68- * \ref analyses
69- * \ref pointer-analysis
70-
71-
72- - utilities
73-
74- * \ref big-int
75- * \ref json
76- * \ref xmllang
77- * \ref util
78- * \ref miniz
79- * \ref nonstd
80-
81-
82- - tools
83-
84- * \ref cbmc
85- * \ref clobber
86- * \ref goto-analyzer
87- * \ref goto-instrument
88- * \ref goto-diff
89- * \ref memory-models
90- * \ref goto-cc
91- * \ref jbmc
92-
93-
94- - goto-programs
95-
96- * \ref goto-programs
97- * \ref linking
98-
99-
100- - symbolic execution
101- * \ref goto-symex
102-
103-
104- - solvers
105- * \ref solvers
106-
107- \section other-apps Other apps
151+ \section other-apps Other Tools
108152Other Useful Code
109153-----------------
110154
155+ FIXME: The text in this section is a bit outdated.
156+
111157The CPROVER subversion archive contains a number of separate programs.
112158Others are developed separately as patches or separate
113159branches.Interfaces are have been and are continuing to stablise but
@@ -187,48 +233,6 @@ Source Walkthrough
187233This section walks through the code bases in a rough order of interest /
188234comprehensibility to the new developer.
189235
190- ` doc `
191- -----
192-
193- At the moment just contains the CBMC man page.
194-
195- ` regression/ `
196- -------------
197-
198- The regression tests are currently being moved from CVS. The
199- ` regression/ ` directory contains all of those that have
200- been moved. They are grouped into directories for each of the tools.
201- Each of these contains a directory per test case, containing a C or C++
202- file that triggers the bug and a ` .dsc ` file that describes
203- the tests, expected output and so on. There is a Perl script,
204- ` test.pl ` that is used to invoke the tests as:
205-
206- ../test.pl -c PATH_TO_CBMC
207-
208- The ` –help ` option gives instructions for use and the
209- format of the description files.
210-
211- ` src/ `
212- ------
213-
214- The source code is divided into a number of sub-directories, each
215- containing the code for a different part of the system. In the top level
216- files there are only a few files:
217-
218- * ` config.inc ` : The user-editable configuration parameters for the
219- build process. The main use of this file is setting the paths for the
220- various external SAT solvers that are used. As such, anyone building
221- from source will likely need to edit this.
222-
223- * ` Makefile ` : The main systems Make file. Parallel builds are
224- supported and encouraged; please don’t break them!
225-
226- * ` common ` : System specific magic required to get the system to build.
227- This should only need to be edited if porting CBMC to a new platform /
228- build environment.
229-
230- * ` doxygen.cfg ` : The config file for doxygen.cfg
231-
232236\section util-section util directory
233237util/
234238-----------------
0 commit comments