Skip to content

Conversation

@clementblaudeau
Copy link
Contributor

This PR leverages the recent work on Core Models to add functions for several modules of Core : options, result, default, clone, Fn/FnOnce.

Overview

  • In proof-libs/lean, models are added. They are lightly adapted (mostly namespacing) from a normal cargo hax into lean of the core-models crate.
  • In tests/lean-core-models, add tests for all the functions added in the lean library. The extracted lean is well-typed.
  • In rust-engine/backends/lean.rs fix a bug (missing parenthesis)

@clementblaudeau clementblaudeau requested a review from a team as a code owner October 27, 2025 23:12
Copy link
Contributor

@maximebuyse maximebuyse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!
About the tests, lean type-checking is not tested on these tests right? So do you manually try that it works?

Hax Lean Backend - Cryspen

Core-model for [https://doc.rust-lang.org/src/core/ops/function.rs.html]:
The Default trait for types with a default value.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This description is for another module

@abentkamp
Copy link
Contributor

Hi, looks good to me!

As Maxime mentioned, it would be nice to actually test the Lean type-checking. I did it manually and it worked for me.

The name clash between hax's Result and Rust's Result is unfortunate. The name for hax's Result is borrowed from Aeneas? Does Aeneas have the same name clash then? I haven't been able to find Aeneas's modelling of Rust's Result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants