File tree Expand file tree Collapse file tree
proofs/hol_light/aarch64/proofs Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1755,7 +1755,7 @@ let STRIP_EXISTS_ASSUM_TAC =
17551755(* The main memory safety theorem. *)
17561756(* ========================================================================= *)
17571757
1758- let MLKEM_REJ_UNIFORM_MEMSAFE = prove
1758+ let MLKEM_REJ_UNIFORM_SAFE = prove
17591759 (`! res buf buflen table (inlist:(12 word )list ) pc e stackpointer.
17601760 24 divides val buflen / \
17611761 8 * val buflen = 12 * LENGTH inlist / \
@@ -3086,7 +3086,7 @@ let MLKEM_REJ_UNIFORM_MEMSAFE = prove
30863086(* Memory safety of the subroutine version. *)
30873087(* ------------------------------------------------------------------------- *)
30883088
3089- let MLKEM_REJ_UNIFORM_SUBROUTINE_MEMSAFE = time prove
3089+ let MLKEM_REJ_UNIFORM_SUBROUTINE_SAFE = time prove
30903090 (`! res buf buflen table (inlist:(12 word )list ) pc e stackpointer returnaddress.
30913091 24 divides val buflen / \
30923092 8 * val buflen = 12 * LENGTH inlist / \
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ # Copyright (c) The mlkem-native project authors
3+ # SPDX-License-Identifier: Apache-2.0 OR ISC OR MIT
4+
5+ # Verify that every proof contains the expected set of theorems.
6+
7+ set -euo pipefail
8+
9+ usage ()
10+ {
11+ echo " Usage: $0 <architecture>" >&2
12+ echo " architecture: aarch64 | x86_64" >&2
13+ exit 1
14+ }
15+
16+ [[ $# -eq 1 ]] || usage
17+ ARCH=" $1 "
18+
19+ case " $ARCH " in
20+ aarch64 | x86_64) ;;
21+ * )
22+ echo " ERROR: Unknown architecture '$ARCH '." >&2
23+ usage
24+ ;;
25+ esac
26+
27+ SCRIPT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
28+ PROOFS_DIR=" $SCRIPT_DIR /../proofs/hol_light/$ARCH /proofs"
29+
30+ PROOFS=" $( tests hol_light -l -a " $ARCH " ) "
31+ ERRORS=0
32+
33+ for routine in $PROOFS ; do
34+ suffixes=(" CORRECT" " SAFE" " SUBROUTINE_SAFE" )
35+ [[ $ARCH == " x86_64" ]] && suffixes+=(" SUBROUTINE_CORRECT" " NOIBT_SUBROUTINE_CORRECT" " NOIBT_SUBROUTINE_SAFE" )
36+
37+ # mlkem_rej_uniform on x86_64 only has a functional correctness proof
38+ [[ $ARCH == " x86_64" && $routine == " mlkem_rej_uniform" ]] && suffixes=(" CORRECT" )
39+
40+ for sfx in " ${suffixes[@]} " ; do
41+ if ! grep -q " _${sfx} " " $PROOFS_DIR /${routine} .ml" ; then
42+ echo " FAIL: ${routine} _${sfx} not found in ${routine} .ml" >&2
43+ (( ERRORS++ )) || true
44+ fi
45+ done
46+ done
47+
48+ [[ $ERRORS -eq 0 ]] && echo " OK" || exit 1
You can’t perform that action at this time.
0 commit comments