Skip to content

Commit 8f10b49

Browse files
committed
Merge branch 'master' into issue_1489
2 parents 2a714b8 + bc85d30 commit 8f10b49

File tree

104 files changed

+1804
-611
lines changed

Some content is hidden

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

104 files changed

+1804
-611
lines changed

.github/workflows/coverage.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
os:
1919
- ubuntu-latest
2020
ocaml-compiler:
21-
- ocaml-variants.4.14.0+options,ocaml-option-flambda # matches opam lock file
21+
- ocaml-variants.4.14.2+options,ocaml-option-flambda # matches opam lock file
2222
# don't add any other because they won't be used
2323

2424
runs-on: ${{ matrix.os }}
@@ -35,10 +35,9 @@ jobs:
3535
# otherwise setup-ocaml pins non-locked dependencies
3636
# https://github.com/ocaml/setup-ocaml/issues/166
3737
OPAMLOCKED: locked
38-
uses: ocaml/setup-ocaml@v2
38+
uses: ocaml/setup-ocaml@v3
3939
with:
4040
ocaml-compiler: ${{ matrix.ocaml-compiler }}
41-
opam-depext-flags: --with-test # doesn't work (https://github.com/ocaml/opam/issues/5836)
4241

4342
- name: Install graph-easy # TODO: remove if depext --with-test works
4443
if: ${{ matrix.os == 'ubuntu-latest' }}

.github/workflows/docker.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
6060
- name: Build Docker image
6161
id: build
62-
uses: docker/build-push-action@v5
62+
uses: docker/build-push-action@v6
6363
with:
6464
context: .
6565
load: true # load into docker instead of immediately pushing
@@ -72,7 +72,7 @@ jobs:
7272
run: docker run --rm -v $(pwd):/data ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.version }} /data/tests/regression/04-mutex/01-simple_rc.c # run image by version in case multiple tags
7373

7474
- name: Push Docker image
75-
uses: docker/build-push-action@v5
75+
uses: docker/build-push-action@v6
7676
with:
7777
context: .
7878
push: true

.github/workflows/docs.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
os:
1919
- ubuntu-latest
2020
ocaml-compiler:
21-
- ocaml-variants.4.14.0+options,ocaml-option-flambda # matches opam lock file
21+
- ocaml-variants.4.14.2+options,ocaml-option-flambda # matches opam lock file
2222
# don't add any other because they won't be used
2323

2424
runs-on: ${{ matrix.os }}
@@ -35,7 +35,7 @@ jobs:
3535
# otherwise setup-ocaml pins non-locked dependencies
3636
# https://github.com/ocaml/setup-ocaml/issues/166
3737
OPAMLOCKED: locked
38-
uses: ocaml/setup-ocaml@v2
38+
uses: ocaml/setup-ocaml@v3
3939
with:
4040
ocaml-compiler: ${{ matrix.ocaml-compiler }}
4141

.github/workflows/indentation.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
fetch-depth: 0
2626

2727
- name: Set up OCaml ${{ matrix.ocaml-compiler }}
28-
uses: ocaml/setup-ocaml@v2
28+
uses: ocaml/setup-ocaml@v3
2929
with:
3030
ocaml-compiler: ${{ matrix.ocaml-compiler }}
3131

.github/workflows/locked.yml

+6-8
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- ubuntu-latest
2121
- macos-13
2222
ocaml-compiler:
23-
- ocaml-variants.4.14.0+options,ocaml-option-flambda # matches opam lock file
23+
- ocaml-variants.4.14.2+options,ocaml-option-flambda # matches opam lock file
2424
# don't add any other because they won't be used
2525

2626
runs-on: ${{ matrix.os }}
@@ -37,10 +37,9 @@ jobs:
3737
# otherwise setup-ocaml pins non-locked dependencies
3838
# https://github.com/ocaml/setup-ocaml/issues/166
3939
OPAMLOCKED: locked
40-
uses: ocaml/setup-ocaml@v2
40+
uses: ocaml/setup-ocaml@v3
4141
with:
4242
ocaml-compiler: ${{ matrix.ocaml-compiler }}
43-
opam-depext-flags: --with-test # doesn't work (https://github.com/ocaml/opam/issues/5836)
4443

