Skip to content

feat(rengine): attribute api#1805

Merged
W95Psp merged 29 commits intomainfrom
rengine-attribute-api
Dec 16, 2025
Merged

feat(rengine): attribute api#1805
W95Psp merged 29 commits intomainfrom
rengine-attribute-api

Conversation

@W95Psp
Copy link
Copy Markdown
Contributor

@W95Psp W95Psp commented Dec 10, 2025

Fixes https://www.notion.so/Port-the-attribute-API-over-to-Rust-2788fd40c8e3800a9e71d29c078778b7?source=copy_link

This PR mainly adds the module attributes, which offers a simple way to construct a graph of items associated via hax attributes (e.g. requires).

That graph, AssociatedItemsGraph can be queried via e.g. its associated method fn_like_associated_expressions. Given an item, this method will return its precondition, postcondition and decreases clause, if any.

@W95Psp W95Psp requested a review from a team as a code owner December 10, 2025 10:14
@W95Psp W95Psp requested review from abentkamp, karthikbhargavan and maximebuyse and removed request for karthikbhargavan December 10, 2025 10:14
Copy link
Copy Markdown
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.

Looks good to me!

Copy link
Copy Markdown
Contributor

@abentkamp abentkamp left a comment

Choose a reason for hiding this comment

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

This seems to work well for generating specs. Please fix the tests and merge so that I can build on top of this more easily.

@W95Psp
Copy link
Copy Markdown
Contributor Author

W95Psp commented Dec 15, 2025

Thanks for your reviews, Maxime and Alex!
I will now rebase and fix the remaining CI issues

@W95Psp W95Psp force-pushed the rengine-attribute-api branch from aa354d3 to 5939581 Compare December 15, 2025 13:55
My idea was to drain the items that had an UUID.
Some items are tagged with an UUID but should not be dropped (e.g. verbatim items).
Thus, we have no choice but to clone.
We used to expose modules that defined phases. Instead, this commit exposes
the structs on which the trait `Phase` is implemented.
Such structs are the only entrypoint to a phase.
Nothing else should be visible.

This commit also moves doc comment from modules to struct phases.
@W95Psp W95Psp enabled auto-merge December 15, 2025 14:54
This is not useful anymore since we now respect the `late_skip` attributes.
@W95Psp W95Psp force-pushed the rengine-attribute-api branch from 7ebbec0 to 46a9f82 Compare December 15, 2025 15:52
…kend`

skip_late items should be dropped only after computing the graph of attributes, which should happen after applying all phases.
Thus, dropping skip_late items cannot be a phase.
@W95Psp W95Psp added this pull request to the merge queue Dec 16, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 16, 2025
@W95Psp W95Psp force-pushed the rengine-attribute-api branch 2 times, most recently from bc9c95c to ead357c Compare December 16, 2025 10:15
@W95Psp W95Psp enabled auto-merge December 16, 2025 10:15
@W95Psp W95Psp added this pull request to the merge queue Dec 16, 2025
Merged via the queue into main with commit 290d8e1 Dec 16, 2025
47 of 54 checks passed
@W95Psp W95Psp deleted the rengine-attribute-api branch December 16, 2025 11:34
@W95Psp W95Psp restored the rengine-attribute-api branch January 15, 2026 15:21
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