Skip to content

Commit 3eaa7f5

Browse files
committed
Merge branch 'master' into assert-ptr
2 parents 3694620 + e27c85d commit 3eaa7f5

File tree

505 files changed

+15500
-6396
lines changed

Some content is hidden

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

505 files changed

+15500
-6396
lines changed

.gitattributes

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# GitHub repository language overrides
2+
# https://github.com/github-linguist/linguist/blob/main/docs/overrides.md
3+
4+
# currently only dune-project is classified: https://github.com/github-linguist/linguist/pull/7126
5+
dune linguist-language=dune
6+
dune.inc linguist-language=dune
7+
8+
# avoid misclassification as Standard ML
9+
*.ml linguist-language=ocaml
10+
*.mli linguist-language=ocaml
11+
12+
# cram tests are classified as Raku/Terra/Turing, cram isn't separate language so consider them also dune
13+
*.t linguist-language=dune

.github/workflows/coverage.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,16 @@ jobs:
3939
with:
4040
ocaml-compiler: ${{ matrix.ocaml-compiler }}
4141

42-
- name: Install graph-easy # TODO: remove if depext --with-test works
42+
- name: Install graph-easy # TODO: remove if depext --with-test works (https://github.com/ocaml/opam/issues/5836)
4343
if: ${{ matrix.os == 'ubuntu-22.04' }}
4444
run: sudo apt install -y libgraph-easy-perl
4545

4646
- name: Install dependencies
4747
run: opam install . --deps-only --locked --with-test
4848

49+
- name: Install os gem for operating system detection
50+
run: sudo gem install os
51+
4952
- name: Install coverage dependencies
5053
run: opam install bisect_ppx
5154

.github/workflows/locked.yml

Lines changed: 8 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,16 @@ jobs:
4141
with:
4242
ocaml-compiler: ${{ matrix.ocaml-compiler }}
4343

44-
- name: Install graph-easy # TODO: remove if depext --with-test works
44+
- name: Install graph-easy # TODO: remove if depext --with-test works (https://github.com/ocaml/opam/issues/5836)
4545
if: ${{ matrix.os == 'ubuntu-22.04' }}
4646
run: sudo apt install -y libgraph-easy-perl
4747

4848
- name: Install dependencies
4949
run: opam install . --deps-only --locked --with-test
5050

51+
- name: Install os gem for operating system detection
52+
run: sudo gem install os
53+
5154
- name: Build
5255
run: ./make.sh nat
5356

@@ -90,7 +93,7 @@ jobs:
9093
with:
9194
ocaml-compiler: ${{ matrix.ocaml-compiler }}
9295

93-
- name: Install graph-easy # TODO: remove if depext --with-test works
96+
- name: Install graph-easy # TODO: remove if depext --with-test works (https://github.com/ocaml/opam/issues/5836)
9497
if: ${{ matrix.os == 'ubuntu-22.04' }}
9598
run: sudo apt install -y libgraph-easy-perl
9699

@@ -100,60 +103,11 @@ jobs:
100103
- name: Install dependencies
101104
run: opam install . --deps-only --locked --with-test
102105

106+
- name: Install os gem for operating system detection
107+
run: sudo gem install os
108+
103109
- name: Build
104110
run: ./make.sh nat
105111

106112
- name: Test extraction
107113
run: opam exec -- dune runtest tests/extraction
108-
109-
110-
gobview:
111-
strategy:
112-
fail-fast: false
113-
matrix:
114-
os:
115-
- ubuntu-22.04 # https://github.com/ocaml/setup-ocaml/issues/872
116-
ocaml-compiler:
117-
- ocaml-variants.4.14.2+options,ocaml-option-flambda # matches opam lock file
118-
# don't add any other because they won't be used
119-
node-version:
120-
- 14
121-
122-
runs-on: ${{ matrix.os }}
123-
124-
steps:
125-
- name: Checkout code
126-
uses: actions/checkout@v4
127-
128-
- name: Set up OCaml ${{ matrix.ocaml-compiler }}
129-
env:
130-
# otherwise setup-ocaml pins non-locked dependencies
131-
# https://github.com/ocaml/setup-ocaml/issues/166
132-
OPAMLOCKED: locked
133-
uses: ocaml/setup-ocaml@v3
134-
with:
135-
ocaml-compiler: ${{ matrix.ocaml-compiler }}
136-
137-
- name: Set up Node.js ${{ matrix.node-version }}
138-
uses: actions/setup-node@v4
139-
with:
140-
node-version: ${{ matrix.node-version }}
141-
142-
- name: Install dependencies
143-
run: opam install . --deps-only --locked
144-
145-
- name: Setup Gobview
146-
run: ./make.sh setup_gobview
147-
148-
- name: Build
149-
run: ./make.sh nat
150-
151-
- name: Build Gobview
152-
run: ./make.sh view
153-
154-
- name: Install selenium
155-
run: pip3 install selenium webdriver-manager
156-
157-
- name: Test Gobview
158-
run: |
159-
python3 scripts/test-gobview.py

