Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
e4e3297
Verify core::num::flt2dec memory safety (challenge #28)
MavenRain Jun 15, 2026
e104d40
Challenge #28: fix CI (autoharness debug-asserts + partition-2 OOM)
MavenRain Jun 16, 2026
9d5b396
Challenge #28: drop debug-assertions-off harnesses, revert
MavenRain Jun 22, 2026
c02f4fd
Challenge #28: make dragon stub harnesses robust to debug-assertion…
MavenRain Jun 24, 2026
6cbcdbc
Merge branch 'main' into verify-flt2dec-challenge-28
MavenRain Jul 8, 2026
8bc7ea2
Challenge #28: drop the unsound flt2dec proofs, verify format_exact_o…
MavenRain Aug 17, 2026
8a86a88
Merge remote-tracking branch 'fork/verify-flt2dec-challenge-28' into …
MavenRain Aug 17, 2026
ca4b548
Add direct flt2dec strategy harnesses with symbolic buffer lengths
MavenRain Sep 12, 2026
9739084
Use the core-compatible Kani coverage function
MavenRain Sep 12, 2026
eb897d4
Add a bounded rounding contract for flt2dec strategy proofs
MavenRain Sep 13, 2026
28c3b7e
Import core's Kani module in the rounding proofs
MavenRain Sep 13, 2026
41e1d36
Use Kissat for the direct flt2dec generator proofs
MavenRain Sep 13, 2026
102b1a2
Serialize CI verification for partition 2
MavenRain Sep 13, 2026
6c28835
Give autoharness proofs a serial execution budget
MavenRain Sep 13, 2026
1ab9926
Preserve thread labels in serial CI logs
MavenRain Sep 13, 2026
c68c227
Support serial Kani verification in PR CI
MavenRain Sep 13, 2026
bc720cc
Partition floating-point generator proofs by exponent
MavenRain Sep 13, 2026
e9c5e45
Report failed and timed-out Kani proofs promptly
MavenRain Sep 13, 2026
b396b58
ci: trust the existing CBMC tap on macOS runners
MavenRain Sep 13, 2026
d66a5d7
Add a storage contract for bounded Dragon division
MavenRain Sep 13, 2026
d989659
Avoid panics in the division contract's old expression
MavenRain Sep 13, 2026
a1b733a
Check flt2dec proof families independently in CI
MavenRain Sep 13, 2026
cc01efe
Reduce symbolic iteration in flt2dec contract predicates
MavenRain Sep 13, 2026
5ff6a97
Probe flt2dec verification with a fixed binary exponent
MavenRain Sep 13, 2026
8ece960
Decompose the flt2dec bigint division contract by limb
MavenRain Sep 13, 2026
3ebd8e7
Run focused flt2dec proofs with CVC5 and preserve contract diagnostics
MavenRain Sep 13, 2026
23192a4
Avoid recursive substitution in the bigint division contract proof
MavenRain Sep 13, 2026
40e3b33
Retain harness solvers after the CVC5 translation failure
MavenRain Sep 13, 2026
058cfa7
Scope Dragon unwind limits to the float input family
MavenRain Sep 13, 2026
39e2996
Give f32 and f64 generator proofs independent CI jobs
MavenRain Sep 13, 2026
e7bd2d5
Verify the bigint limb loop independently of power-of-ten division
MavenRain Sep 13, 2026
2c1cad5
Match the bigint division adapter return type
MavenRain Sep 13, 2026
dc8fc03
Limit bigint division contracts to their writable limbs
MavenRain Sep 13, 2026
c5d48b4
Keep bounded generator lengths narrow during symbolic execution
MavenRain Sep 13, 2026
b3072db
Prove equivalence of constant-index bigint comparison models
MavenRain Sep 13, 2026
26975f9
Use Grisu exact mode's error counter to bound loop unwinding
MavenRain Sep 13, 2026
67718cc
Use Kani's default symbolic object capacity
MavenRain Sep 13, 2026
4e233ff
Keep bigint comparison models linear in their limb count
MavenRain Sep 13, 2026
d701b3d
Select symbolic object capacity for each CI proof kind
MavenRain Sep 13, 2026
94f5b7c
Match bigint comparison models to the real active prefixes
MavenRain Sep 13, 2026
f08eb0d
Compose Grisu exact proofs with a final-rounding contract
MavenRain Sep 13, 2026
98b3aef
Keep unused bigint size bits concrete in the equivalence proof
MavenRain Sep 13, 2026
5c22322
Keep the Grisu rounding contract's write set empty
MavenRain Sep 13, 2026
9b887fd
Check bigint model equivalence without a function write frame
MavenRain Sep 13, 2026
04a312c
Compose Grisu shortest with an independent final-rounding proof
MavenRain Sep 13, 2026
5a14fbb
Reduce rounding contract argument tracking
MavenRain Sep 13, 2026
1f6ea34
Compare CBMC encodings in focused flt2dec probes
MavenRain Sep 13, 2026
98e050b
Use an additive shortest-rounding stopping predicate
MavenRain Sep 13, 2026
946da21
Probe a smaller object table for Grisu exact
MavenRain Sep 13, 2026
e5cfcf6
Reduce exact-rounding contract call state
MavenRain Sep 13, 2026
81de91a
Restore sufficient object capacity for the exact Grisu probe
MavenRain Sep 13, 2026
431e679
Add exact bit-scan models with independent equivalence proof
MavenRain Sep 13, 2026
49acde4
Share Grisu exact rounding across generator exits
MavenRain Sep 13, 2026
0bbe551
Share Grisu shortest rounding across generator exits
MavenRain Sep 14, 2026
5a571b3
Add an exact estimator model with independent equivalence proof
MavenRain Sep 14, 2026
df8bbbb
Use scalar inputs for the shortest-rounding contract
MavenRain Sep 14, 2026
c108d77
Split estimator equivalence and bound CI proof batches
MavenRain Sep 14, 2026
d8c4abe
Give generator proofs more time within bounded CI batches
MavenRain Sep 14, 2026
c9e6a24
Expose checked constant scaling in Dragon diagnostic proofs
MavenRain Sep 14, 2026
ee24d41
Expose checked exponent bits in Dragon proofs
MavenRain Sep 14, 2026
c4a9310
Assign flt2dec proofs once per operating system
MavenRain Sep 14, 2026
6aaa21e
Merge main to restore PR CI
MavenRain Sep 14, 2026
5a269ad
Expose checked bigint counts in Dragon diagnostics
MavenRain Sep 14, 2026
559e45f
Check constant cached-power selection in Grisu probes
MavenRain Sep 14, 2026
1dd861f
Check bigint arithmetic models in Dragon diagnostics
MavenRain Sep 14, 2026
0e3ea78
Allow composed Kani stubs to expand in core
MavenRain Sep 14, 2026
6915963
Give Grisu shortest proofs more time in smaller CI batches
MavenRain Sep 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 96 additions & 8 deletions .github/workflows/kani.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ on:
- 'library/**'
- '.github/workflows/kani.yml'
- 'scripts/run-kani.sh'
- 'scripts/kani-std-analysis/flt2dec_harnesses.py'
- 'scripts/kani-std-analysis/test_flt2dec_harnesses.py'

defaults:
run:
Expand All @@ -35,10 +37,10 @@ jobs:
WORKER_INDEX: ${{ matrix.partition }}
# Total number of workers running this step
WORKER_TOTAL: 4
# Cap parallel harness verification on ubuntu-latest: its 4-core/16 GB
# runners get OOM-killed when 4 memory-hungry harnesses (up to ~10 GB
# each, e.g. the ffi::c_str ones) run concurrently.
KANI_JOBS: ${{ matrix.os == 'ubuntu-latest' && 2 || '' }}
# The same catalog assigns every excluded proof to a dedicated job on each OS.
KANI_SEPARATE_FLT2DEC: "true"
# Run one verifier per runner to bound proof concurrency.
KANI_JOBS: 1

steps:
- name: Remove unnecessary software to free up disk space
Expand All @@ -61,10 +63,86 @@ jobs:
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get install -y jq

# Step 3: Run Kani on the std library (default configuration)
- name: Trust CBMC Homebrew tap
if: runner.os == 'macOS'
run: brew trust --tap diffblue/cbmc

# Step 3: Run Kani on the std library
- name: Run Kani Verification
run: head/scripts/run-kani.sh --path ${{github.workspace}}/head
run: |
# Run one proof at a time on each runner.
export KANI_JOBS=1
export RAYON_NUM_THREADS=1
head/scripts/run-kani.sh --path ${{github.workspace}}/head \
--kani-args --harness-timeout 30m --fail-fast

flt2dec_matrix:
name: Prepare flt2dec proof groups
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.groups.outputs.matrix }}
steps:
- uses: actions/checkout@v4
- name: Check proof routing
run: python3 -I -m unittest discover -s scripts/kani-std-analysis -p test_flt2dec_harnesses.py
- name: Build proof matrix
id: groups
run: |
flt2dec_matrix=$(python3 -I scripts/kani-std-analysis/flt2dec_harnesses.py --matrix)
printf 'matrix=%s\n' "$flt2dec_matrix" >> "$GITHUB_OUTPUT"

check-flt2dec:
name: Verify flt2dec (${{ matrix.group.name }}, ${{ matrix.os }})
needs: flt2dec_matrix
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.flt2dec_matrix.outputs.matrix) }}
env:
KANI_JOBS: 1
RAYON_NUM_THREADS: 1
KANI_HARNESS_TIMEOUT: ${{ matrix.group.timeout_minutes }}m
KANI_OBJECT_BITS: ${{ (matrix.group.kind == 'contract' || matrix.group.kind == 'equivalence') && '12' || '14' }}
# Compare encoding cost on the probes before changing full-domain jobs.
KANI_SYMEX_CACHE_DEREFERENCES: ${{ matrix.group.kind == 'probe' && 'true' || 'false' }}
KANI_ARRAY_FIELD_SENSITIVITY: ${{ matrix.group.kind == 'probe' && 'false' || 'true' }}
HARNESS_GROUP: ${{ matrix.group.name }}
HARNESS_KIND: ${{ matrix.group.kind }}
steps:
- name: Remove unnecessary software to free up disk space
if: matrix.os == 'ubuntu-latest'
run: |
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /usr/local/.ghcup

- name: Checkout Repository
uses: actions/checkout@v4
with:
path: head
submodules: true

- name: Trust CBMC Homebrew tap
if: runner.os == 'macOS'
run: brew trust --tap diffblue/cbmc

