Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jcp19 committed Jul 11, 2024
1 parent 5f37554 commit 3909bf7
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions pkg/slayers/path/scion/base_spec.gobra
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,7 @@ ghost
requires b.Valid()
ensures b.ReverseSpec().Valid()
decreases
pure func (b Base) ReversingBaseValidSegLenHasValidSegLen() Lemma {
return Lemma{}
}
func (b Base) ReversingBaseValidSegLenHasValidSegLen() { }

ghost
requires b.Mem()
Expand Down Expand Up @@ -326,21 +324,6 @@ pure func (s MetaHdr) EqAbsHeader(ub []byte) bool {
s == DecodedFrom(binary.BigEndian.Uint32(ub[:MetaLen]))
}

ghost
opaque
requires MetaLen <= idx && idx <= len(ub)
requires acc(sl.Bytes(ub, 0, len(ub)), R55)
requires acc(sl.Bytes(ub[:idx], 0, idx), R55)
ensures s.EqAbsHeader(ub) == s.EqAbsHeader(ub[:idx])
decreases
pure func (s MetaHdr) EqAbsHeaderForSublice(ub []byte, idx int) Lemma {
return let _ := Asserting(ub[:MetaLen] === ub[:idx][:MetaLen]) in
unfolding acc(sl.Bytes(ub, 0, len(ub)), R56) in
unfolding acc(sl.Bytes(ub[:idx], 0, idx), R56) in
let _ := Asserting(s.EqAbsHeader(ub) == (s == DecodedFrom(binary.BigEndian.Uint32(ub[:MetaLen])))) in
Lemma{}
}

/** Lemma proven in /VerifiedSCION/verification/utils/bitwise/proofs.dfy **/
ghost
requires m.InBounds()
Expand Down

0 comments on commit 3909bf7

Please sign in to comment.