Skip to content

Lean core-lib tests#5

Merged
maximebuyse merged 2 commits into
mainfrom
lean-tests
May 20, 2026
Merged

Lean core-lib tests#5
maximebuyse merged 2 commits into
mainfrom
lean-tests

Conversation

@maximebuyse
Copy link
Copy Markdown
Collaborator

This PR adds a new test framework allowing to check that the lean core library behaves like it is supposed to.

The tests are defined in rust, checking that a call to a core function's result with concrete params gives the expected concrete value. The rust is tested to validate that the expected values correspond to the behaviour of rust core. The tests are also translated to lean with aeneas, and checked in lean.

This should validate:

  • That the core models defined in Rust are correctly translated by Aeneas
  • That the manual lean definitions are correct (for primitives or temporary workarounds when aeneas can't extract some rust models)

@maximebuyse maximebuyse force-pushed the lean-tests branch 2 times, most recently from 1649cdb to eb69cd3 Compare May 20, 2026 09:03
@maximebuyse maximebuyse requested a review from abentkamp May 20, 2026 11:42
Comment thread tests/rust_lean_equiv_test/source/src/alloc/vec.rs Outdated
@abentkamp
Copy link
Copy Markdown
Collaborator

This is great! Do we still need the client_test? Doesn't the new test cover both clean extraction and equivalence to Rust?

@abentkamp
Copy link
Copy Markdown
Collaborator

And what's going wrong with closure extraction? Sometimes move || ... instead of || ... works better for Aeneas.

@maximebuyse
Copy link
Copy Markdown
Collaborator Author

This is great! Do we still need the client_test? Doesn't the new test cover both clean extraction and equivalence to Rust?

I like the idea of testing in the same conditions as a user of the library, but it is true that for now the equivalence tests probably covers everything (and more) that the client-test covers. Anyway more tests is not a bad thing, and in the future we might want to add some proofs in client-test which would make it different. So I'd say we keep it.

@maximebuyse
Copy link
Copy Markdown
Collaborator Author

And what's going wrong with closure extraction? Sometimes move || ... instead of || ... works better for Aeneas.

I re-activated some of these tests, and added more precise reasons for those that still need to be de-activated.

…use for the ones that still cannot be activated.
@abentkamp
Copy link
Copy Markdown
Collaborator

Cool, thanks!

@maximebuyse maximebuyse merged commit 67c9e02 into main May 20, 2026
3 checks passed
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.

2 participants