-
Notifications
You must be signed in to change notification settings - Fork 2
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
Infrastructure for the UKM semantics #143
Conversation
|
||
configuration | ||
<k> | ||
ukmDecodePreprocessedCell($PGM:Bytes) |
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.
What do we envision placing into the ukmDecodePreprocessedCell
? Is it the hooks from the UKM module?
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.
The argument for the ukmDecodePreprocessedCell
will be the bytes produced by ukmEncodePreprocessedCell
.
ukmDecodePreprocessedCell
will rewrite (in one or more steps) to .K
. While doing so, it will "restore" the <ukm-full-preprocessed>
cell (https://github.com/Pi-Squared-Inc/rust-demo-semantics/pull/143/files#diff-ab754f8b0d12c81607fb49790ffed6b962aeea3393f07b73f475aa5acc1f2e9aR28) to the state encoded in the Bytes
argument.
This state will contain the normal content of the <preprocessed>
cell in the Rust semantics (https://github.com/Pi-Squared-Inc/rust-demo-semantics/pull/143/files#diff-a93e9e66bc324710e7b57700a6758c826c8b7b704cda1ec9ae9e86c495ff0622R15) which contains, roughly, the "compiled" Rust code (we don't actually compile the code right now, we only do some sort of indexing, but, if the future we will probably do more, e.g. we will resolve imported symbols and so on). This state will also contain some contract-specific state (the <ukm-preprocessed>
cell), e.g. it will hold a TypePath for the contract's trait, perhaps some other things, too.
|
||
configuration | ||
<k> | ||
crateParser($CRATE1:Crate) |
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.
Could you please elaborate on what we will use to fill these 4 crate slots for both configuration and testing?
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.
I can't :) . It is meant as an example that we would change as needed, its purpose is to signal that we are loading a list of random crates. Actually, I think I can do even better than this, so I'll rewrite this code.
One of them will be the contract. Another one will be, perhaps, the Rust code for the "helpers" trait. The others will be the "header files" that Everett mentioned, one of which will contain the functions for calling the hooks.
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.
Looks good to me.
Closes #129