Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
254757d
Add KNOWNBUG test for fmaf double rounding (Float-fma-precision1)
tautschnig Mar 24, 2026
317715e
Add KNOWNBUG SMT-LIB test for fp.fma on non-standard sort (Z3#6674)
tautschnig Mar 24, 2026
8238cb0
Add KNOWNBUG SMT-LIB tests for fp.fma (Z3#6117, Z3#7162, CVC5#11139)
tautschnig Mar 24, 2026
a0244e5
Add KNOWNBUG test for fp.fma
tautschnig Mar 24, 2026
307e18c
Implement fused multiply-add (FMA) in float_utilst
tautschnig Mar 19, 2026
bcb7930
Add __CPROVER_fma built-in and floatbv_fma_exprt expression
tautschnig Mar 19, 2026
1a998bc
Add FMA special-case tests: NaN, infinity, 0*inf
tautschnig Mar 24, 2026
084336d
Add SMT2 FPA backend tests for fp.fma emission
tautschnig Mar 24, 2026
ec84464
Add end-to-end SMT FPA test for FMA special cases
tautschnig Mar 24, 2026
0c1f138
cbmc-incr-smt2: Add test suffix to avoid intermittent failures
tautschnig Mar 24, 2026
4334489
Remove dead #if 0 block in boolbv_mod.cpp
tautschnig Mar 22, 2026
b2fec73
Introduce ID_floatbv_mod to distinguish fmod from IEEE remainder
tautschnig Mar 19, 2026
ae924fe
Use __CPROVER_fmod and __CPROVER_remainder built-ins in C library
tautschnig Mar 19, 2026
3ecb3ce
Fix float_utilst::rem crash and distinguish fmod from remainder
tautschnig Mar 19, 2026
929f628
Add fmod and remainder support to SMT2 and float_bvt back-ends
tautschnig Mar 19, 2026
54b7086
Update fmod/fmodf/fmodl regression tests
tautschnig Mar 23, 2026
4f28dde
Update remainder/remainderf/remainderl regression tests
tautschnig Mar 23, 2026
ed3ec15
Add remainderf edge case test
tautschnig Mar 23, 2026
41d426b
Add remainderf tie-break test
tautschnig Mar 23, 2026
2b6a4d1
Add Java fmod regression test (farith2)
tautschnig Mar 23, 2026
593e462
Add fp.rem regression tests (Z3#2381, Z3#8414)
tautschnig Mar 24, 2026
f8543bb
Implement fused multiply-add (FMA) in float_utilst
tautschnig Mar 19, 2026
585d120
Use FMA for IEEE remainder correction in float_utilst
tautschnig Mar 19, 2026
108f2bc
Add _Float16 variants of fmod/remainder/fma built-ins
tautschnig Mar 20, 2026
d72e961
Add Coq proof and documentation for FMA-based remainder
tautschnig Mar 24, 2026
bc72c54
Add HOL Light proofs for FMA-based remainder algorithm
tautschnig Mar 23, 2026
4487fbb
Add proof verification CI and _Float16 property tests
tautschnig Mar 22, 2026
4ce9dbb
Add FP solver issues tracking document
tautschnig Mar 20, 2026
8d7a8c6
Add FP regression tests based on external solver issues
tautschnig Mar 24, 2026
d075b52
Update FP tracking document with test results and bugs found
tautschnig Mar 20, 2026
adb002a
Add more FP regression tests: roundToIntegral, BF16, trunc
tautschnig Mar 20, 2026
0ad2fe9
Add FP conversion and signed zero tests
tautschnig Mar 20, 2026
5f52535
Comprehensive update of FP tracking document
tautschnig Mar 20, 2026
5d9f46b
Add deep implementation analysis of FP gaps and effort estimates
tautschnig Mar 20, 2026
3088813
Add fp.isSubnormal, fp.isNegative, fp.isPositive to SMT2 parser
tautschnig Mar 20, 2026
ba33ec2
Add to_fp from BitVec (reinterpret cast) to SMT2 parser
tautschnig Mar 20, 2026
18ded4d
Fix fp.to_sbv/fp.to_ubv crash with non-RTZ rounding modes
tautschnig Mar 20, 2026
0ec0b23
Fix fp.roundToIntegral on non-standard FP sorts
tautschnig Mar 20, 2026
f4f4fc4
Update FP tracking document with implementation progress
tautschnig Mar 20, 2026
89a898b
Add comprehensive SMT-LIB tests for external FP solver issues
tautschnig Mar 24, 2026
0f5285d
Add KNOWNBUG test for fp.isZero(-0) (z3-isZero-neg-zero)
tautschnig Mar 24, 2026
8392bf1
Update tracking document with comprehensive test coverage
tautschnig Mar 20, 2026
74c9b0f
Add remaining SMT-LIB tests for all external FP solver issues
tautschnig Mar 24, 2026
8b89b16
Update tracking document with final test coverage numbers
tautschnig Mar 20, 2026
19d7848
Fix fp.isZero to handle -0 correctly
tautschnig Mar 20, 2026
937ac77
Add fp.min, fp.max and fix fp.isZero(-0)
tautschnig Mar 20, 2026
27356d6
Implement fp.sqrt in SMT2 solver
tautschnig Mar 20, 2026
f9a2ee0
Add KNOWNBUG tests for fp.sqrt gaps
tautschnig Mar 20, 2026
a7e157f
Add KNOWNBUG test for fminf zero sign (Float-fmin-zero-sign1)
tautschnig Mar 24, 2026
52cdfdf
Add KNOWNBUG test for sqrtf rounding (Float-sqrt-rounding1)
tautschnig Mar 24, 2026
7816853
Add plan for remaining FP issues
tautschnig Mar 20, 2026
f10cc88
Fix to_fp from large Real constant tests: KNOWNBUG→CORE
tautschnig Mar 20, 2026
79fc62f
Improve fp.sqrt: correct for RNE and exact cases, RTZ/RTP still TODO
tautschnig Mar 20, 2026
961c4c2
Status update: 3.3 done, sqrt partially done, C built-ins deferred
tautschnig Mar 20, 2026
d226524
Fix fp.sqrt: correct for all rounding modes and subnormals
tautschnig Mar 20, 2026
82da606
Add __CPROVER_fmin/fmax built-ins for correct IEEE 754 min/max
tautschnig Mar 20, 2026
c18fc47
Add __CPROVER_sqrt built-in for correct IEEE 754 sqrt
tautschnig Mar 20, 2026
b4d89ab
Fix z3-2631-quant-fpa test: use declare-const for indexed sort
tautschnig Mar 21, 2026
7005b30
Support to_fp from rational constants (/ p q)
tautschnig Mar 21, 2026
3c8f7a1
Implement fp.to_real and to_fp from rational constants
tautschnig Mar 21, 2026
eb92591
Add relevant-value-set quantifier instantiation for FP/BV types
tautschnig Mar 21, 2026
43c7e0b
Add arithmetic refinement for fp.rem and fix float_bvt tie-breaking
tautschnig Mar 24, 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
1 change: 1 addition & 0 deletions .clang-format-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ jbmc/src/miniz/miniz.cpp
jbmc/src/miniz/miniz.h
src/cprover/wcwidth.c
unit/catch/catch.hpp
doc/proofs/fma_remainder.v
68 changes: 68 additions & 0 deletions .github/workflows/proof-verification.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Verify floating-point proofs

on:
pull_request:
paths:
- 'src/solvers/floatbv/float_utils.cpp'
- 'src/solvers/floatbv/float_utils.h'
- 'src/solvers/floatbv/float_bv.cpp'
- 'doc/proofs/**'
push:
branches: [develop]
paths:
- 'src/solvers/floatbv/float_utils.cpp'
- 'src/solvers/floatbv/float_utils.h'
- 'src/solvers/floatbv/float_bv.cpp'
- 'doc/proofs/**'

jobs:
verify-proofs:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6

- name: Install Coq and Flocq
run: |
sudo apt-get update -qq
sudo apt-get install -y -qq coq libcoq-flocq

- name: Install HOL Light
run: |
sudo apt-get install -y -qq hol-light libnum-ocaml-dev

- name: Verify Coq proofs
run: |
cd doc/proofs
FLOCQ_DIR=$(find /usr/lib -path "*/user-contrib/Flocq" -type d | head -1)
echo "Flocq: $FLOCQ_DIR"
coqc -Q "$FLOCQ_DIR" Flocq fma_remainder.v
coqc -Q "$FLOCQ_DIR" Flocq fma_remainder_strategies.v
echo "Coq proofs verified (zero admits)."

- name: Verify HOL Light proofs
run: |
cd /usr/share/hol-light
OUTPUT=$(timeout 300 ocaml < "$GITHUB_WORKSPACE/doc/proofs/fma_remainder.ml" 2>&1 || true)
if echo "$OUTPUT" | grep -q "ALL HOL LIGHT PROOFS COMPLETE"; then
echo "HOL Light proofs verified (zero mk_thm)."
else
echo "HOL Light proofs FAILED"
echo "$OUTPUT" | tail -20
exit 1
fi

- name: Build CBMC
run: |
cmake -S . -Bbuild -DCMAKE_BUILD_TYPE=Release \
-Dsat_impl=cadical
cmake --build build --target cbmc -j$(nproc)

- name: Verify _Float16 remainder property
run: |
echo "=== remainder(x,y): |r| <= |y|/2 ==="
build/bin/cbmc regression/cbmc-library/remainderf/_Float16.c
echo "=== fmod(x,y): |r| < |y| ==="
build/bin/cbmc regression/cbmc-library/remainderf/fmod_bound.c
echo "=== special cases ==="
build/bin/cbmc regression/cbmc-library/remainderf/special_cases.c
echo "All _Float16 property checks passed."
56 changes: 56 additions & 0 deletions doc/proofs/check_proof.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#!/bin/bash
# Verify the FMA-based IEEE remainder proofs (Coq and HOL Light).
# Usage: ./check_proof.sh [--coq-only | --hol-only]
set -euo pipefail

SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"

run_coq() {
if ! command -v coqc &>/dev/null; then
echo "WARNING: coqc not found, skipping Coq proofs"
return 1
fi

FLOCQ_DIR=$(find /usr/lib -path "*/user-contrib/Flocq" -type d 2>/dev/null | head -1)
if [ -z "$FLOCQ_DIR" ]; then
echo "WARNING: Flocq not found, skipping Coq proofs"
return 1
fi

echo "Coq version: $(coqc --version | head -1)"
echo "Flocq path: $FLOCQ_DIR"
echo "Checking fma_remainder.v..."
coqc -Q "$FLOCQ_DIR" Flocq "$SCRIPT_DIR/fma_remainder.v"
echo "Checking fma_remainder_strategies.v..."
coqc -Q "$FLOCQ_DIR" Flocq "$SCRIPT_DIR/fma_remainder_strategies.v"
echo "Coq proofs verified (zero admits)."
}

run_hol() {
HOL_DIR="/usr/share/hol-light"
if [ ! -f "$HOL_DIR/hol.ml" ]; then
echo "WARNING: HOL Light not found, skipping"
return 1
fi

echo "Checking fma_remainder.ml (HOL Light)..."
cd "$HOL_DIR"
OUTPUT=$(timeout 300 ocaml < "$SCRIPT_DIR/fma_remainder.ml" 2>&1 || true)
if echo "$OUTPUT" | grep -q "ALL HOL LIGHT PROOFS COMPLETE"; then
echo "HOL Light proofs verified (zero mk_thm)."
else
echo "ERROR: HOL Light proofs failed"
echo "$OUTPUT" | tail -20
return 1
fi
}

case "${1:-}" in
--coq-only) run_coq ;;
--hol-only) run_hol ;;
*)
run_coq || true
echo
run_hol || true
;;
esac
Loading
Loading