Repository navigation
copilot-theorem: Support translating UpdateField to what4. Refs #524. - #527
Merged
ivanperez-keera merged 5 commits intoAug 30, 2024
Conversation
ivanperez-keera
self-requested a review
August 30, 2024 09:32
Member
|
Change Manager: Could you please make the following changes?
Thanks! |
ivanperez-keera
removed their request for review
August 30, 2024 09:49
…ilot-Language#524. A new kind of `Op2`, called `UpdateField`, was added to `copilot-core` in a prior commit to support defining streams with updates to struct fields. This commit extends `copilot-theorem` to support reasoning about streams involving struct updates. We do so by providing a new case for the operation that translates a `copilot-core` `UpdateField` into a What4 representations of a Copilot expression. The implementation proves relatively straightforward, as struct field accessors always correspond to a concrete index value, which can then be used to update the value at the corresponding index in the list of struct fields.
…pilot-Language#524. This commit updates the `what4-structs` example in `copilot` (which depends on `copilot-theorem`) in order to demonstrate that `copilot-theorem` supports reasoning about a basic theorem involving a struct field update.
…guage#524. This adds a basic test case that ensures that applying a struct update followed by accessing the updated field is equivalent to accessing the field and then updating it.
RyanGlScott
force-pushed
the
develop-copilot-theorem-UpdateField
branch
from
August 30, 2024 09:55
2696e1a to
bf0f454
Compare
Collaborator
Author
|
Done. |
Member
|
Change Manager: Verified that:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The implementation proves relatively straightforward, as struct field accessors always correspond to a concrete index value, which can then be used to update the value at the corresponding index in the list of struct fields.
I have also updated the
what4-structsexample incopilot's example suite to demonstrate the use of a Copilot property involving struct updates, and I have added a similar test case tocopilot-theorem's test suite.Fixes #524.