Skip to content

Commit 020120a

Browse files
authored
Merge branch 'diffblue:develop' into develop
2 parents ed10809 + 66004dc commit 020120a

File tree

486 files changed

+12522
-7481
lines changed

Some content is hidden

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

486 files changed

+12522
-7481
lines changed

.clang-format-ignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
jbmc/src/miniz/miniz.cpp
2+
jbmc/src/miniz/miniz.h
23
src/cprover/wcwidth.c
34
unit/catch/catch.hpp

.github/workflows/doxygen-check.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
check-doxygen:
99
# Note that the versions used for this `check-doxygen` job should be kept in
1010
# sync with the `publish` job.
11-
runs-on: ubuntu-22.04
11+
runs-on: ubuntu-24.04
1212
steps:
1313
- uses: actions/checkout@v4
1414
- name: Fetch dependencies

.github/workflows/publish.yaml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,28 @@ jobs:
66
publish:
77
# Note that the versions used for this `publish` job should be kept in sync
88
# with the `check-doxygen` job.
9-
runs-on: ubuntu-22.04
9+
runs-on: ubuntu-24.04
1010
steps:
1111
- name: Checkout repository
1212
uses: actions/checkout@v4
1313

1414
- name: Install doxygen
1515
run: |
1616
sudo apt update
17-
sudo apt install doxygen graphviz pandoc npm
18-
19-
- name: Install python modules
20-
run: sudo python3 -m pip install gitpython pandocfilters
17+
sudo apt-get install --no-install-recommends -y doxygen graphviz pandoc npm python3-git python3-pandocfilters
2118
2219
- name: Install mermaid diagram filter
2320
run: |
2421
git clone https://github.com/raghur/mermaid-filter/
2522
cd mermaid-filter
26-
sed -i '1s/{/{ "overrides": { "puppeteer": "^21" },/' package.json
27-
sed -i '1s/^\/\/ //' index.js
2823
npm install --loglevel verbose
2924
sudo npm link --loglevel verbose
3025
cd ..
3126
3227
- name: Build documentation
33-
run: cd doc/doxygen-root && make && touch html/.nojekyll
28+
run: |
29+
echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
30+
cd doc/doxygen-root && make && touch html/.nojekyll
3431
3532
- name: Publish documentation
3633
if: ${{ github.event_name == 'push' && startsWith('refs/heads/develop', github.ref) }}

CODEOWNERS

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
/src/langapi/ @kroening @tautschnig @peterschrammel
2525
/src/xmllang/ @kroening @tautschnig @peterschrammel
2626
/src/solvers/flattening @martin-cs @kroening @tautschnig @peterschrammel
27-
/src/solvers/floatbv @martin-cs @kroening
27+
/src/solvers/floatbv @martin-cs @kroening @peterschrammel
2828
/src/solvers/miniBDD @tautschnig @kroening
2929
/src/solvers/prop @martin-cs @kroening @tautschnig @peterschrammel
3030
/src/solvers/sat @martin-cs @kroening @tautschnig @peterschrammel
@@ -43,13 +43,13 @@
4343
/jbmc/src/java_bytecode/ @peterschrammel @TGWDB
4444
/src/analyses/ @martin-cs @peterschrammel
4545
/src/pointer-analysis/ @martin-cs @peterschrammel
46-
/src/libcprover-cpp @esteffin @TGWDB @peterschrammel
47-
/src/libcprover-rust @TGWDB @peterschrammel @esteffin
46+
/src/libcprover-cpp @TGWDB @peterschrammel
47+
/src/libcprover-rust @TGWDB @peterschrammel
4848

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