.github/workflows/unlocked.yml

Lines changed: 63 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -51,24 +51,23 @@ jobs:
5151
with:
5252
ocaml-compiler: ${{ matrix.ocaml-compiler }}
5353

54-
- name: Install graph-easy # TODO: remove if depext --with-test works
54+
- name: Install graph-easy # TODO: remove if depext --with-test works (https://github.com/ocaml/opam/issues/5836)
5555
if: ${{ matrix.os == 'ubuntu-22.04' }}
5656
run: sudo apt install -y libgraph-easy-perl
5757

5858
- name: Install dependencies
5959
run: opam install . --deps-only --with-test
6060

61+
- name: Install os gem for operating system detection
62+
run: sudo gem install os
63+
6164
- name: Install Apron dependencies
6265
if: ${{ matrix.apron }}
63-
run: |
64-
opam depext apron
65-
opam install apron mlgmpidl.1.2.15
66+
run: opam install apron mlgmpidl.1.2.15
6667

6768
- name: Install Z3 dependencies
6869
if: ${{ matrix.z3 }}
69-
run: |
70-
opam depext z3
71-
opam install z3
70+
run: opam install z3
7271

7372
- name: Build
7473
run: ./make.sh nat
@@ -83,57 +82,44 @@ jobs:
8382
run: ruby scripts/update_suite.rb -m
8483

8584
lower-bounds-downgrade:
86-
# use external 0install solver to downgrade: https://github.com/ocaml-opam/opam-0install-solver
87-
# TODO: will be built in in opam 2.2: https://github.com/ocaml/opam/pull/4909
88-
8985
strategy:
9086
fail-fast: false
9187
matrix:
9288
os:
9389
- ubuntu-22.04 # https://github.com/ocaml/setup-ocaml/issues/872
9490
- macos-13
9591
ocaml-compiler:
96-
- ocaml-variants.4.14.2+options,ocaml-option-flambda # matches opam lock file, downgrade deps step
92+
- ocaml-variants.4.14.2+options,ocaml-option-flambda # matches opam lock file
9793

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

10096
runs-on: ${{ matrix.os }}
10197

102-
env:
103-
OPAMCONFIRMLEVEL: unsafe-yes # allow opam depext to yes package manager prompts
104-
10598
steps:
10699
- name: Checkout code
107100
uses: actions/checkout@v4
108101

109102
- name: Set up OCaml ${{ matrix.ocaml-compiler }}
110-
uses: ocaml/setup-ocaml@v2
103+
uses: ocaml/setup-ocaml@v3
111104
with:
112105
ocaml-compiler: ${{ matrix.ocaml-compiler }}
113106

114-
- name: Install graph-easy # TODO: remove if depext --with-test works
107+
- name: Install graph-easy # TODO: remove if depext --with-test works (https://github.com/ocaml/opam/issues/5836)
115108
if: ${{ matrix.os == 'ubuntu-22.04' }}
116109
run: sudo apt install -y libgraph-easy-perl
117110

118111
- name: Install dependencies
119112
run: opam install . --deps-only --with-test
120113

121-
- name: Install Apron dependencies
122-
run: |
123-
opam depext apron
124-
opam install apron mlgmpidl.1.2.15
114+
- name: Install os gem for operating system detection
115+
run: sudo gem install os
125116

126-
- name: Build
127-
if: ${{ false }}
128-
run: ./make.sh nat
129-
130-
- name: Install opam-0install
131-
run: opam install opam-0install
117+
- name: Install Apron dependencies
118+
run: opam install apron mlgmpidl.1.2.15
132119