- name: Verify selected proof groups
run: |
# Keep every group within four hours of proof budgets per job:
# two 120-minute or four 60-minute generators, or eight 30-minute cases.
harness_names=$(python3 -I head/scripts/kani-std-analysis/flt2dec_harnesses.py --group "$HARNESS_GROUP")
harness_args=()
while IFS= read -r harness; do
[[ -n "$harness" ]] || exit 1
harness_args+=(--harness "$harness")
done <<< "$harness_names"
output_format=terse
if [[ "$HARNESS_KIND" == contract || "$HARNESS_KIND" == equivalence || "$HARNESS_KIND" == probe ]]; then
output_format=regular
fi
printf 'Selected %s harnesses\n' "$(( ${#harness_args[@]} / 2 ))"
head/scripts/run-kani.sh --path "${GITHUB_WORKSPACE}/head" \
--kani-args --jobs 1 --harness-timeout "$KANI_HARNESS_TIMEOUT" --fail-fast --output-format="$output_format" \
--exact "${harness_args[@]}"

kani_autoharness:
name: Verify std library using autoharness
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -93,6 +171,10 @@ jobs:
with:
submodules: true

- name: Trust CBMC Homebrew tap
if: runner.os == 'macOS'
run: brew trust --tap diffblue/cbmc

# Step 2: Run Kani autoharness on the std library for selected functions.
# Uses "--include-pattern" to make sure we do not try to run across all
# possible functions as that may take a lot longer than expected. Instead,
Expand All @@ -103,6 +185,8 @@ jobs:
# core_arch::x86:: functions that are known to verify successfully.
- name: Run Kani Verification
run: |
python3 -I -B -m unittest discover \
-s scripts/kani-std-analysis -p test_log_parser.py
scripts/run-kani.sh --run autoharness --kani-args \
--include-pattern "<(.+)[[:space:]]as[[:space:]](.+)>::disjoint_bitor" \
--include-pattern "<(.+)[[:space:]]as[[:space:]](.+)>::unchecked_disjoint_bitor" \
Expand Down Expand Up @@ -207,9 +291,9 @@ jobs:
--exclude-pattern time::Duration::from_secs_f \
--include-pattern unicode::unicode_data::conversions::to_ \
--exclude-pattern ::precondition_check \
--harness-timeout 10m \
--harness-timeout 30m --fail-fast \
--default-unwind 1000 \
--jobs=3 --output-format=terse | tee autoharness-verification.log
--jobs=1 --output-format=terse | tee autoharness-verification.log
gzip autoharness-verification.log

- name: Upload Autoharness Verification Log
Expand Down Expand Up @@ -255,6 +339,10 @@ jobs:
with:
python-version: '3.x'

- name: Trust CBMC Homebrew tap
if: runner.os == 'macOS'
run: brew trust --tap diffblue/cbmc

# Step 2: Run list on the std library
- name: Run Kani Metrics
run: |
Expand Down
2 changes: 2 additions & 0 deletions library/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@
#![no_core]
#![rustc_coherence_is_core]
#![rustc_preserve_ub_checks]
// Composed Kani stubs require more macro expansion depth.
#![cfg_attr(kani, recursion_limit = "256")]
//
// Lints:
#![deny(rust_2021_incompatible_or_patterns)]
Expand Down
Loading
Loading