Skip to content
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

Add history variable to the cluster state machine #542

Merged
merged 4 commits into from
Sep 28, 2024

Conversation

marshtompsxd
Copy link
Collaborator

@marshtompsxd marshtompsxd commented Sep 27, 2024

This PR augments the cluster state machine with a history that records all the past global state of the cluster. The history will help us prove some invariants that involve resource version of state objects.

Instead of modifying the cluster state machine's definition (and all its references) to maintain the history, this PR adds a new state machine, called retentive cluster, that wraps up the original state machine's init and next and meanwhile maintains a history of the original state machine. This brings several benefits: (1) it minimizes the changes we need to make to the current spec and lemmas (in fact, no changes are needed) to use the history variable, (2) it allows us to stick with the original state machine (w/o the history) in the cases where we don't need to use the history variable just like what we are doing.

It is obvious that any invariant on the cluster state (not the history) can be transferred between the two state machines because they are identical except the history recording. To transfer invariants, this PR also introduces two lemmas transfer_invariant_to_cluster and transfer_invariant_from_cluster.

@marshtompsxd marshtompsxd added this pull request to the merge queue Sep 28, 2024
Merged via the queue into main with commit d1a2f77 Sep 28, 2024
16 checks passed
@marshtompsxd marshtompsxd deleted the xudong/add-history branch October 21, 2024 02:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant