8989requires dp.Valid()
9090decreases
9191pure func (dp DataPlaneSpec) is_target(asid IO_as, nextif IO_ifs, a2 IO_as, i2 IO_ifs) bool {
92- return AsIfsPair{asid, nextif} in domain(dp.GetLinks()) &&
92+ return AsIfsPair{asid, nextif} elem domain(dp.GetLinks()) &&
9393 dp.Lookup(AsIfsPair{asid, nextif}) == AsIfsPair{a2, i2}
9494}
9595
@@ -115,7 +115,7 @@ pure func dp3s_add_obuf(s IO_dp3s_state_local, i option[IO_ifs], pkt IO_pkt3) IO
115115ghost
116116decreases
117117pure func insert(buf dict[option[IO_ifs]](set[IO_pkt3]), k option[IO_ifs], v IO_pkt3) dict[option[IO_ifs]](set[IO_pkt3]) {
118- return let newSet := (k in domain(buf) ? (let pre := buf[k] in pre union set[IO_pkt3]{v}) : set[IO_pkt3]{v}) in
118+ return let newSet := (k elem domain(buf) ? (let pre := buf[k] in pre union set[IO_pkt3]{v}) : set[IO_pkt3]{v}) in
119119 buf[k = newSet]
120120}
121121
@@ -129,7 +129,7 @@ pure func (dp DataPlaneSpec) dp3s_forward_ext(m IO_pkt3, newpkt IO_pkt3, nextif
129129 let hf1, fut := currseg.Future[0], currseg.Future[1:] in
130130 let traversedseg := newpkt.CurrSeg in
131131 dp.dp2_forward_ext_guard(dp.Asid(), m, nextif, currseg, traversedseg, newpkt, fut, hf1) &&
132- (nextif in domain(dp.GetNeighborIAs())) &&
132+ (nextif elem domain(dp.GetNeighborIAs())) &&
133133 let a2 := dp.GetNeighborIA(nextif) in
134134 let i2 := dp.Lookup(AsIfsPair{dp.Asid(), nextif}).ifs in
135135 dp.is_target(dp.Asid(), nextif, a2, i2)
@@ -145,7 +145,7 @@ pure func (dp DataPlaneSpec) dp3s_forward_ext_xover(m IO_pkt3, newpkt IO_pkt3, n
145145 let hf1, fut := currseg.Future[0], currseg.Future[1:] in
146146 let traversedseg := newpkt.CurrSeg in
147147 dp.dp2_forward_ext_guard(dp.Asid(), m, nextif, currseg, traversedseg, newpkt, fut, hf1) &&
148- (nextif in domain(dp.GetNeighborIAs())) &&
148+ (nextif elem domain(dp.GetNeighborIAs())) &&
149149 let a2 := dp.GetNeighborIA(nextif) in
150150 let i2 := dp.Lookup(AsIfsPair{dp.Asid(), nextif}).ifs in
151151 dp.is_target(dp.Asid(), nextif, a2, i2)
@@ -199,8 +199,8 @@ pure func (dp DataPlaneSpec) dp3s_xover_guard(
199199 ) bool {
200200 // the first conjunct was added to Gobra, even though it was not in the original isabelle spec.
201201 // this is because of the way math. maps are implemented, we can only obtain a key that is in the map before.
202- return some(recvif) in domain(s.ibuf) &&
203- (let lookupRes := s.ibuf[some(recvif)] in (m in lookupRes)) &&
202+ return some(recvif) elem domain(s.ibuf) &&
203+ (let lookupRes := s.ibuf[some(recvif)] in (m elem lookupRes)) &&
204204 dp.dp2_xover_guard(m, currseg, nextseg, traversedseg, intermediatepkt, hf1, hf2, nextfut, dp.Asid(), recvif) &&
205205 dp.dp3s_forward_xover(intermediatepkt, newpkt, nextif)
206206}
0 commit comments