5151
/src/goto-analyzer/ @martin-cs @peterschrammel
52-
/src/goto-bmc/ @esteffin @TGWDB @peterschrammel
52+
/src/goto-bmc/ @TGWDB @peterschrammel
5353
/src/goto-harness/ @martin-cs @peterschrammel
5454
/src/goto-instrument/ @martin-cs @peterschrammel @tautschnig @kroening
5555
/src/goto-instrument/contracts/ @tautschnig @feliperodri @remi-delmas-3000
@@ -62,8 +62,8 @@
6262
/jbmc/src/jdiff/ @peterschrammel
6363
/src/cpp/ @kroening @tautschnig @peterschrammel
6464
/src/solvers/smt2 @kroening @martin-cs @peterschrammel @TGWDB
65-
/src/solvers/smt2_incremental @peterschrammel @thomasspriggs @TGWDB @esteffin
66-
/src/solvers/Makefile @kroening @tautschnig @peterschrammel @TGWDB @esteffin
65+
/src/solvers/smt2_incremental @peterschrammel @thomasspriggs @TGWDB
66+
/src/solvers/Makefile @kroening @tautschnig @peterschrammel @TGWDB
6767
/src/statement-list/ @kroening @tautschnig @peterschrammel
6868

6969
/cmake/ @diffblue/diffblue-opensource

doc/API/util/piped_process.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
\page piped-process `src/util/piped_process.{cpp, h}`
1+
\page piped-process The `piped_process` API
22

3-
To utilise the `piped_process` API for interprocess communication with any binary:
3+
To utilise the `piped_process` API (`src/util/piped_process.{cpp, h}`) for
4+
interprocess communication with any binary:
45

56
* You need to initialise it by calling the construct `piped_processt("binary with args")`.
67
* If IPC fails before child process creation, you will get a `system_exceptiont`.

doc/architectural/front-page.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ license</a>.
5454
Overview of Documentation
5555
=======
5656

57-
### For users:
57+
## For users:
5858