133120
- name: Downgrade dependencies
134-
# must specify ocaml-base-compiler again to prevent it from being downgraded
135-
# 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.2+options ocaml-option-flambda num.1.5)
121+
# without "+removed" in criteria, because it also removes optional apron
122+
run: opam install --solver=builtin-0install --criteria="+count[version-lag,solution]" . --deps-only --with-test
137123

138124
- name: Build
139125
run: ./make.sh nat
@@ -147,41 +133,6 @@ jobs:
147133
- name: Test marshal regression # not part of @runtest due to time
148134
run: ruby scripts/update_suite.rb -m
149135

150-
lower-bounds-docker:
151-
# use builtin-0install solver to remove and downgrade, opam normally compiled without, Docker images have it compiled
152-
153-
if: ${{ false }}
154-
155-
name: lower-bounds (docker)
156-
157-
runs-on: ubuntu-latest
158-
159-
steps:
160-
- name: Checkout code
161-
uses: actions/checkout@v4
162-
163-
- name: Set up Docker Buildx
164-
uses: docker/setup-buildx-action@v3 # needed for GitHub Actions Cache in build-push-action
165-
166-
- name: Build dev Docker image
167-
id: build
168-
uses: docker/build-push-action@v6
169-
with:
170-
context: .
171-
target: dev
172-
load: true # load into docker instead of immediately pushing
173-
tags: dev
174-
cache-from: type=gha
175-
cache-to: type=gha,mode=max # max mode caches all layers for multi-stage image
176-
177-
- name: Run opam downgrade and tests in dev Docker image
178-
uses: addnab/docker-run-action@v3
179-
with:
180-
image: dev
181-
run: |
182-
OPAMCRITERIA=+removed,+count[version-lag,solution] OPAMEXTERNALSOLVER=builtin-0install opam-2.1 install . --deps-only --with-test --confirm-level=unsafe-yes
183-
opam exec -- dune runtest
184-
185136
opam-install:
186137
strategy:
187138
fail-fast: false
@@ -203,17 +154,15 @@ jobs:
203154
with:
204155
ocaml-compiler: ${{ matrix.ocaml-compiler }}
205156

206-
- name: Install graph-easy # TODO: remove if depext --with-test works
157+
- name: Install graph-easy # TODO: remove if depext --with-test works (https://github.com/ocaml/opam/issues/5836)
207158
if: ${{ matrix.os == 'ubuntu-22.04' }}
208159
run: sudo apt install -y libgraph-easy-perl
209160

210161
- name: Install Goblint with test
211162
run: opam install goblint --with-test
212163

213164
- name: Install Apron dependencies
214-
run: |
215-
opam depext apron
216-
opam install apron mlgmpidl.1.2.15
165+
run: opam install apron mlgmpidl.1.2.15
217166

218167
- name: Symlink installed goblint to repository # because tests want to use locally built one
219168
run: ln -s $(opam exec -- which goblint) goblint
@@ -251,3 +200,49 @@ jobs:
251200

252201
- name: Test incremental regression with cfg comparison
253202
run: ruby scripts/update_suite.rb -c
203+
204+
gobview:
205+
strategy:
206+
fail-fast: false
207+
matrix:
208+
os:
209+
- ubuntu-22.04 # https://github.com/ocaml/setup-ocaml/issues/872
210+
ocaml-compiler:
211+
- ocaml-variants.5.0.0+options,ocaml-option-flambda
212+
node-version:
213+
- 14
214+
215+
runs-on: ${{ matrix.os }}
216+
217+
steps:
218+
- name: Checkout code
219+
uses: actions/checkout@v4
220+
221+
- name: Set up OCaml ${{ matrix.ocaml-compiler }}
222+
uses: ocaml/setup-ocaml@v3
223+
with:
224+
ocaml-compiler: ${{ matrix.ocaml-compiler }}
225+
226+
- name: Set up Node.js ${{ matrix.node-version }}
227+
uses: actions/setup-node@v4
228+
with:
229+
node-version: ${{ matrix.node-version }}
230+
231+
- name: Install dependencies
232+
run: opam install . --deps-only
233+
234+
- name: Setup Gobview
235+
run: ./make.sh setup_gobview
236+
237+
- name: Build
238+
run: ./make.sh nat
239+
240+
- name: Build Gobview
241+
run: ./make.sh view
242+
243+
- name: Install selenium
244+
run: pip3 install selenium webdriver-manager
245+
246+
- name: Test Gobview
247+
run: |
248+
python3 scripts/test-gobview.py

.semgrep/batenum.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
rules:
2+
- id: batenum-module
3+
pattern-either:
4+
- pattern: BatEnum.$F
5+
- pattern: Enum.$F
6+
message: use Seq.$F instead
7+
languages: [ocaml]
8+
severity: WARNING
9+
10+
- id: batenum-of_enum
11+
patterns:
12+
- pattern: $M.of_enum
13+
- metavariable-pattern:
14+
metavariable: $M
15+
pattern-regex: ^[A-Z].*
16+
message: use $M.of_seq instead
17+
languages: [ocaml]
18+
severity: WARNING
19+
20+
- id: batenum-enum
21+
patterns:
22+
- pattern: $M.enum
23+
- metavariable-pattern:
24+
metavariable: $M
25+
pattern-regex: ^[A-Z].*
26+
message: use $M.to_seq instead
27+
languages: [ocaml]
28+
severity: WARNING

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2005-2021 University of Tartu & Technische Universität München.
3+
Copyright (c) 2005-2025 University of Tartu & Technische Universität München.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,6 @@ For further information, see [documentation](https://goblint.readthedocs.io/en/l
6060

6161
## Acknowledgements
6262

63-
Work on Goblint was supported in part by Deutsche Forschungsgemeinschaft (DFG) (47140942/1480 [PUMA](https://gepris.dfg.de/gepris/projekt/4714094), 378803395/2428 [ConVeY](http://convey.in.tum.de)), ARTEMIS Joint Undertaking (269335 [MBAT](http://www.mbat-artemis.eu/home/)), ITEA3 project 14014 [ASSUME](http://assume-project.eu/), the Shota Rustaveli National Science Foundation of Georgia [FR-21-7973](https://viam.science.tsu.ge/new/index.php?lang=eng&page=projects&subpage=111), the Estonian Research Council ([IUT2-1](https://www.etis.ee/Portal/Projects/Display/561b7b1d-d1dd-43a2-90e5-0661de823823?lang=ENG), [PSG61](https://www.etis.ee/Portal/Projects/Display/743243bb-15c2-47b3-9c10-e7d86a9a276d?lang=ENG)), and the Estonian Centre of Excellence in IT (EXCITE), funded by the European Regional Development Fund.
63+
Work on Goblint was supported in part by Deutsche Forschungsgemeinschaft (DFG) (47140942/1480 [PUMA](https://gepris.dfg.de/gepris/projekt/4714094), 378803395/2428 [ConVeY](http://convey.in.tum.de)), ARTEMIS Joint Undertaking (269335 MBAT), ITEA3 project 14014 ASSUME, the Shota Rustaveli National Science Foundation of Georgia [FR-21-7973](https://viam.science.tsu.ge/new/index.php?lang=eng&page=projects&subpage=111), the Estonian Research Council ([IUT2-1](https://www.etis.ee/Portal/Projects/Display/561b7b1d-d1dd-43a2-90e5-0661de823823?lang=ENG), [PSG61](https://www.etis.ee/Portal/Projects/Display/743243bb-15c2-47b3-9c10-e7d86a9a276d?lang=ENG)), and the Estonian Centre of Excellence in IT (EXCITE), funded by the European Regional Development Fund.
6464

65-
We also thank [Zulip](https://zulip.com) for providing free Zulip Cloud Standard hosting for the Goblint project. Zulip is an open-source modern team chat app designed to keep both live and asynchronous conversations organized.
65+
We also thank [Zulip](https://zulip.com) for providing free Zulip Cloud Standard hosting for the Goblint project. Zulip is an open-source modern team chat app designed to keep both live and asynchronous conversations organized.

bench/basic/benchTuple4.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ open Benchmark.Tree
77
let () =
88
let exists0 =
99
let open Batteries in
10-
let to_list x = Tuple4.enum x |> List.of_enum |> List.filter_map identity in
10+
let to_list (a,b,c,d) = List.filter_map identity [a;b;c;d] in
1111
let f g = g identity % to_list in
1212
List.(f exists)
1313
in
@@ -74,7 +74,7 @@ let () =
7474
let () =
7575
let for_all0 =
7676
let open Batteries in
77-
let to_list x = Tuple4.enum x |> List.of_enum |> List.filter_map identity in
77+
let to_list (a,b,c,d) = List.filter_map identity [a;b;c;d] in
7878
let f g = g identity % to_list in
7979
List.(f for_all)
8080
in

0 commit comments

Comments
 (0)