4544
- name: Install graph-easy # TODO: remove if depext --with-test works
4645
if: ${{ matrix.os == 'ubuntu-latest' }}
@@ -73,7 +72,7 @@ jobs:
7372
os:
7473
- ubuntu-latest
7574
ocaml-compiler:
76-
- ocaml-variants.4.14.0+options,ocaml-option-flambda # matches opam lock file
75+
- ocaml-variants.4.14.2+options,ocaml-option-flambda # matches opam lock file
7776
# don't add any other because they won't be used
7877

7978
runs-on: ${{ matrix.os }}
@@ -87,10 +86,9 @@ jobs:
8786
# otherwise setup-ocaml pins non-locked dependencies
8887
# https://github.com/ocaml/setup-ocaml/issues/166
8988
OPAMLOCKED: locked
90-
uses: ocaml/setup-ocaml@v2
89+
uses: ocaml/setup-ocaml@v3
9190
with:
9291
ocaml-compiler: ${{ matrix.ocaml-compiler }}
93-
opam-depext-flags: --with-test # doesn't work (https://github.com/ocaml/opam/issues/5836)
9492

9593
- name: Install graph-easy # TODO: remove if depext --with-test works
9694
if: ${{ matrix.os == 'ubuntu-latest' }}
@@ -116,7 +114,7 @@ jobs:
116114
os:
117115
- ubuntu-latest
118116
ocaml-compiler:
119-
- ocaml-variants.4.14.0+options,ocaml-option-flambda # matches opam lock file
117+
- ocaml-variants.4.14.2+options,ocaml-option-flambda # matches opam lock file
120118
# don't add any other because they won't be used
121119
node-version:
122120
- 14
@@ -132,7 +130,7 @@ jobs:
132130
# otherwise setup-ocaml pins non-locked dependencies
133131
# https://github.com/ocaml/setup-ocaml/issues/166
134132
OPAMLOCKED: locked
135-
uses: ocaml/setup-ocaml@v2
133+
uses: ocaml/setup-ocaml@v3
136134
with:
137135
ocaml-compiler: ${{ matrix.ocaml-compiler }}
138136

.github/workflows/unlocked.yml

+7-10
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- 5.2.x
2222
- 5.1.x
2323
- 5.0.x
24-
- ocaml-variants.4.14.0+options,ocaml-option-flambda
24+
- ocaml-variants.4.14.2+options,ocaml-option-flambda
2525
- 4.14.x
2626
apron:
2727
- false
@@ -45,10 +45,9 @@ jobs:
4545
uses: actions/checkout@v4
4646

4747
- name: Set up OCaml ${{ matrix.ocaml-compiler }}
48-
uses: ocaml/setup-ocaml@v2
48+
uses: ocaml/setup-ocaml@v3
4949
with:
5050
ocaml-compiler: ${{ matrix.ocaml-compiler }}
51-
opam-depext-flags: --with-test # doesn't work (https://github.com/ocaml/opam/issues/5836)
5251

5352
- name: Install graph-easy # TODO: remove if depext --with-test works
5453
if: ${{ matrix.os == 'ubuntu-latest' }}
@@ -92,7 +91,7 @@ jobs:
9291
- ubuntu-latest
9392
- macos-13
9493
ocaml-compiler:
95-
- ocaml-variants.4.14.0+options,ocaml-option-flambda # matches opam lock file, downgrade deps step
94+
- ocaml-variants.4.14.2+options,ocaml-option-flambda # matches opam lock file, downgrade deps step
9695

9796
name: lower-bounds (${{ matrix.os }}, ${{ matrix.ocaml-compiler }}, downgrade)
9897

@@ -109,7 +108,6 @@ jobs:
109108
uses: ocaml/setup-ocaml@v2
110109
with:
111110
ocaml-compiler: ${{ matrix.ocaml-compiler }}
112-
opam-depext-flags: --with-test # doesn't work (https://github.com/ocaml/opam/issues/5836)
113111

114112
- name: Install graph-easy # TODO: remove if depext --with-test works
115113
if: ${{ matrix.os == 'ubuntu-latest' }}
@@ -133,7 +131,7 @@ jobs:
133131
- name: Downgrade dependencies
134132
# must specify ocaml-base-compiler again to prevent it from being downgraded
135133
# prevent num downgrade to avoid dune/jbuilder error: https://github.com/ocaml/dune/issues/5280
136-
run: opam install $(opam exec -- opam-0install --prefer-oldest goblint ocaml-variants.4.14.0+options ocaml-option-flambda num.1.5)
134+
run: opam install $(opam exec -- opam-0install --prefer-oldest goblint ocaml-variants.4.14.2+options ocaml-option-flambda num.1.5)
137135

138136
- name: Build
139137
run: ./make.sh nat
@@ -165,7 +163,7 @@ jobs:
165163

166164
- name: Build dev Docker image
167165
id: build
168-
uses: docker/build-push-action@v5
166+
uses: docker/build-push-action@v6
169167
with:
170168
context: .
171169
target: dev
@@ -190,7 +188,7 @@ jobs:
190188
- ubuntu-latest
191189
- macos-13
192190
ocaml-compiler:
193-
- ocaml-variants.4.14.0+options,ocaml-option-flambda # matches opam lock file
191+
- ocaml-variants.4.14.2+options,ocaml-option-flambda # matches opam lock file
194192

195193
runs-on: ${{ matrix.os }}
196194

@@ -199,10 +197,9 @@ jobs:
199197
uses: actions/checkout@v4
200198

201199
- name: Set up OCaml ${{ matrix.ocaml-compiler }}
202-
uses: ocaml/setup-ocaml@v2
200+
uses: ocaml/setup-ocaml@v3
203201
with:
204202
ocaml-compiler: ${{ matrix.ocaml-compiler }}
205-
opam-depext-flags: --with-test # doesn't work (https://github.com/ocaml/opam/issues/5836)
206203

207204
- name: Install graph-easy # TODO: remove if depext --with-test works
208205
if: ${{ matrix.os == 'ubuntu-latest' }}

.zenodo.json

