HOL-Light: improve tooling and CI - #1009
Conversation
CBMC Results (ML-DSA-44)
Full Results (210 proofs)
|
CBMC Results (ML-DSA-65)
Full Results (210 proofs)
|
CBMC Results (ML-DSA-87)
Full Results (210 proofs)
|
|
Thanks @L-series. Let's first get this merged in mlkem-native and then align this one. Changing back to draft for now. Safety proofs are not fully implemented yet here for all proves. We should skip those for now and open an issue to add it later. |
6fbd4ae to
13638f7
Compare
|
Hello @mkannwischer @hanno-becker, appologies for the delay with this, I got quite distracted with a math paper i was working on this last month 😆 . This should be ready for review now, the check theorems script is slightly different here than what it is in mlkem as it also treats the IBT case. |
CBMC Results (ML-DSA-44, REDUCE-RAM)
Full Results (210 proofs)
|
CBMC Results (ML-DSA-87, REDUCE-RAM)
Full Results (210 proofs)
|
CBMC Results (ML-DSA-65, REDUCE-RAM)
Full Results (210 proofs)
|
No worries. Thanks for porting this!
Can you elaborate why it needs to be slightly different? IBT isn't something that's specific to mldsa. Should it be ported to mlkem, too? |
|
@L-series can you please fix the DCO signoff? |
79190ea to
61dfaa0
Compare
@mkannwischer the logic for capturing the In mldsa, some of the proofs occur with the following slightly more complicated patterns: and This occurs around a dozen times. To generalize the logic in the list_thms script, I've made it so that we scan for the theorem producing declaration within the entire top level There might be some simpler way of doing this however. Please let me know what you think! |
mkannwischer
left a comment
There was a problem hiding this comment.
@L-series, sorry for the delay.
A few things should still be changed before we can merge this one.
There was a problem hiding this comment.
This file doesn't seem to align to the one in mlkem-native. Was that done intentionally?
There was a problem hiding this comment.
Yes indeed, as I mentioned in the comment above, there is a divergence in the format of some of the proofs in mldsa as compared to mlkem. The grep which is used in the mlkem version of list_thms cannot capture these differences, so instead I modified the script to look at entire let name = ... prove blocks and search for the correct patterns.
This commit introduces a new flag --arch to the hol_light command of the tests script that allows user specification of which architecture to run/list the proofs for. If not passed, the behavior is unchanged. Signed-off-by: Andreas Hatziiliou <andreas.hatziiliou@savoirfairelinux.com>
L-series
left a comment
There was a problem hiding this comment.
The small issues are resolved, however the question of the difference in the list_thms script still persists. Please let me know if you think this approach is correct.
We add a check to the linting script called check-theorems that ensures that all HOL-Light proofs provide the expected set of theorems depending on the architecture. Unlike the ML-KEM theorem lister, the ML-DSA list_thms scripts scan complete top-level let bindings instead of only direct let NAME = prove lines. Several ML-DSA x86_64 safety theorems are wrapped in REWRITE_RULE around time prove, and the eta rejection-sampling subroutine theorems are built via local prove blocks or ADD_IBT_RULE aliases. The broader scan keeps those exported theorem names visible to lint without changing the proof structure. Signed-off-by: Andreas Hatziiliou <andreas.hatziiliou@savoirfairelinux.com>
This PR is a port from: pq-code-package/mlkem-native#1634
Note that this is currently blocked by: #1001