Skip to content

Commit 610d78a

Browse files
committed
Merge remote-tracking branch 'origin/test-gen-support' into smowton/fix/cleanup_array_errors_hotfix
2 parents ce83039 + 8cf48d3 commit 610d78a

File tree

1,362 files changed

+15656
-65160
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,362 files changed

+15656
-65160
lines changed

.gitignore

+13
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,16 @@ src/ansi-c/gcc_builtin_headers_alpha.inc
2828
src/ansi-c/gcc_builtin_headers_arm.inc
2929
src/ansi-c/gcc_builtin_headers_generic.inc
3030
src/ansi-c/gcc_builtin_headers_ia32-2.inc
31+
src/ansi-c/gcc_builtin_headers_ia32-3.inc
32+
src/ansi-c/gcc_builtin_headers_ia32-4.inc
3133
src/ansi-c/gcc_builtin_headers_ia32.inc
34+
src/ansi-c/gcc_builtin_headers_math.inc
35+
src/ansi-c/gcc_builtin_headers_mem_string.inc
36+
src/ansi-c/gcc_builtin_headers_omp.inc
37+
src/ansi-c/gcc_builtin_headers_tm.inc
3238
src/ansi-c/gcc_builtin_headers_mips.inc
3339
src/ansi-c/gcc_builtin_headers_power.inc
40+
src/ansi-c/gcc_builtin_headers_ubsan.inc
3441

3542
# regression/test files
3643
*.out
@@ -68,6 +75,10 @@ src/xmllang/xml_lex.yy.cpp
6875
src/xmllang/xml_y.output
6976
src/xmllang/xml_y.tab.cpp
7077
src/xmllang/xml_y.tab.h
78+
src/memory-models/mm_lex.yy.cpp
79+
src/memory-models/mm_y.output
80+
src/memory-models/mm_y.tab.cpp
81+
src/memory-models/mm_y.tab.h
7182

7283
# binaries
7384
src/cbmc/cbmc
@@ -99,3 +110,5 @@ src/ansi-c/library/converter
99110
src/ansi-c/library/converter.exe
100111
src/util/irep_ids_convert
101112
src/util/irep_ids_convert.exe
113+
114+
*.pyc

CHANGELOG

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
* GOTO-INSTRUMENT: New option --print-path-lenghts
88
* GOTO-ANALYZER: New option --unreachable-functions, --reachable-functions
99
* GOTO-INSTRUMENT: New option --undefined-function-is-assume-false
10+
* GOTO-INSTRUMENT: New option --remove-function-body
1011

1112

1213
5.7

CODING_STANDARD

+3
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,9 @@ C++ features:
158158
- Use the auto keyword if and only if one of the following
159159
- The type is explictly repeated on the RHS (e.g. a constructor call)
160160
- Adding the type will increase confusion (e.g. iterators, function pointers)
161+
- Avoid assert, if the condition is an actual invariant, use INVARIANT,
162+
PRECONDITION, POSTCONDITION, CHECK_RETURN, UNREACHABLE or DATA_INVARIANT.
163+
If there are possible reasons why it might fail, throw an exception.
161164

162165
Architecture-specific code:
163166
- Avoid if possible.

COMPILING

+2-8
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ We assume that you have a Debian/Ubuntu or Red Hat-like distribution.
3232
The GNU Make needs to be version 3.81 or higher.
3333
On Debian-like distributions, do
3434

35-
apt-get install g++-6 gcc flex bison make git libwww-perl patch
35+
apt-get install g++ gcc flex bison make git libwww-perl patch
3636

3737
On Red Hat/Fedora or derivates, do
3838

@@ -44,13 +44,7 @@ We assume that you have a Debian/Ubuntu or Red Hat-like distribution.
4444

4545
git clone https://github.com/diffblue/cbmc cbmc-git
4646

47-
2) On Debian, do
48-
49-
cd cbmc-git/src
50-
make minisat2-download
51-
make CXX=g++-6
52-
53-
On Ubuntu, or other distributions with recent g++, do
47+
2) On Debian or Ubuntu, do
5448

5549
cd cbmc-git/src
5650
make minisat2-download

appveyor.yml

+4
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ test_script:
7575
cat goto-instrument-typedef/chain.sh || true
7676
7777
rem HACK disable failing tests
78+
rmdir /s /q ansi-c\arch_flags_mcpu_bad
79+
rmdir /s /q ansi-c\arch_flags_mcpu_good
80+
rmdir /s /q ansi-c\arch_flags_mthumb_bad
81+
rmdir /s /q ansi-c\arch_flags_mthumb_good
7882
rmdir /s /q ansi-c\Forward_Declaration2
7983
rmdir /s /q ansi-c\Incomplete_Type1
8084
rmdir /s /q ansi-c\Union_Padding1

doc/html-manual/api.shtml

+3-3
Original file line numberDiff line numberDiff line change
@@ -299,17 +299,17 @@ extern unsigned char __CPROVER_memory[];
299299
This array models the contents of integer-addressed memory.
300300
</p>
301301

302-
<h4>__CPROVER::unsignedbv<N> (C++ only)</h4>
302+
<h4>__CPROVER::unsignedbv&lt;N&gt; (C++ only)</h4>
303303

304304
<p class="justified">This type is the equivalent of <b>unsigned __CPROVER_bitvector[N]</b> in the C++ front-end.
305305
</p>
306306

307-
<h4>__CPROVER::signedbv<N> (C++ only)</h4>
307+
<h4>__CPROVER::signedbv&lt;N&gt; (C++ only)</h4>
308308

309309
<p class="justified">This type is the equivalent of <b>signed __CPROVER_bitvector[N]</b> in the C++ front-end.
310310
</p>
311311

312-
<h4>__CPROVER::fixedbv<N> (C++ only)</h4>
312+
<h4>__CPROVER::fixedbv&lt;N&gt; (C++ only)</h4>
313313

314314
<p class="justified">This type is the equivalent of <b>__CPROVER_fixedbv[N,m]</b> in the C++ front-end.
315315
</p>

doc/html-manual/architecture.shtml

+3-3
Original file line numberDiff line numberDiff line change
@@ -76,18 +76,18 @@ more subtle. Try the following program with <code>--big-endian</code>
7676
and <code>--little-endian</code>:</p>
7777

7878
<hr>
79-
<code>
79+
<pre><code>
8080
#include &lt;stdio.h&gt;<br>
8181
#include &lt;assert.h&gt;<br>
8282
<br>
8383
int main() {<br>
8484
&nbsp;&nbsp;int i=0x01020304;<br>
85-
&nbsp;&nbsp;char *p=(char *)&i;<br>
85+
&nbsp;&nbsp;char *p=(char *)&amp;i;<br>
8686
&nbsp;&nbsp;printf("Bytes of i: %d, %d, %d, %d\n",<br>
8787
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;p[0], p[1], p[2], p[3]);<br>
8888
&nbsp;&nbsp;assert(0);<br>
8989
}
90-
</code>
90+
</code></pre>
9191
<hr>
9292

9393
<!--#include virtual="footer.inc" -->

doc/html-manual/cbmc-loops.shtml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<!--#include virtual="header.inc" -->
22

33
<link rel="stylesheet" href="highlight/styles/default.css">
4-
<script src="highlight/highlight.pack.js"></script>
5-
<script>hljs.initHighlightingOnLoad();</script>
4+
<script src="highlight/highlight.pack.js" type="text/javascript"></script>
5+
<script type="text/javascript">hljs.initHighlightingOnLoad();</script>
66

77
<p><a href="./">CPROVER Manual TOC</a></p>
88

@@ -161,7 +161,7 @@ following loop-free program:
161161
<font color="#3030f0">BODY CODE COPY 4</font>
162162
if(cond) {
163163
<font color="#3030f0">BODY CODE COPY 5</font>
164-
<font color=#ff3030">assert(!cond);</font>
164+
<font color="#ff3030">assert(!cond);</font>
165165
}
166166
}
167167
}

doc/html-manual/cbmc.shtml

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<!--#include virtual="header.inc" -->
22

33
<link rel="stylesheet" href="highlight/styles/default.css">
4-
<script src="highlight/highlight.pack.js"></script>
5-
<script>hljs.initHighlightingOnLoad();</script>
4+
<script src="highlight/highlight.pack.js" type="text/javascript"></script>
5+
<script type="text/javascript">hljs.initHighlightingOnLoad();</script>
66

77
<p><a href="./">CPROVER Manual TOC</a></p>
88

@@ -29,7 +29,7 @@ the program.
2929
<p class="justified">
3030
As an example, consider the following simple program, named
3131
<a href="file1.c">file1.c</a>:
32-
<p/>
32+
</p>
3333

3434
<pre><code class="c">int puts(const char *s) { }
3535

@@ -356,7 +356,6 @@ representation.
356356
<div class="box1">
357357
<div class="caption">Further Reading</div>
358358

359-
<p>
360359
<ul>
361360
<li><a href="cbmc-loops.shtml">Understanding Loop Unwinding</a></li>
362361
<li><a target=_top href="http://www-2.cs.cmu.edu/~svc/papers/view-publications-ck03.html">
@@ -367,10 +366,9 @@ representation.
367366
<li><a target=_top href="http://www-2.cs.cmu.edu/~svc/papers/view-publications-ckl2004.html">A
368367
Tool for Checking ANSI-C Programs</a></li>
369368
</ul>
370-
</p>
371369

372370
<p class="justified">
373-
We also have a <a href="http://www.cprover.org/cbmc/applications.shtml">list of
371+
We also have a <a href="http://www.cprover.org/cbmc/applications/">list of
374372
interesting applications of CBMC</a>.</p>
375373

376374
</div>

doc/html-manual/cover.shtml

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<!--#include virtual="header.inc" -->
22

33
<link rel="stylesheet" href="highlight/styles/default.css">
4-
<script src="highlight/highlight.pack.js"></script>
5-
<script>hljs.initHighlightingOnLoad();</script>
4+
<script src="highlight/highlight.pack.js" type="text/javascript"></script>
5+
<script type="text/javascript">hljs.initHighlightingOnLoad();</script>
66