+5
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@
2323
"affiliation": "Technische Universität München",
2424
"orcid": "0009-0009-9644-7475"
2525
},
26+
{
27+
"name": "Holter, Karoliine",
28+
"affiliation": "University of Tartu",
29+
"orcid": "0009-0008-3725-4131"
30+
},
2631
{
2732
"name": "Vogler, Ralf",
2833
"affiliation": "Technische Universität München"

CITATION.cff

+4
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ authors: # same authors as in .zenodo.json and dune-project
2121
family-names: Tilscher
2222
affiliation: "Technische Universität München"
2323
orcid: "https://orcid.org/0009-0009-9644-7475"
24+
- given-names: Karoliine
25+
family-names: Holter
26+
affiliation: "University of Tartu"
27+
orcid: "https://orcid.org/0009-0008-3725-4131"
2428
- given-names: Ralf
2529
family-names: Vogler
2630
affiliation: "Technische Universität München"

conf/examples/medium-program.json

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"base",
1010
"threadid",
1111
"threadflag",
12+
"threadreturn",
1213
"mallocWrapper",
1314
"mutexEvents",
1415
"mutex",
@@ -18,6 +19,7 @@
1819
"expRelation",
1920
"mhp",
2021
"assert",
22+
"pthreadMutexType",
2123
"var_eq",
2224
"symb_locks",
2325
"region",

conf/examples/very-precise.json

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"base",
2323
"threadid",
2424
"threadflag",
25+
"threadreturn",
2526
"mallocWrapper",
2627
"mutexEvents",
2728
"mutex",
@@ -31,6 +32,7 @@
3132
"expRelation",
3233
"mhp",
3334
"assert",
35+
"pthreadMutexType",
3436
"var_eq",
3537
"symb_locks",
3638
"region",

docs/developer-guide/firstanalysis.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ This program is in the Goblint repository: `tests/regression/99-tutorials/01-fir
3535
But if you run Goblint out of the box on this example, it will not work:
3636

3737
```console
38-
./goblint --enable warn.debug tests/regression/99-tutorials/01-first.c
38+
./goblint tests/regression/99-tutorials/01-first.c
3939
```
4040

4141
This will claim that the assertion in unknown.
@@ -74,10 +74,10 @@ For more information on the signature of the individual transfer functions, plea
7474
## Extending the domain
7575

7676
You could now enrich the lattice to also have a representation for non-negative (i.e., zero or positive) values.
77-
Then the join of `Zero` and `Pos` would be "non-negative" instead of `Top`, allowing you to prove that such join is greated than `Neg`.
77+
Then the join of `Zero` and `Pos` would be "non-negative" instead of `Top`, allowing you to prove that such join is greater than `Neg`.
7878
For example, have a look at the following program: `tests/regression/99-tutorials/02-first-extend.c`.
7979

8080
_Hint:_
8181
The easiest way to do this is to use the powerset lattice of `{-, 0, +}`.
8282
For example, "non-negative" is represented by `{0, +}`, while negative is represented by `{-}`.
83-
To do this, modify `SL` by using `SetDomain.FiniteSet` (takes a `struct` with a list of finite elements as second parameter) instead of `Lattice.Flat` and reimplementing the two functions using `singleton` and `for_all`.
83+
To do this, modify `SL` by using `SetDomain.FiniteSet` (which needs a finite list of elements to be added to `Signs`) instead of `Lattice.Flat` and reimplementing the two functions using `singleton` and `for_all`.

docs/user-guide/assumptions.md

+19
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,22 @@ _NB! This list is likely incomplete._
1717

1818
See [PR #1414](https://github.com/goblint/analyzer/pull/1414).
1919

20+
2. Pointer arithmetic does not overflow.
21+
22+
[C11's N1570][n1570] at 6.5.6.8 states that
23+
24+
> When an expression that has integer type is added to or subtracted from a pointer, the result has the type of the pointer operand.
25+
> [...]
26+
> the evaluation shall not produce an overflow; otherwise, the behavior is undefined.
27+
28+
after a long list of defined behaviors.
29+
30+
Goblint does not report overflow and out-of-bounds pointer arithmetic (when the pointer _is not dereferenced_).
31+
This affects the overflow analysis (SV-COMP no-overflow property) in the `base` analysis.
32+
33+
This _does not_ affect the `memOutOfBounds` analysis (SV-COMP valid-memsafety property), which is for undefined behavior from _dereferencing_ such out-of-bounds pointers.
34+
35+
See [PR #1511](https://github.com/goblint/analyzer/pull/1511).
36+
37+
38+
[n1570]: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf

dune-project

+16-3
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,34 @@
1515
(source (github goblint/analyzer))
1616
(homepage "https://goblint.in.tum.de")
1717
(documentation "https://goblint.readthedocs.io/en/latest/")
18-
(authors "Simmo Saan" "Michael Schwarz" "Julian Erhard" "Sarah Tilscher" "Ralf Vogler" "Kalmer Apinis" "Vesal Vojdani" ) ; same authors as in .zenodo.json and CITATION.cff
18+
(authors "Simmo Saan" "Michael Schwarz" "Julian Erhard" "Sarah Tilscher" "Karoliine Holter" "Ralf Vogler" "Kalmer Apinis" "Vesal Vojdani" ) ; same authors as in .zenodo.json and CITATION.cff
1919
(maintainers "Simmo Saan <[email protected]>" "Michael Schwarz <[email protected]>" "Karoliine Holter")
2020
(license MIT)
2121

2222
(package
2323
(name goblint)
2424
(synopsis "Static analysis framework for C")
25+
(description "\
26+
Goblint is a sound static analysis framework for C programs using abstract interpretation.
27+
It specializes in thread-modular verification of multi-threaded programs, especially regarding data races.
28+
Goblint includes analyses for assertions, overflows, deadlocks, etc and can be extended with new analyses.
29+
")
30+
(tags (
31+
"program analysis"
32+
"program verification"
33+
"static analysis"
34+
"abstract interpretation"
35+
"C"
36+
"data race analysis"
37+
"concurrency"))
2538
(depends
2639
(ocaml (>= 4.14))
2740
(goblint-cil (>= 2.0.3)) ; TODO no way to define as pin-depends? Used goblint.opam.template to add it for now. https://github.com/ocaml/dune/issues/3231. Alternatively, removing this line and adding cil as a git submodule and `(vendored_dirs cil)` as ./dune also works. This way, no more need to reinstall the pinned cil opam package on changes. However, then cil is cleaned and has to be rebuild together with goblint.
2841
(batteries (>= 3.5.1))
2942
(zarith (>= 1.10))
3043
(yojson (>= 2.0.0))
3144
(qcheck-core (>= 0.19))
32-
ppx_deriving
45+
(ppx_deriving (>= 6.0.2))
3346
(ppx_deriving_hash (>= 0.1.2))
3447
(ppx_deriving_yojson (>= 3.7.0))
3548
(ounit2 :with-test)
@@ -54,7 +67,7 @@
5467
conf-gcc ; ensures opam-repository CI installs real gcc from homebrew on MacOS
5568
)
5669
(depopts
57-
apron
70+
(apron (>= v0.9.15))
5871
z3
5972
)
6073
(conflicts

0 commit comments

Comments
 (0)