File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed
Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -83,6 +83,7 @@ type Path struct {
8383// @ preserves let ub := p.UBytes() in
8484// @ sl.Bytes(ub, 0, len(ub))
8585// @ preserves sl.Bytes(b, 0, len(b))
86+ // @ ensures old(p.UBytes()) === p.UBytes()
8687// @ ensures r != nil ==> r.ErrorMem()
8788// @ ensures !old(p.HasScionPath()) ==> r != nil
8889// @ ensures len(b) < old(p.LenSpec()) ==> r != nil
Original file line number Diff line number Diff line change @@ -83,6 +83,7 @@ type Path interface {
8383 //@ preserves acc(Mem(), R1)
8484 //@ preserves sl.Bytes(UBytes(), 0, len(UBytes()))
8585 //@ preserves sl.Bytes(b, 0, len(b))
86+ //@ ensures UBytes() === old(UBytes())
8687 //@ ensures e != nil ==> e.ErrorMem()
8788 //@ decreases
8889 SerializeTo (b []byte ) (e error )
@@ -92,7 +93,10 @@ type Path interface {
9293 //@ requires NonInitMem()
9394 //@ requires acc(sl.Bytes(b, 0, len(b)), R42)
9495 //@ ensures err == nil ==> Mem()
96+ // The following post contains the conjunct 0 < len(b) on the LHS
97+ // specifically to support the implementation proof for the empty path.
9598 //@ ensures err == nil && 0 < len(b) ==> UBytes() === b
99+ //@ ensures err == nil && 0 == len(b) ==> UBytes() === b || UBytes() == nil
96100 //@ ensures err == nil ==>
97101 //@ acc(sl.Bytes(UBytes(), 0, len(UBytes())), R42)
98102 //@ ensures err == nil ==> IsValidResultOfDecoding()
You can’t perform that action at this time.
0 commit comments