-
Notifications
You must be signed in to change notification settings - Fork 42
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
crucible-jvm: Add permission bit for writability to each instance field and array. #735
Conversation
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 OK to me. Two questions though:
-
Why did you decide to use a separate StringMap for object field permissions instead of adding a boolean flag to the field value map?
-
It seems like objects always default to writable, which makes sense for crux-style simulation. How does SAW twiddle those bits?
That choice is mainly because the object fields are often updated during simulation while the permission bits never are. By keeping them separate, we can be sure that the values in the permission map will stay concrete, even in the presence of conditional updates to the value fields. I mentioned some of this in response to some comments on #733.
SAW sets those bits when an object is created (while executing the pre-state section of a method spec during verification) and then never changes them afterward. Fields are only set to writable if there is a |
00ba356
to
d6ab057
Compare
The permission bit is asserted at every `putfield` instruction.
The `astore` instruction now checks the write permission bit. Add writability parameter to `doAllocateArray`.
d6ab057
to
6dd6c06
Compare
The field permission bit is asserted on every
putfield
instruction. The array permission bit is asserted on everyastore
instruction.This PR builds on top of #733. It will be used to address GaloisInc/saw-script#900.