Skip to content

Commit f6b7fc7

Browse files
committed
nix: Pull CBMC 6.9.0 from nixos-unstable binary cache
CBMC 6.9.0 is now available in nixos-unstable, so we can fetch it prebuilt instead of rebuilding from source. Also drop the standalone cadical binary from the CBMC package env, the CI version-summary line, and print_tool_versions.py: cbmc bundles its own cadical internally, so the standalone one on PATH did not reflect the solver actually used. Signed-off-by: Matthias J. Kannwischer <matthias@zerorisc.com>
1 parent e2b5920 commit f6b7fc7

6 files changed

Lines changed: 9 additions & 75 deletions

File tree

.github/actions/cbmc/action.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ runs:
4646
- $(nix --version)
4747
- $(cbmc --version)
4848
- litani Version $(litani --version)
49-
- Cadical Version $(cadical --version)
5049
- $(bash --version | grep -m1 "")
5150
EOF
5251
- name: Run CBMC proofs (MLKEM_K=${{ inputs.mlkem_k }})

flake.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
pkgs-unstable = inputs.nixpkgs-unstable.legacyPackages.${system};
2626
pkgs-2405 = inputs.nixpkgs-2405.legacyPackages.${system};
2727
util = pkgs.callPackage ./nix/util.nix {
28-
inherit (pkgs) cbmc bitwuzla z3;
28+
inherit (pkgs) bitwuzla z3;
29+
inherit (pkgs-unstable) cbmc;
2930
# TODO: switch back to stable python3 for slothy once ortools is fixed in 25.11
3031
python3-for-slothy = pkgs-unstable.python3;
3132
};
@@ -223,7 +224,8 @@
223224
pkgs-unstable = inputs.nixpkgs-unstable.legacyPackages.x86_64-linux;
224225
util = pkgs.callPackage ./nix/util.nix {
225226
inherit pkgs;
226-
inherit (pkgs) cbmc bitwuzla z3;
227+
inherit (pkgs) bitwuzla z3;
228+
inherit (pkgs-unstable) cbmc;
227229
# TODO: switch back to stable python3 for slothy once ortools is fixed in 25.11
228230
python3-for-slothy = pkgs-unstable.python3;
229231
};

nix/cbmc/0002-Do-not-download-sources-in-cmake.patch

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

nix/cbmc/default.nix

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,37 +7,25 @@
77
, callPackage
88
, bitwuzla
99
, ninja
10-
, cadical
1110
, z3
12-
, cudd
13-
, replaceVars
14-
, fetchpatch
1511
}:
1612

1713
buildEnv {
1814
name = "pqcp-cbmc";
1915
paths =
2016
builtins.attrValues {
21-
cbmc = cbmc.overrideAttrs (old: rec {
17+
cbmc = cbmc.overrideAttrs (_: {
2218
version = "6.9.0";
2319
src = fetchFromGitHub {
2420
owner = "diffblue";
2521
repo = "cbmc";
2622
hash = "sha256-SMJBnzoyTwcwJa9L2X1iX2W4Z/Mwoirf8EXfoyG0dRI=";
2723
tag = "cbmc-6.9.0";
2824
};
29-
srccadical = cadical.src;
30-
patches = [
31-
(builtins.elemAt old.patches 0) # cudd patch from nixpkgs
32-
./0002-Do-not-download-sources-in-cmake.patch
33-
];
34-
env = old.env // {
35-
NIX_CFLAGS_COMPILE = (old.env.NIX_CFLAGS_COMPILE or "") + " -Wno-error=switch-enum";
36-
};
3725
});
3826
litani = callPackage ./litani.nix { }; # 1.29.0
3927
cbmc-viewer = callPackage ./cbmc-viewer.nix { }; # 3.12
40-
z3 = z3.overrideAttrs (old: rec {
28+
z3 = z3.overrideAttrs (_: {
4129
version = "4.15.3";
4230
src = fetchFromGitHub {
4331
owner = "Z3Prover";
@@ -48,7 +36,6 @@ buildEnv {
4836
});
4937

5038
inherit
51-
cadical# 3.0.0
5239
bitwuzla# 0.8.2
5340
ninja; # 1.13.2
5441
};

proofs/cbmc/lib/print_tool_versions.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212

1313
_TOOLS = [
14-
"cadical",
1514
"cbmc",
1615
"cbmc-viewer",
1716
"litani",

0 commit comments

Comments
 (0)