hacspec / hax

A Rust verification tool
https://hacspec.org/blog
Apache License 2.0
200 stars 21 forks source link

Attributes: deduplicate parent attributes #123

Open W95Psp opened 1 year ago

W95Psp commented 1 year ago

For now, we extract every item that lives in a crate, but not modules. Indeed, if we disregard attributes, a module is really just a group of items, so having modules as such is not useful, we can recover the module structure looking at names.

However, modules can also carry attributes, so we need a way of retrieving them. ~Either:~ ~- we extract mod items, consisting of a list of names plus a list of attributes;~ ~- we add a parent_attributes field on each item, but that will cause duplication of attributes.~

~I think having mod items is the way to go.~

Because it was easier, the -ugly- second option was implemented.

Instead, I think we should extract a simple mapping from module def_ids to attributes, in addition to a list of items.

github-actions[bot] commented 1 month ago

This issue has been marked as stale due to a lack of activity for 60 days. If you believe this issue is still relevant, please provide an update or comment to keep it open. Otherwise, it will be closed in 7 days.