-
Notifications
You must be signed in to change notification settings - Fork 139
[WIP] Hermes.Std #2974
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: G2e56baadbd39a08c821418704f521a2cdd8d0e1f
Are you sure you want to change the base?
[WIP] Hermes.Std #2974
Conversation
gherrit-pr-id: Gb4a4c349671f37aad9e084998afdb7c57d92be43
Summary of ChangesHello @joshlf, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request establishes a foundational standard library for the Hermes verification framework in Lean, providing essential definitions for type verifiability and memory layout. Concurrently, it overhauls the Rust shadow crate generation process to inject a controlled standard library environment, enabling more precise and robust formal verification of Rust code by routing standard library calls through Hermes-defined shims. These changes are critical for advancing the capabilities and reliability of the Hermes toolchain. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a Hermes.Std module for Lean, providing standard definitions for verification like Verifiable, Layout, and memory concepts. This is a significant and positive refactoring that moves hardcoded Lean prelude code into dedicated .lean files, greatly improving modularity and maintainability. The std shadowing mechanism is also updated to support this new structure. The changes are well-implemented, but I have a few minor suggestions for cleanup: a typo fix in a comment, removing a duplicated import, and deleting an unused function.
| ensures_clause = Some(ens.trim().to_string()); | ||
| } else if signature_args.is_none() && extra_args.is_empty() && ensures_clause.is_none() { | ||
| // Check if this line looks like signature args. | ||
| // Check if this file looks like signature args. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // Helper to process single source file BEFORE prelude injection | ||
| fn ensure_single_source(root: &Path, source: Option<&Path>) -> Result<()> { | ||
| if let Some(src) = source { | ||
| let file_name = src.file_name().context("Invalid source file name")?; | ||
| let dest = root.join(file_name); | ||
| process_file_content(src, &dest)?; | ||
| } | ||
| Ok(()) | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## G2e56baadbd39a08c821418704f521a2cdd8d0e1f #2974 +/- ##
==========================================================================
Coverage 92.02% 92.02%
==========================================================================
Files 19 19
Lines 6029 6029
==========================================================================
Hits 5548 5548
Misses 481 481 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
⬇️ Download this PR
Branch
git fetch origin refs/heads/Gb4a4c349671f37aad9e084998afdb7c57d92be43 && git checkout -b pr-Gb4a4c349671f37aad9e084998afdb7c57d92be43 FETCH_HEADCheckout
git fetch origin refs/heads/Gb4a4c349671f37aad9e084998afdb7c57d92be43 && git checkout FETCH_HEADCherry Pick
git fetch origin refs/heads/Gb4a4c349671f37aad9e084998afdb7c57d92be43 && git cherry-pick FETCH_HEADPull
Stacked PRs enabled by GHerrit.