-
Notifications
You must be signed in to change notification settings - Fork 3
Refactor #traverseProjection
to include stack height parameter
#652
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
Conversation
- Updated the `#traverseProjection` function to accept an additional `Int` parameter representing the current height of the stack. - Adjusted all related rules to accommodate the new parameter, ensuring correct context handling during projection traversals. - Enhanced the handling of dereferencing and context management in various projection scenarios.
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 so far. And yes, a test would be great.
~> #writeProjection(NEW) | ||
=> #setLocalValue(place(local(I), .ProjectionElems), #buildUpdate(NEW, CONTEXTS)) | ||
... | ||
</k> | ||
[preserves-definedness] // valid context ensured upon context construction | ||
|
||
rule <k> #traverseProjection(toLocal(I), _ORIGINAL, .ProjectionElems, CONTEXTS) | ||
rule <k> #traverseProjection(toLocal(I), _ORIGINAL, .ProjectionElems, CONTEXTS, _CURH) | ||
~> #writeMoved | ||
=> #forceSetLocal(local(I), #buildUpdate(Moved, CONTEXTS)) // TODO retain Ty and Mutability from _ORIGINAL |
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 just see this outdated comment here...
=> #forceSetLocal(local(I), #buildUpdate(Moved, CONTEXTS)) // TODO retain Ty and Mutability from _ORIGINAL | |
=> #forceSetLocal(local(I), #buildUpdate(Moved, CONTEXTS)) |
- Refactored the `render_rules` function to improve edge rule rendering by incorporating NDBranch logic. - Added logic to select between KCFG edges and NDBranches, ensuring proper rule application display. - Introduced a divider for better readability in the output. - Updated the handling of rules to accommodate cases where no edge is found, enhancing robustness.
- Introduced a new test file `deref_chain_calls.rs` to validate dereferencing of multiple layers of pointers to a struct. - Implemented a sample `Account` struct and functions to demonstrate dereferencing and ensure correct retrieval of balance and flags. - Added assertions to verify expected outcomes, enhancing test coverage for pointer dereferencing scenarios.
- Created a new .gitignore file in the prove-rs directory to exclude Markdown files and the proof directory from version control.
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.
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.
Thank you! I'll change it.
The CI run times out after 6 hours (!) so there are looping proofs. |
- Added entries to the main .gitignore to exclude specific proof-related files and directories. - Removed the .gitignore file from the prove-rs directory as it is no longer needed.
Height is solved by |
#traverseProjection
function to accept an additionalInt
parameter representing the current height of the stack.