5959
* The [CPROVER User Manual](http://www.cprover.org/cprover-manual/) details the
6060
capabilities of CBMC and describes how to install and use these tools. It
@@ -68,7 +68,7 @@ you can access it <a href=
6868
* \subpage memory-bounds-checking
6969
* \subpage satabs
7070

71-
### For contributors:
71+
## For contributors:
7272

7373
The following pages attempt to provide the information that a developer needs to
7474
work on CBMC, in a sensible order. In many cases they link to the appropriate

doc/architectural/goto-program-transformations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ This pass adds failed symbols to the symbol table. See
176176
`src/pointer-analysis/add_failed_symbols.h` for details. The implementation of
177177
this pass is called via \ref add_failed_symbols(symbol_table_baset &) . The
178178
purpose of failed symbols is explained in the documentation of the function \ref
179-
goto_symext::dereference(exprt &, statet &, bool)
179+
goto_symext::dereference(exprt &, goto_symex_statet &, bool)
180180

181181
<em>Predecessor pass is \ref update-transform or the optional \ref
182182
nondet-transform if it is being used.</em>

doc/assets/xml_spec.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ The path from the input C code to XML trace goes through the following
475475
steps:\
476476
`C``GOTO``SSA``GOTO Trace``XML Trace`
477477

478-
#### SSA to GOTO Trace
478+
### SSA to GOTO Trace
479479

480480
SSA steps are sorted by clocks and the following steps are skipped: PHI,
481481
GUARD assignments; shared-read, shared-write, constraint, spawn,

doc/man/cbmc.1

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,13 @@ set malloc failure mode to return null
334334
\fB\-\-string\-abstraction\fR
335335
track C string lengths and zero\-termination
336336
.TP
337+
\fB\-\-dfcc\-debug\-lib\fR
338+
enable debug assertions in the cprover contracts library
339+
.TP
340+
\fB\-\-dfcc\-simple\-invalid\-pointer\-model\fR
341+
use simplified invalid pointer model in the cprover contracts library
342+
(faster, unsound)
343+
.TP
337344
\fB\-\-reachability\-slice\fR
338345
remove instructions that cannot appear on a trace
339346
from entry point to a property

doc/man/goto-analyzer.1

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,9 @@ perform taint analysis using rules in given file
409409
\fB\-\-show\-taint\fR
410410
print taint analysis results on stdout
411411
.TP
412+
\fB\-\-show\-local\-bitvector\fR
413+
perform procedure\-local bitvector analysis
414+
.TP
412415
\fB\-\-show\-local\-may\-alias\fR
413416
perform procedure\-local may alias analysis
414417
.SS "C/C++ frontend options:"
@@ -582,6 +585,13 @@ set malloc failure mode to return null
582585
.TP
583586
\fB\-\-string\-abstraction\fR
584587
track C string lengths and zero\-termination
588+
.TP
589+
\fB\-\-dfcc\-debug\-lib\fR
590+
enable debug assertions in the cprover contracts library
591+
.TP
592+
\fB\-\-dfcc\-simple\-invalid\-pointer\-model\fR
593+
use simplified invalid pointer model in the cprover contracts library
594+
(faster, unsound)
585595
.SS "Standard Checks"
586596
From version \fB6.0\fR onwards, \fBcbmc\fR, \fBgoto-analyzer\fR and some other tools
587597
apply some checks to the program by default (called the "standard checks"), with the

doc/man/goto-instrument.1

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -706,6 +706,13 @@ do not allow malloc calls to fail by default
706706
\fB\-\-string\-abstraction\fR
707707
track C string lengths and zero\-termination
708708
.TP
709+
\fB\-\-dfcc\-debug\-lib\fR
710+
enable debug assertions in the cprover contracts library
711+
.TP
712+
\fB\-\-dfcc\-simple\-invalid\-pointer\-model\fR
713+
use simplified invalid pointer model in the cprover contracts library
714+
(faster, unsound)
715+
.TP
709716
\fB\-\-model\-argc\-argv\fR \fIn\fR
710717
Create up to \fIn\fR non-deterministic C strings as entries to \fIargv\fR and
711718
set \fIargc\fR accordingly. In absence of such modelling, \fIargv\fR is left

jbmc/CMakeLists.txt

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,30 @@ add_custom_target(java-models-library ALL
3131
)
3232

3333
install(
34-
FILES
35-
"${CMAKE_CURRENT_SOURCE_DIR}/lib/java-models-library/target/core-models.jar"
36-
"${CMAKE_CURRENT_SOURCE_DIR}/lib/java-models-library/target/cprover-api.jar"
37-
DESTINATION ${CMAKE_INSTALL_LIBDIR}
34+
FILES
35+
"${CMAKE_CURRENT_SOURCE_DIR}/lib/java-models-library/target/core-models.jar"
36+
"${CMAKE_CURRENT_SOURCE_DIR}/lib/java-models-library/target/cprover-api.jar"
37+
DESTINATION ${CMAKE_INSTALL_LIBDIR}
3838
)
39+
40+
# java regression tests
41+
file(GLOB_RECURSE java_regression_sources "regression/**/*.java,regression/**/*.kt,regression/**/*.j,regression/**/pom.xml")
42+
file(GLOB java_regression_test_dirs LIST_DIRECTORIES true "regression/*/*")
43+
foreach(dir ${java_regression_test_dirs})
44+
# TODO: remove the last condition as soon as jbmc/deterministic_assignments_json has been converted
45+
IF(IS_DIRECTORY ${dir} AND EXISTS "${dir}/pom.xml" AND NOT EXISTS "${dir}/Foo.class")
46+
list(APPEND java_regression_compiled_sources "${dir}/target")
47+
ENDIF()
48+
endforeach()
49+
50+
add_custom_command(OUTPUT ${java_regression_compiled_sources}
51+
COMMAND ${MAVEN_PROGRAM} --quiet clean package -T1C
52+
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/regression
53+
DEPENDS ${java_regression_sources}
54+
)
55+
56+
add_custom_target(java-regression ALL
57+
DEPENDS ${java_regression_compiled_sources}
58+
)
59+
60+
add_dependencies(java-regression java-models-library)

jbmc/regression/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ DIRS = janalyzer \
1616
# Run all test directories in sequence
1717
.PHONY: test
1818
test:
19+
mvn --quiet clean package -T1C
1920
@for dir in $(DIRS); do \
2021
$(MAKE) "$$dir" || exit 1; \
2122
done;
@@ -30,6 +31,7 @@ $(DIRS):
3031
.PHONY: test-parallel
3132
.NOTPARALLEL: test-parallel
3233
test-parallel:
34+
mvn --quiet clean package -T1C
3335
@echo "Building with $(JOBS) jobs"
3436
parallel \
3537
--halt soon,fail=1 \
@@ -43,6 +45,7 @@ test-parallel:
4345

4446
.PHONY: clean
4547
clean:
48+
mvn --quiet clean -T1C
4649
@for dir in *; do \
4750
if [ -d "$$dir" ]; then \
4851
$(MAKE) -C "$$dir" clean; \
Binary file not shown.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
<groupId>org.cprover.regression</groupId>
7+
<artifactId>regression.book-examples.BinarySearch</artifactId>
8+
<version>1.0-SNAPSHOT</version>
9+
10+
<parent>
11+
<groupId>org.cprover.regression</groupId>
12+
<artifactId>regression.book-examples</artifactId>
13+
<version>1.0-SNAPSHOT</version>
14+
</parent>
15+
16+
<build>
17+
<plugins>
18+
<plugin>
19+
<artifactId>maven-jar-plugin</artifactId>
20+
<executions>
21+
<execution>
22+
<id>default-jar</id>
23+
<phase>none</phase>
24+
</execution>
25+
</executions>
26+
</plugin>
27+
</plugins>
28+
</build>
29+
30+
</project>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
CORE
22
BinarySearch.binarySearch
3-
--throw-runtime-exceptions --unwind 2
3+
--throw-runtime-exceptions --unwind 2 -cp target/classes
44
^EXIT=10$
55
^SIGNAL=0$
66
^VERIFICATION FAILED$
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
<groupId>org.cprover.regression</groupId>
7+
<artifactId>regression.book-examples.LocatorHandler</artifactId>
8+
<version>1.0-SNAPSHOT</version>
9+
10+
<parent>
11+
<groupId>org.cprover.regression</groupId>
12+
<artifactId>regression.book-examples</artifactId>
13+
<version>1.0-SNAPSHOT</version>
14+
</parent>
15+
16+
<build>
17+
<plugins>
18+
<plugin>
19+
<artifactId>maven-jar-plugin</artifactId>
20+
<executions>
21+
<execution>
22+
<id>default-jar</id>
23+
<phase>none</phase>
24+
</execution>
25+
</executions>
26+
</plugin>
27+
</plugins>
28+
</build>
29+
30+
</project>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
CORE
22
LocatorHandler.autoLocator
3-
--max-nondet-string-length 10 --unwind 10 --classpath `../../../../scripts/format_classpath.sh . ../../../lib/java-models-library/target/core-models.jar ../../../lib/java-models-library/target/cprover-api.jar`
3+
--max-nondet-string-length 10 --unwind 10 --classpath `../../../../scripts/format_classpath.sh target/classes ../../../lib/java-models-library/target/core-models.jar ../../../lib/java-models-library/target/cprover-api.jar`
44
^EXIT=10$
55
^SIGNAL=0$
66
^VERIFICATION FAILED$
Binary file not shown.
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
CORE
22
EquivalenceCheck.check
3-
3+
-cp target/classes
44
^EXIT=0$
55
^SIGNAL=0$
66
^VERIFICATION SUCCESSFUL$
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
<groupId>org.cprover.regression</groupId>
7+
<artifactId>regression.book-examples.SignalUtil</artifactId>
8+
<version>1.0-SNAPSHOT</version>
9+
10+
<parent>
11+
<groupId>org.cprover.regression</groupId>
12+
<artifactId>regression.book-examples</artifactId>
13+
<version>1.0-SNAPSHOT</version>
14+
</parent>
15+
16+
<build>
17+
<plugins>
18+
<plugin>
19+
<artifactId>maven-jar-plugin</artifactId>
20+
<executions>
21+
<execution>
22+
<id>default-jar</id>
23+
<phase>none</phase>
24+
</execution>
25+
</executions>
26+
</plugin>
27+
</plugins>
28+
</build>
29+
30+
</project>
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
CORE
22
StringUtil.getLastToken
3-
--max-nondet-string-length 100 --unwind 2 --classpath `../../../../scripts/format_classpath.sh . ../../../lib/java-models-library/target/core-models.jar ../../../lib/java-models-library/target/cprover-api.jar`
3+
--max-nondet-string-length 100 --unwind 2 --classpath `../../../../scripts/format_classpath.sh target/classes ../../../lib/java-models-library/target/core-models.jar ../../../lib/java-models-library/target/cprover-api.jar`
44
^EXIT=10$
55
^SIGNAL=0$
66
^VERIFICATION FAILED$

0 commit comments

Comments
 (0)