-
Notifications
You must be signed in to change notification settings - Fork 5
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
Prove ReplicaSet invariants, Convert Model from usize
to unbounded Nats
#575
Prove ReplicaSet invariants, Convert Model from usize
to unbounded Nats
#575
Conversation
Signed-off-by: Cody Rivera <[email protected]>
Signed-off-by: Cody Rivera <[email protected]>
Signed-off-by: Cody Rivera <[email protected]>
Signed-off-by: Cody Rivera <[email protected]>
Signed-off-by: Cody Rivera <[email protected]>
Signed-off-by: Cody Rivera <[email protected]>
Signed-off-by: Cody Rivera <[email protected]>
Signed-off-by: Cody Rivera <[email protected]>
Signed-off-by: Cody Rivera <[email protected]>
Signed-off-by: Cody Rivera <[email protected]>
Signed-off-by: Cody Rivera <[email protected]>
Signed-off-by: Cody Rivera <[email protected]>
Signed-off-by: Cody Rivera <[email protected]>
Signed-off-by: Cody Rivera <[email protected]>
usize
to unbounded Natsusize
to unbounded Nats
@@ -97,7 +97,7 @@ pub open spec fn reconcile_core(v_replica_set: VReplicaSetView, resp_o: Option<R | |||
obj: pod.marshal(), | |||
}); | |||
let state_prime = VReplicaSetReconcileState { | |||
reconcile_step: VReplicaSetReconcileStep::AfterCreatePod((diff - 1) as usize), | |||
reconcile_step: VReplicaSetRecStepView::AfterCreatePod(abs(diff - 1)), |
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.
Why do we need abs
(which should be a no-op here)? Is it to make sure the result is still a nat
since there is subtraction here?
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.
The compiler complains if the expression is left as-is without a cast/operation. If you'd prefer as nat
, I can do that change.
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.
Yes let's use as nat
, which looks more natural
src/v2/controllers/vreplicaset_controller/proof/helper_invariants/predicate.rs
Outdated
Show resolved
Hide resolved
src/v2/controllers/vreplicaset_controller/proof/liveness/resource_match.rs
Outdated
Show resolved
Hide resolved
Signed-off-by: Cody Rivera <[email protected]>
822dbc4
to
3dc70cd
Compare
Signed-off-by: Cody Rivera <[email protected]>
Signed-off-by: Cody Rivera <[email protected]>
@@ -1,14 +1,14 @@ | |||
use crate::kubernetes_api_objects::spec::prelude::*; | |||
use crate::reconciler::spec::{io::*, reconciler::*}; | |||
use crate::vreplicaset_controller::trusted::{spec_types::*, step::*}; | |||
use vstd::prelude::*; | |||
use vstd::{prelude::*, math::abs}; |
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.
@codyjrivera Can you also remove this import of abs
? After that you can merge it.
Prove several additional invariants for VReplicaSet; convert reconcile step data structure to unbounded integers.