Skip to content

Commit fdea352

Browse files
authored
Merge branch 'diffblue:develop' into loop_invariant_synthesis
2 parents 4b558d8 + 4aceefd commit fdea352

File tree

299 files changed

+4549
-1709
lines changed

Some content is hidden

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

299 files changed

+4549
-1709
lines changed

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR
157157
"$<TARGET_FILE:goto-cc>"
158158
"$<TARGET_FILE:goto-diff>"
159159
"$<TARGET_FILE:goto-instrument>"
160+
"$<TARGET_FILE:goto-synthesizer>"
160161
"$<TARGET_FILE:janalyzer>"
161162
"$<TARGET_FILE:jbmc>"
162163
"$<TARGET_FILE:jdiff>"
@@ -215,6 +216,7 @@ cprover_default_properties(
215216
cbmc
216217
cbmc-lib
217218
cpp
219+
cprover-api-cpp
218220
cprover
219221
cprover-lib
220222
crangler
@@ -232,6 +234,8 @@ cprover_default_properties(
232234
goto-instrument-lib
233235
goto-programs
234236
goto-symex
237+
goto-synthesizer
238+
goto-synthesizer-lib
235239
jsil
236240
json
237241
json-symtab-language

CODEOWNERS

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
/jbmc/src/java_bytecode/ @romainbrenguier @peterschrammel
4545
/src/analyses/ @martin-cs @peterschrammel @chris-ryder
4646
/src/pointer-analysis/ @martin-cs @peterschrammel @chris-ryder
47-
47+
/src/libcprover-cpp @NlightNFotis @thomasspriggs @esteffin @TGWDB @peterschrammel
4848

4949
# These files change frequently and changes are medium-risk
5050

@@ -53,6 +53,7 @@
5353
/src/goto-instrument/ @martin-cs @chris-ryder @peterschrammel @tautschnig @kroening
5454
/src/goto-instrument/contracts/ @tautschnig @feliperodri @remi-delmas-3000
5555
/src/goto-instrument/synthesizer/ @qinheping @tautschnig @feliperodri @remi-delmas-3000
56+
/src/goto-synthesizer/ @qinheping @tautschnig @feliperodri @remi-delmas-3000
5657
/src/goto-diff/ @tautschnig @peterschrammel
5758
/src/jsil/ @kroening @tautschnig
5859
/src/memory-analyzer/ @tautschnig @chris-ryder @kroening

doc/man/goto-synthesizer.1

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
.TH GOTO-SYNTHESIZER "1" "December 2022" "goto-synthesizer-5.59.0" "User Commands"
2+
.SH NAME
3+
goto\-synthesizer \- Synthesize and apply loop contracts of goto binaries.
4+
.SH SYNOPSIS
5+
.TP
6+
.B goto\-synthesizer [\-?] [\-h] [\-\-help]
7+
show help
8+
.TP
9+
.B goto\-synthesizer \-\-version
10+
show version and exit
11+
.TP
12+
.B goto\-synthesizer [options] \fIin\fR [\fIout\fR]
13+
perform synthesis and loop-contracts transformation
14+
.SH DESCRIPTION
15+
\fBgoto-synthesis\fR reads a GOTO binary, performs loop-contracts synthesis and
16+
program transformation for the synthesized contracts, and then writes the
17+
resulting program as GOTO binary on disk.
18+
.SH OPTIONS
19+
.SS "User-interface options:"
20+
.TP
21+
\fB\-\-xml\-ui\fR
22+
use XML\-formatted output
23+
.TP
24+
\fB\-\-json\-ui\fR
25+
use JSON\-formatted output
26+
.TP
27+
\fB\-\-verbosity\fR \fIn\fR
28+
verbosity level
29+
.SH ENVIRONMENT
30+
All tools honor the TMPDIR environment variable when generating temporary
31+
files and directories.
32+
.SH BUGS
33+
If you encounter a problem please create an issue at
34+
.B https://github.com/diffblue/cbmc/issues
35+
.SH SEE ALSO
36+
.BR cbmc (1),
37+
.BR goto-cc (1)
38+
.BR goto-instrument (1)
39+
.SH COPYRIGHT
40+
2022, Qinheping Hu

regression/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ add_subdirectory(goto-interpreter)
8585
add_subdirectory(cbmc-sequentialization)
8686
add_subdirectory(cpp-linter)
8787
add_subdirectory(catch-framework)
88+
add_subdirectory(libcprover-cpp)
8889

8990
if(WITH_MEMORY_ANALYZER)
9091
add_subdirectory(snapshot-harness)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
static int foo __attribute__((used)) = 42;
2+
3+
int main()
4+
{
5+
return 0;
6+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
struct bar
2+
{
3+
char *ptr;
4+
};
5+
6+
static struct bar foo __attribute__((used))
7+
__attribute__((__section__(".ref.data")));
8+
9+
static struct bar foo __attribute__((used))
10+
__attribute__((__section__(".ref.data"))) = {0};
11+
12+
void use_foo()
13+
{
14+
__CPROVER_assert(foo.ptr == 0, "null");
15+
}
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
CORE
1+
CORE gcc-only
22
main.c
3-
--floatbv
3+
other.c
44
^EXIT=0$
55
^SIGNAL=0$
6-
^VERIFICATION SUCCESSFUL$
76
--
87
^warning: ignoring
8+
^CONVERSION ERROR$

regression/cbmc-concurrency/thread_chain_cbmc1/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
typedef unsigned long thread_id_t;
1919

2020
// Internal unbounded array indexed by local thread identifiers
21-
extern __CPROVER_bool __CPROVER_threads_exited[];
21+
__CPROVER_bool __CPROVER_threads_exited[__CPROVER_constant_infinity_uint];
2222

2323
// A thread_chain is like a chain of threads `f, g, ...` where `f`
2424
// must terminate before `g` can start to run, and so forth.

regression/cbmc-concurrency/thread_chain_cbmc2/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
typedef unsigned long thread_id_t;
1919

2020
// Internal unbounded array indexed by local thread identifiers
21-
extern __CPROVER_bool __CPROVER_threads_exited[];
21+
__CPROVER_bool __CPROVER_threads_exited[__CPROVER_constant_infinity_uint];
2222

2323
// A thread_chain is like a chain of threads `f, g, ...` where `f`
2424
// must terminate before `g` can start to run, and so forth.

regression/cbmc-incr-smt2/pointers-conversions/byte_extract_issue.c renamed to regression/cbmc-incr-smt2/pointers-conversions/byte_extract.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ int main()
66
uint32_t input;
77
uint32_t original = input;
88
uint8_t *ptr = (uint8_t *)(&input);
9-
assert(*ptr == 0); // falsifiable
9+
assert(*ptr != 42); // falsifiable
1010
*ptr = ~(*ptr);
1111
assert(input != original); // valid
1212
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
CORE
2+
byte_extract.c
3+
--trace
4+
Running incremental SMT2 solving via
5+
Building error trace
6+
\[main\.assertion\.\d+\] line \d+ assertion \*ptr != 42: FAILURE
7+
\[main\.assertion\.\d+\] line \d+ assertion input != original: SUCCESS
8+
input=42ul? \(00000000 00000000 00000000 00101010\)
9+
original=42ul? \(00000000 00000000 00000000 00101010\)
10+
Violated property:
11+
file byte_extract.c function main line \d+ thread \d+
12+
assertion \*ptr != 42
13+
^EXIT=10$
14+
^SIGNAL=0$
15+
--
16+
Reached unimplemented Generation of SMT formula for byte extract expression: byte_extract_little_endian
17+
--
18+
This test is here to document our lack of support for byte_extract_little_endian
19+
in the pointers support for the new SMT backend.

regression/cbmc-incr-smt2/pointers-conversions/byte_extract_issue.desc

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#include <assert.h>
2+
#include <stdint.h>
3+
4+
int main()
5+
{
6+
uint32_t x = 0u;
7+
uint8_t *ptr = (uint8_t *)(&x);
8+
uint32_t offset;
9+
__CPROVER_assume(offset >= 0u && offset < 4u);
10+
*(ptr + offset) = 1u;
11+
assert(x != 256u);
12+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
CORE
2+
byte_update.c
3+
--trace
4+
Running incremental SMT2 solving via
5+
Building error trace
6+
\[main\.assertion\.\d+\] line \d+ assertion x != 256u: FAILURE
7+
State \d+ file byte_update\.c function main line \d+ thread \d
8+
offset=1ul? \(00000000 00000000 00000000 00000001\)
9+
Assumption:
10+
file byte_update\.c line \d+ function main
11+
offset >= 0u && offset < 4u
12+
State \d+ file byte_update\.c function main line \d+ thread \d+
13+
byte_extract_little_endian\(x, \(signed long( long)? int\)offset, uint8_t\)=1 \(00000001\)
14+
Violated property:
15+
file byte_update.c function main line \d+ thread \d+
16+
assertion x != 256u
17+
^EXIT=10$
18+
^SIGNAL=0$
19+
--
20+
Reached unimplemented Generation of SMT formula for byte extract expression: byte_update_little_endian
21+
--
22+
This test is here to document our lack of support for byte_update_little_endian
23+
in the pointers support for the new SMT backend.

regression/cbmc-incr-smt2/pointers-conversions/byte_update_issue.c

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

regression/cbmc-incr-smt2/pointers-conversions/byte_update_issue.desc

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

regression/cbmc-library/Float-div1-refine/main.c

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

regression/cbmc-library/Float-div1/main.c

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

regression/cbmc-library/Float-no-simp8/main.c

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

regression/cbmc-library/Float-to-double1/main.c

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

0 commit comments

Comments
 (0)