77
<p><a href="./">CPROVER Manual TOC</a></p>
88

@@ -215,7 +215,6 @@ Test 5.
215215
(iteration 5) desired_climb=-1.000000f, estimator_z_dot=1.000000f
216216
(iteration 6) desired_climb=-1.000000f, estimator_z_dot=1.000000f
217217
</code></pre>
218-
</p>
219218

220219
<p class="justified">
221220
The option <code>--unwind 6</code> unwinds the loop inside the main

doc/html-manual/cprover-source.shtml

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<!--#include virtual="header.inc" -->
22

33
<link rel="stylesheet" href="highlight/styles/default.css">
4-
<script src="highlight/highlight.pack.js"></script>
5-
<script>hljs.initHighlightingOnLoad();</script>
4+
<script src="highlight/highlight.pack.js" type="text/javascript"></script>
5+
<script type="text/javascript">hljs.initHighlightingOnLoad();</script>
66

77
<p><a href="./">CPROVER Manual TOC</a></p>
88

@@ -114,8 +114,8 @@ The excerpt below gives some details of the class <i>irept</i>:
114114
<pre><code class="c++">class irept
115115
{
116116
public:
117-
typedef std::vector<irept> subt;
118-
typedef std::map<irep_name_string, irept> named_subt;
117+
typedef std::vector&lt;irept&gt; subt;
118+
typedef std::map&lt;irep_name_string, irept&gt; named_subt;
119119
...
120120

121121
public:
@@ -134,7 +134,7 @@ protected:
134134
dt *data;
135135
...
136136
};
137-
</pre></code>
137+
</code></pre>
138138

139139
<p class="justified">
140140
Every node of any tree is an object of class <i>irept</i>. Each node has a
@@ -692,20 +692,20 @@ declaration of the interface:
692692
{
693693
public:
694694
// Insert the symbol
695-
bool add(const symbolt &symb);
695+
bool add(const symbolt &amp;symb);
696696
// Insert symb into the
697697
// table and erase it.
698698
// New_symbol points to the
699699
// newly inserted element.
700-
bool move(symbolt &symbol, symbolt *&new_symbol);
700+
bool move(symbolt &amp;symbol, symbolt *&amp;new_symbol);
701701

702702
// Insert symb into the
703703
// table. Then symb is erased.
704-
bool move(symbolt &symb);
704+
bool move(symbolt &amp;syb);
705705

706706
// Return the entry of the
707707
// symbol with given name.
708-
const irept &value(const std::string &name) const;
708+
const irept &amp;value(const std::string &amp;name) const;
709709
};
710710
</code></pre>
711711

@@ -815,7 +815,7 @@ public:
815815
instructionst instructions;
816816

817817
typedef typename
818-
std::map<const_targett, unsigned> target_numberst;
818+
std::map&lt;const_targett, unsigned&gt; target_numberst;
819819

820820
//A map containing the unique number of each target
821821
target_numberst target_numbers;

doc/html-manual/goto-cc-variants.shtml

+6-7
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,23 @@ The goto-cc utility comes in several variants, summarised in the following table
1212

1313
<center>
1414
<table cellpadding=5 cellspacing=0>
15-
<tr bgcolor=#e0e0e0>
15+
<tr bgcolor="#e0e0e0">
1616
<th>Executable</th><th>Environment</th><th>Preprocessor</th></tr>
17-
<tr bgcolor=#e0f0f0><td>goto-cc</td>
17+
<tr bgcolor="#e0f0f0"><td>goto-cc</td>
1818
<td><a href="http://gcc.gnu.org/">gcc</a> (control-flow graph only)</td>
1919
<td>gcc -E</td></tr>
20-
<tr bgcolor=#f0f0f0><td>goto-gcc</td>
20+
<tr bgcolor="#f0f0f0"><td>goto-gcc</td>
2121
<td><a href="http://gcc.gnu.org/">gcc</a> ("hybrid" executable)</td>
2222
<td>gcc -E</td></tr>
23-
<tr bgcolor=#e0f0f0><td>goto-armcc</td>
23+
<tr bgcolor="#e0f0f0"><td>goto-armcc</td>
2424
<td><a href="http://arm.com/products/tools/software-tools/rvds/index.php">ARM RVDS</a></td>
2525
<td>armcc -E</td></tr>
26-
<tr bgcolor=#f0f0f0><td>goto-cl</td>
26+
<tr bgcolor="#f0f0f0"><td>goto-cl</td>
2727
<td><a href="http://www.microsoft.com/visualstudio/">Visual Studio</a></td>
2828
<td>cl /E</td></tr>
29-
<tr bgcolor=#e0f0f0><td>goto-cw</td>
29+
<tr bgcolor="#e0f0f0"><td>goto-cw</td>
3030
<td><a href="http://www.freescale.com/webapp/sps/site/homepage.jsp?code=CW_HOME">Freescale CodeWarrior</a></td>
3131
<td>mwcceppc</td></tr>
32-
</tr>
3332
</table>
3433
</center>
3534

0 commit comments

Comments
 (0)