src/storage/route.bend checks
raw source on the hub · import bendtorch-core@0.1.0.0/src/storage/route.bend as Route
6 imports
import Base import ./model.bend as Model import ./size.bend as Size import ./refinement.bend as Refinement import ./main.bend as Storage import ./arith.bend as Arith
Definitions
def cap_unit source · line 8 · raw
@+d:Nat -> @+h:{Nat.is_le(d, 20n) == True{} : Bool} -> {U32{0x1689e5deb278c16abd3bd45eac101ef3/src/storage/arith.unit(32n, d)} == 0x1689e5deb278c16abd3bd45eac101ef3/src/storage/size.capacity(d) : U32}
def shr_cap source · line 95 · raw
@+d:Nat -> @+h:{Nat.is_le(1n+d, 20n) == True{} : Bool} -> {0x1689e5deb278c16abd3bd45eac101ef3/src/storage/size.capacity(d) == U32.shr(0x1689e5deb278c16abd3bd45eac101ef3/src/storage/size.capacity(1n+d)) : U32}
def mask_cap source · line 178 · raw
@+d:Nat -> @+h:{Nat.is_le(d, 20n) == True{} : Bool} -> {U32{0x1689e5deb278c16abd3bd45eac101ef3/src/storage/arith.low(32n, d)} == U32.sub(0x1689e5deb278c16abd3bd45eac101ef3/src/storage/size.capacity(d), 1) : U32}
def cap_nat source · line 265 · raw
@+d:Nat -> @+h:{Nat.is_le(d, 20n) == True{} : Bool} -> {0x1689e5deb278c16abd3bd45eac101ef3/src/storage/model.capacity(d) == U32.to_nat(0x1689e5deb278c16abd3bd45eac101ef3/src/storage/size.capacity(d)) : Nat}
def cap_word source · line 269 · raw
@+d:Nat -> @+h:{Nat.is_le(d, 20n) == True{} : Bool} -> {U32.to_nat(0x1689e5deb278c16abd3bd45eac101ef3/src/storage/size.capacity(d)) == 0x1689e5deb278c16abd3bd45eac101ef3/src/storage/model.capacity(d) : Nat}
def low_inside source · line 272 · raw
@+p:Nat -> @+i:U32 -> @+h:{Nat.is_le(1n+p, 20n) == True{} : Bool} -> @+dz:{True{} == U32.is_lt(i, U32.shr(0x1689e5deb278c16abd3bd45eac101ef3/src/storage/size.capacity(1n+p))) : Bool} -> {Nat.is_lt(U32.to_nat(i), 0x1689e5deb278c16abd3bd45eac101ef3/src/storage/model.capacity(p)) == True{} : Bool}
def high_not_lt source · line 281 · raw
@+p:Nat -> @+i:U32 -> @+h:{Nat.is_le(1n+p, 20n) == True{} : Bool} -> @+dz:{False{} == U32.is_lt(i, U32.shr(0x1689e5deb278c16abd3bd45eac101ef3/src/storage/size.capacity(1n+p))) : Bool} -> {Nat.is_lt(U32.to_nat(i), U32.to_nat(0x1689e5deb278c16abd3bd45eac101ef3/src/storage/size.capacity(p))) == False{} : Bool}
def high_le source · line 289 · raw
@+p:Nat -> @+i:U32 -> @+h:{Nat.is_le(1n+p, 20n) == True{} : Bool} -> @+dz:{False{} == U32.is_lt(i, U32.shr(0x1689e5deb278c16abd3bd45eac101ef3/src/storage/size.capacity(1n+p))) : Bool} -> {Nat.is_le(U32.to_nat(0x1689e5deb278c16abd3bd45eac101ef3/src/storage/size.capacity(p)), U32.to_nat(i)) == True{} : Bool}
def high_split source · line 294 · raw
@+p:Nat -> @+i:U32 -> @+hp:{Nat.is_le(p, 20n) == True{} : Bool} -> @+le:{Nat.is_le(U32.to_nat(0x1689e5deb278c16abd3bd45eac101ef3/src/storage/size.capacity(p)), U32.to_nat(i)) == True{} : Bool} -> {U32.to_nat(i) == Nat.add(0x1689e5deb278c16abd3bd45eac101ef3/src/storage/model.capacity(p), U32.to_nat(U32.sub(i, 0x1689e5deb278c16abd3bd45eac101ef3/src/storage/size.capacity(p)))) : Nat}
def high_sum source · line 300 · raw
@+p:Nat -> @+i:U32 -> @+hp:{Nat.is_le(p, 20n) == True{} : Bool} -> @+le:{Nat.is_le(U32.to_nat(0x1689e5deb278c16abd3bd45eac101ef3/src/storage/size.capacity(p)), U32.to_nat(i)) == True{} : Bool} -> @+inside:{Nat.is_lt(U32.to_nat(i), 0x1689e5deb278c16abd3bd45eac101ef3/src/storage/model.capacity(1n+p)) == True{} : Bool} -> {Nat.is_lt(Nat.add(0x1689e5deb278c16abd3bd45eac101ef3/src/storage/model.capacity(p), U32.to_nat(U32.sub(i, 0x1689e5deb278c16abd3bd45eac101ef3/src/storage/size.capacity(p)))), Nat.add(0x1689e5deb278c16abd3bd45eac101ef3/src/storage/model.capacity(p), 0x1689e5deb278c16abd3bd45eac101ef3/src/storage/model.capacity(p))) == True{} : Bool}
def high_inside source · line 307 · raw
@+p:Nat -> @+i:U32 -> @+hp:{Nat.is_le(p, 20n) == True{} : Bool} -> @+le:{Nat.is_le(U32.to_nat(0x1689e5deb278c16abd3bd45eac101ef3/src/storage/size.capacity(p)), U32.to_nat(i)) == True{} : Bool} -> @+inside:{Nat.is_lt(U32.to_nat(i), 0x1689e5deb278c16abd3bd45eac101ef3/src/storage/model.capacity(1n+p)) == True{} : Bool} -> {Nat.is_lt(U32.to_nat(U32.sub(i, 0x1689e5deb278c16abd3bd45eac101ef3/src/storage/size.capacity(p))), 0x1689e5deb278c16abd3bd45eac101ef3/src/storage/model.capacity(p)) == True{} : Bool}
def trace_offset source · line 314 · raw
@+d:Nat -> @+i:U32 -> @z:Bool -> @+dz:{z == U32.is_lt(i, U32.shr(0x1689e5deb278c16abd3bd45eac101ef3/src/storage/size.capacity(d))) : Bool} -> @+h:{Nat.is_le(d, 20n) == True{} : Bool} -> @+inside:{Nat.is_lt(U32.to_nat(i), 0x1689e5deb278c16abd3bd45eac101ef3/src/storage/model.capacity(d)) == True{} : Bool} -> {U32.to_nat(i) == 0x1689e5deb278c16abd3bd45eac101ef3/src/storage/model.offset(d, 0x1689e5deb278c16abd3bd45eac101ef3/src/storage/refinement.trace(d, 0x1689e5deb278c16abd3bd45eac101ef3/src/storage/size.capacity(d), i, z)) : Nat}
def mask_u32 source · line 334 · raw
@+d:Nat -> @+i:U32 -> @+h:{Nat.is_le(d, 20n) == True{} : Bool} -> @+inside:{Nat.is_lt(U32.to_nat(i), 0x1689e5deb278c16abd3bd45eac101ef3/src/storage/model.capacity(d)) == True{} : Bool} -> {i == U32.and(i, U32.sub(0x1689e5deb278c16abd3bd45eac101ef3/src/storage/size.capacity(d), 1)) : U32}
def route_offset source · line 343 · raw
@+d:Nat -> @+i:U32 -> @+h:{Nat.is_le(d, 20n) == True{} : Bool} -> @+inside:{Nat.is_lt(U32.to_nat(i), 0x1689e5deb278c16abd3bd45eac101ef3/src/storage/model.capacity(d)) == True{} : Bool} -> {U32.to_nat(i) == 0x1689e5deb278c16abd3bd45eac101ef3/src/storage/model.offset(d, 0x1689e5deb278c16abd3bd45eac101ef3/src/storage/refinement.route(d, i)) : Nat}
def index_complete source · line 349 · raw
@+d:Nat -> @+n:Nat -> @+i:U32 -> @+fits:{0x1689e5deb278c16abd3bd45eac101ef3/src/storage/main.bounds(d, n) == True{} : Bool} -> @+inside:{Nat.is_lt(U32.to_nat(i), n) == True{} : Bool} -> {True{} == 0x1689e5deb278c16abd3bd45eac101ef3/src/storage/main.index_matches(d, n, i) : Bool}
def index_matched source · line 359 · raw
@+d:Nat -> @+n:Nat -> @+i:U32 -> @+fits:{0x1689e5deb278c16abd3bd45eac101ef3/src/storage/main.bounds(d, n) == True{} : Bool} -> @+inside:{Nat.is_lt(U32.to_nat(i), n) == True{} : Bool} -> {0x1689e5deb278c16abd3bd45eac101ef3/src/storage/main.index_matches(d, n, i) == True{} : Bool}