[Civl] Change failure preservation check #1013
Merged
+316
−841
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 main goal of this PR is to change the implementation of the failure preservation check. If L is a left mover and X is an arbitrary action, the new formulation requires proving the validity of the following condition:
wlp(L, gate(X)) ==> gate(X)
This implication can be stated informally as either of the following two equivalent conditions.
A useful aspect of the new formulation is that when the check fails, blame can be assigned to a specific assertion in gate(X). This is because the right side of the implication has a separate conjunct corresponding to each assert.
It is a conjecture that if we check this new formulation of failure preservation on a left mover, then the non-blocking check on a left mover can be dropped. Intuitively, this new formulation appears to capture the essential aspects of the old formulation of failure preservation and the non-blocking check in one condition.
We would like the failure preservation check to have the desirable property that if variables accessed in L are disjoint from those accessed in gate(X), then the check is guaranteed to succeed. The proposed failure preservation check does not have this property. But by separately proving that L is nonblocking, we can reclaim this property for the proposed check. Note that the nonblocking check is logically the same as proving the validity wlp(L, false) ==> false.
Additionally: