You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ironsht/src/single_delivery_model_v.rs
+6-2Lines changed: 6 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -127,7 +127,7 @@ impl CSingleDelivery {
127
127
letmut i=0;
128
128
129
129
while i < ack_state.un_acked.len()
130
-
invariant
130
+
invariant
131
131
0 <= i <= ack_state.un_acked.len(),
132
132
self.valid(),// Everybody hates having to carry everything through here. :v(
133
133
src.abstractable(),
@@ -138,6 +138,8 @@ impl CSingleDelivery {
138
138
packets@.map_values(|p:CPacket| p@).to_set() ==
139
139
old(packets)@.map_values(|p:CPacket| p@).to_set() + self@.un_acked_messages_for_dest_up_to(src@, dst@, i as nat),
140
140
Self::packets_are_valid_messages(packets@),
141
+
decreases
142
+
ack_state.un_acked.len() - i
141
143
{
142
144
let ghost packets0_view = packets@;
143
145
@@ -552,7 +554,7 @@ impl CSingleDelivery {
552
554
}
553
555
554
556
while dst_i < dests.len()
555
-
invariant
557
+
invariant
556
558
self.valid(),// Everybody hates having to carry everything through here. :v(
557
559
dests@.map_values(|ep:EndPoint| ep@).to_set() == self.send_state.epmap@.dom(),// NOTE: hard to figure this one out: this comes from postcondition of .keys(). Losing while context extra sad here because it was very painful to reconstruct.
558
560
src.abstractable(),
@@ -562,6 +564,8 @@ impl CSingleDelivery {
562
564
packets@.map_values(|p:CPacket| p@).to_set() ==
563
565
self@.un_acked_messages_for_dests(src@, dests@.subrange(0, dst_i as int).map_values(|ep:EndPoint| ep@).to_set()),
0 commit comments