-
Notifications
You must be signed in to change notification settings - Fork 17
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
Add an attribute to mark definitions as opaque
#206
Comments
Note: rustc will complain about such an attribute because it will try to find a macro with that name. Adding #![feature(register_tool)]
#![register_tool(charon)] at the top of each file that uses the attributes should solve the problem I hope. We can think of a cleaner solution afterwards. (See here for details about this feature). |
Ok, thanks for looking into this. My understanding is that there are clean ways of doing this, but I'm indeed not aware of the details. It might be worth looking at other verification projects which use attributes (e.g., Verus or Creusot). |
Creusot defines a proc-macro for their |
What do you recommend doing? |
|
In case it helps, in Kani, we pass |
#227 allows the attribute on definitions; it would be nice to also allow the attribute on modules. |
These attributes are supported on modules since one of the recent PRs that overhauled opaque handling. |
It is currently possible to pass an option to Charon to mark some modules as opaque, so that Charon will not look inside those definitions (it treats them similarly to external definitions). This option is a bit coarse grained: it would be good to be able to individually mark the functions with a
charon::opaque
attribute. In order not to confuse the Aeneas users, I suggest introducing aaeneas::opaque
attribute which does the same, and generally speaking introducing both acharon::...
and anaeneas::...
version of every new attribute.The text was updated successfully, but these errors were encountered: