~/bend-docscommunity

PROOF_whole.bend checks

raw source on the hub · import bend-osdev-acpi@0.1.2.0/PROOF_whole.bend as PROOF_whole

The proof of LAWS_whole.bend.

AcpiSdt.build(h, body) is fix(9, encode(h0) ++ body), h0 being h with its Length computed and its Checksum 0. The header's first 9 bytes and the bytes from 10 on are untouched by fix, so the table is encode(hk) ++ body, hk being h with the Length and the Checksum k that fix writes (ckw.bl1, through bytes' take, drop and append laws, ckw.gfix). Its bytes sum to zero (LAWS_checksum.bend: fix_ok); its Length field reads 36 + len(body) back (ckw.p1, ckw.fnv: the U32 of a Nat no more than a U32's value has that value), which is the table's length (tb.lenchk), so AcpiSdt.check accepts the whole table (ckw.chk); its header decodes as hk with any bytes after it (ckw.dec, as PROOF.bend's hdr_rt does without them), and the bytes after the header are the body (tb.elen). Each table's parse then checks the signature build wrote and reads the body by the laws of LAWS_tables.bend.

25 imports
import Base
import bend-osdev-word64@0.1.1.1/word64.bend as W
import bend-osdev-word64@0.1.1.1/LAWS.bend as WL
import bend-osdev-word64@0.1.1.1/PROOF.bend as WP
import bend-osdev-bytes@0.1.1.1/bytes.bend as B
import bend-osdev-bytes@0.1.1.1/LAWS.bend as BL
import bend-osdev-bytes@0.1.1.1/PROOF.bend as BP
import bend-osdev-u32@0.1.0.0/LAWS.bend as UL
import bend-osdev-u32@0.1.0.0/PROOF.bend as UP
import bend-osdev-u32@0.1.0.0/LAWS_order.bend as UO
import bend-osdev-u32@0.1.0.0/PROOF_order.bend as UOP
import ./error.bend as E
import ./header.bend as H
import ./checksum.bend as C
import ./gas.bend as G
import ./hpet.bend as Hp
import ./bgrt.bend as Bg
import ./rsdt.bend as R
import ./mcfg.bend as Mc
import ./dsdt.bend as Ds
import ./LAWS_tables.bend as TL
import ./PROOF_tables.bend as TP
import ./LAWS_checksum.bend as CL
import ./PROOF_checksum.bend as CP
import ./LAWS_whole.bend as Laws

Definitions

def ckw.fnh source · line 44 · raw

@+p:Nat -> @+z:U32 -> @+h:{Nat.is_le(1n+p, U32.to_nat(z)) == True{} : Bool} -> @+ih:{U32.to_nat(U32.from_nat(p)) == p : Nat} -> {Nat.is_le(1n+U32.to_nat(U32.from_nat(p)), U32.to_nat(z)) == True{} : Bool}

def ckw.fnv source · line 48 · raw

@+n:Nat -> @+z:U32 -> @+h:{Nat.is_le(n, U32.to_nat(z)) == True{} : Bool} -> {U32.to_nat(U32.from_nat(n)) == n : Nat}

def ckw.l4 source · line 59 · raw

@+v:U32 -> {Nat.is_le(Nat.add(0n, 4n), 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.le32(v))) == True{} : Bool}

def ckw.lt01 source · line 63 · raw

@+k:U32 -> {Nat.is_lt(0n, 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(0x437a65a35fd0c02411bea19819f9b33f/header.hd.byte(k))) == True{} : Bool}

def ckw.ra source · line 69 · raw

@+s:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+l:U32 -> @+r:U32 -> @+c:U32 -> @+o:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+t:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+orv:U32 -> @+ci:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+cr:U32 -> @+body:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> {0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.append(0x437a65a35fd0c02411bea19819f9b33f/header.AcpiHeader.encode(0x437a65a35fd0c02411bea19819f9b33f/header.AcpiHeader{s, l, r, c, o, t, orv, ci, cr}), body) == 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.append(s, 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.append(0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.le32(l), 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.append(0x437a65a35fd0c02411bea19819f9b33f/header.hd.byte(r), 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.append(0x437a65a35fd0c02411bea19819f9b33f/header.hd.byte(c), 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.append(o, 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.append(t, 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.append(0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.le32(orv), 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.append(ci, 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.append(0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.le32(cr), body))))))))) : 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets}

def ckw.dec source · line 80 · raw

@+s:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+l:U32 -> @+r:U32 -> @+c:U32 -> @+o:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+t:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+orv:U32 -> @+ci:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+cr:U32 -> @+sig4:{0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(s) == 4n : Nat} -> @+oem6:{0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(o) == 6n : Nat} -> @+tid8:{0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(t) == 8n : Nat} -> @+cid4:{0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(ci) == 4n : Nat} -> @+body:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> {0x437a65a35fd0c02411bea19819f9b33f/header.AcpiHeader.decode(0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.append(0x437a65a35fd0c02411bea19819f9b33f/header.AcpiHeader.encode(0x437a65a35fd0c02411bea19819f9b33f/header.AcpiHeader{s, l, r, c, o, t, orv, ci, cr}), body)) == Done{0x437a65a35fd0c02411bea19819f9b33f/header.AcpiHeader{s, l, 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.byte(r), 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.byte(c), o, t, orv, ci, cr}} : Result<&2, &2, 0x437a65a35fd0c02411bea19819f9b33f/error.AcpiError, 0x437a65a35fd0c02411bea19819f9b33f/header.AcpiHeader>}

def ckw.enc source · line 111 · raw

@+s:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+l:U32 -> @+r:U32 -> @+c:U32 -> @+o:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+t:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+orv:U32 -> @+ci:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+cr:U32 -> @+body:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> {0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.append(0x437a65a35fd0c02411bea19819f9b33f/header.AcpiHeader.encode(0x437a65a35fd0c02411bea19819f9b33f/header.AcpiHeader{s, l, r, c, o, t, orv, ci, cr}), body) == 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.append(0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.append(s, 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.append(0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.le32(l), 0x437a65a35fd0c02411bea19819f9b33f/header.hd.byte(r))), 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.append(0x437a65a35fd0c02411bea19819f9b33f/header.hd.byte(c), 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.append(o, 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.append(t, 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.append(0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.le32(orv), 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.append(ci, 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.append(0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.le32(cr), body))))))) : 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets}

def ckw.plen source · line 117 · raw

@+s:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+l:U32 -> @+r:U32 -> @+sig4:{0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(s) == 4n : Nat} -> {0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.append(s, 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.append(0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.le32(l), 0x437a65a35fd0c02411bea19819f9b33f/header.hd.byte(r)))) == 9n : Nat}

def ckw.ltadd source · line 127 · raw

@+i:Nat -> @+r:Nat -> {Nat.is_lt(i, Nat.add(i, 1n+r)) == True{} : Bool}

def ckw.glt source · line 134 · raw

@+i:Nat -> @+p:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+q:U32 -> @+rest:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+hp:{0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(p) == i : Nat} -> {Nat.is_lt(i, 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.append(p, 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.append(0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.of_list([q]), rest)))) == True{} : Bool}

def ckw.gfix source · line 141 · raw

@+i:Nat -> @+p:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+q:U32 -> @+rest:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+hp:{0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(p) == i : Nat} -> {0x437a65a35fd0c02411bea19819f9b33f/checksum.AcpiChecksum.fix(i, 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.append(p, 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.append(0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.of_list([q]), rest))) == 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.append(p, 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.append(0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.of_list([0x437a65a35fd0c02411bea19819f9b33f/checksum.AcpiChecksum.byte_for(i, 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.append(p, 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.append(0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.of_list([q]), rest)))]), rest)) : 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets}

def ckw.bl1 source · line 158 · raw

@+s:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+l:U32 -> @+r:U32 -> @+c:U32 -> @+o:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+t:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+orv:U32 -> @+ci:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+cr:U32 -> @+sig4:{0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(s) == 4n : Nat} -> @+body:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> {0x437a65a35fd0c02411bea19819f9b33f/header.AcpiSdt.build(0x437a65a35fd0c02411bea19819f9b33f/header.AcpiHeader{s, l, r, c, o, t, orv, ci, cr}, body) == 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.append(0x437a65a35fd0c02411bea19819f9b33f/header.AcpiHeader.encode(0x437a65a35fd0c02411bea19819f9b33f/header.AcpiHeader{s, U32.from_nat(Nat.add(36n, 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(body))), r, 0x437a65a35fd0c02411bea19819f9b33f/checksum.AcpiChecksum.byte_for(9n, 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.append(0x437a65a35fd0c02411bea19819f9b33f/header.AcpiHeader.encode(0x437a65a35fd0c02411bea19819f9b33f/header.AcpiHeader{s, U32.from_nat(Nat.add(36n, 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(body))), r, 0, o, t, orv, ci, cr}), body)), o, t, orv, ci, cr}), body) : 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets}

def ckw.p1 source · line 165 · raw

@+s:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+l:U32 -> @+r:U32 -> @+k:U32 -> @+o:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+t:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+orv:U32 -> @+ci:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+cr:U32 -> @+sig4:{0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(s) == 4n : Nat} -> @+body:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> {0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.le32_at(0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.append(0x437a65a35fd0c02411bea19819f9b33f/header.AcpiHeader.encode(0x437a65a35fd0c02411bea19819f9b33f/header.AcpiHeader{s, l, r, k, o, t, orv, ci, cr}), body), 4n) == Some{l} : Maybe<&2, U32>}

def ckw.at9 source · line 172 · raw

@+s:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+l:U32 -> @+r:U32 -> @+zz:U32 -> @+o:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+t:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+orv:U32 -> @+ci:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+cr:U32 -> @+sig4:{0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(s) == 4n : Nat} -> @+body:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> {0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.at(0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.append(0x437a65a35fd0c02411bea19819f9b33f/header.AcpiHeader.encode(0x437a65a35fd0c02411bea19819f9b33f/header.AcpiHeader{s, l, r, U32.and(255, zz), o, t, orv, ci, cr}), body), 9n) == Some{U32.and(255, zz)} : Maybe<&2, U32>}

def ckw.chk source · line 185 · raw

@+s:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+r:U32 -> @+k:U32 -> @+o:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+t:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+orv:U32 -> @+ci:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+cr:U32 -> @+sig4:{0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(s) == 4n : Nat} -> @+oem6:{0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(o) == 6n : Nat} -> @+tid8:{0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(t) == 8n : Nat} -> @+cid4:{0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(ci) == 4n : Nat} -> @+body:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+z:U32 -> @+fit:{Nat.is_le(Nat.add(36n, 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(body)), U32.to_nat(z)) == True{} : Bool} -> @+okq:{0x437a65a35fd0c02411bea19819f9b33f/checksum.AcpiChecksum.ok(0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.append(0x437a65a35fd0c02411bea19819f9b33f/header.AcpiHeader.encode(0x437a65a35fd0c02411bea19819f9b33f/header.AcpiHeader{s, U32.from_nat(Nat.add(36n, 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(body))), r, k, o, t, orv, ci, cr}), body)) == True{} : Bool} -> {0x437a65a35fd0c02411bea19819f9b33f/header.AcpiSdt.check(0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.append(0x437a65a35fd0c02411bea19819f9b33f/header.AcpiHeader.encode(0x437a65a35fd0c02411bea19819f9b33f/header.AcpiHeader{s, U32.from_nat(Nat.add(36n, 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(body))), r, k, o, t, orv, ci, cr}), body)) == Done{0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.append(0x437a65a35fd0c02411bea19819f9b33f/header.AcpiHeader.encode(0x437a65a35fd0c02411bea19819f9b33f/header.AcpiHeader{s, U32.from_nat(Nat.add(36n, 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(body))), r, k, o, t, orv, ci, cr}), body)} : Result<&2, &2, 0x437a65a35fd0c02411bea19819f9b33f/error.AcpiError, 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets>}

def ckw.blen source · line 196 · raw

@+s:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+l:U32 -> @+r:U32 -> @+c:U32 -> @+o:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+t:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+orv:U32 -> @+ci:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+cr:U32 -> @+sig4:{0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(s) == 4n : Nat} -> @+oem6:{0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(o) == 6n : Nat} -> @+tid8:{0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(t) == 8n : Nat} -> @+cid4:{0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(ci) == 4n : Nat} -> @+body:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> {Nat.add(36n, 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(body)) == 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(0x437a65a35fd0c02411bea19819f9b33f/header.AcpiSdt.build(0x437a65a35fd0c02411bea19819f9b33f/header.AcpiHeader{s, l, r, c, o, t, orv, ci, cr}, body)) : Nat}

def ckw.hlt source · line 200 · raw

@+s:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+l:U32 -> @+r:U32 -> @+c:U32 -> @+o:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+t:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+orv:U32 -> @+ci:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+cr:U32 -> @+sig4:{0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(s) == 4n : Nat} -> @+oem6:{0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(o) == 6n : Nat} -> @+tid8:{0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(t) == 8n : Nat} -> @+cid4:{0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(ci) == 4n : Nat} -> @+body:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> {Nat.is_lt(9n, 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.append(0x437a65a35fd0c02411bea19819f9b33f/header.AcpiHeader.encode(0x437a65a35fd0c02411bea19819f9b33f/header.AcpiHeader{s, U32.from_nat(Nat.add(36n, 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(body))), r, 0, o, t, orv, ci, cr}), body))) == True{} : Bool}

def ckw.okq source · line 204 · raw

@+s:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+l:U32 -> @+r:U32 -> @+c:U32 -> @+o:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+t:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+orv:U32 -> @+ci:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+cr:U32 -> @+sig4:{0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(s) == 4n : Nat} -> @+oem6:{0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(o) == 6n : Nat} -> @+tid8:{0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(t) == 8n : Nat} -> @+cid4:{0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(ci) == 4n : Nat} -> @+body:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> {0x437a65a35fd0c02411bea19819f9b33f/checksum.AcpiChecksum.ok(0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.append(0x437a65a35fd0c02411bea19819f9b33f/header.AcpiHeader.encode(0x437a65a35fd0c02411bea19819f9b33f/header.AcpiHeader{s, U32.from_nat(Nat.add(36n, 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(body))), r, 0x437a65a35fd0c02411bea19819f9b33f/checksum.AcpiChecksum.byte_for(9n, 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.append(0x437a65a35fd0c02411bea19819f9b33f/header.AcpiHeader.encode(0x437a65a35fd0c02411bea19819f9b33f/header.AcpiHeader{s, U32.from_nat(Nat.add(36n, 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(body))), r, 0, o, t, orv, ci, cr}), body)), o, t, orv, ci, cr}), body)) == True{} : Bool}

def ckw.fitq source · line 208 · raw

@+s:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+l:U32 -> @+r:U32 -> @+c:U32 -> @+o:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+t:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+orv:U32 -> @+ci:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+cr:U32 -> @+sig4:{0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(s) == 4n : Nat} -> @+oem6:{0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(o) == 6n : Nat} -> @+tid8:{0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(t) == 8n : Nat} -> @+cid4:{0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(ci) == 4n : Nat} -> @+body:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+z:U32 -> @+fit:{Nat.is_le(0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(0x437a65a35fd0c02411bea19819f9b33f/header.AcpiSdt.build(0x437a65a35fd0c02411bea19819f9b33f/header.AcpiHeader{s, l, r, c, o, t, orv, ci, cr}, body)), U32.to_nat(z)) == True{} : Bool} -> {Nat.is_le(Nat.add(36n, 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(body)), U32.to_nat(z)) == True{} : Bool}

def ckw.core source · line 214 · raw

@+s:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+l:U32 -> @+r:U32 -> @+c:U32 -> @+o:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+t:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+orv:U32 -> @+ci:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+cr:U32 -> @+sig4:{0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(s) == 4n : Nat} -> @+oem6:{0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(o) == 6n : Nat} -> @+tid8:{0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(t) == 8n : Nat} -> @+cid4:{0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(ci) == 4n : Nat} -> @+rev8:{0x15cc157649e26d54c7c549cb80d4a2a9/bytes.byte(r) == r : U32} -> @+body:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+z:U32 -> @+fit:{Nat.is_le(0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(0x437a65a35fd0c02411bea19819f9b33f/header.AcpiSdt.build(0x437a65a35fd0c02411bea19819f9b33f/header.AcpiHeader{s, l, r, c, o, t, orv, ci, cr}, body)), U32.to_nat(z)) == True{} : Bool} -> {0x437a65a35fd0c02411bea19819f9b33f/header.AcpiSdt.parse(0x437a65a35fd0c02411bea19819f9b33f/header.AcpiSdt.build(0x437a65a35fd0c02411bea19819f9b33f/header.AcpiHeader{s, l, r, c, o, t, orv, ci, cr}, body)) == Done{0x437a65a35fd0c02411bea19819f9b33f/header.AcpiSdt{0x437a65a35fd0c02411bea19819f9b33f/header.AcpiHeader{s, U32.from_nat(0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(0x437a65a35fd0c02411bea19819f9b33f/header.AcpiSdt.build(0x437a65a35fd0c02411bea19819f9b33f/header.AcpiHeader{s, l, r, c, o, t, orv, ci, cr}, body))), r, Maybe.default(&2, U32, 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.at(0x437a65a35fd0c02411bea19819f9b33f/header.AcpiSdt.build(0x437a65a35fd0c02411bea19819f9b33f/header.AcpiHeader{s, l, r, c, o, t, orv, ci, cr}, body), 9n), 0), o, t, orv, ci, cr}, body}} : Result<&2, &2, 0x437a65a35fd0c02411bea19819f9b33f/error.AcpiError, 0x437a65a35fd0c02411bea19819f9b33f/header.AcpiSdt>}

def ckw.hpfit source · line 234 · raw

@+l0:U32 -> @+r0:U32 -> @+c0:U32 -> @+o0:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+t0:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+orv0:U32 -> @+ci0:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+cr0:U32 -> @+oem6b:{0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(o0) == 6n : Nat} -> @+tid8b:{0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(t0) == 8n : Nat} -> @+cid4b:{0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(ci0) == 4n : Nat} -> @+id:U32 -> @+gs:U32 -> @+gw:U32 -> @+go:U32 -> @+ga:U32 -> @+gaddr:0xea9c6e6209a3ac3fb21596f70f09f650/word64.W64 -> @+n:U32 -> @+m:U32 -> @+p:U32 -> {Nat.is_le(0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(0x437a65a35fd0c02411bea19819f9b33f/header.AcpiSdt.build(0x437a65a35fd0c02411bea19819f9b33f/header.AcpiHeader{0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.of_string("HPET"), l0, r0, c0, o0, t0, orv0, ci0, cr0}, 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.concat([0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.le32(id), 0x437a65a35fd0c02411bea19819f9b33f/gas.AcpiGas.encode(0x437a65a35fd0c02411bea19819f9b33f/gas.AcpiGas{gs, gw, go, ga, gaddr}), 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.of_list([n]), 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.le16(m), 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.of_list([p])]))), U32.to_nat(56)) == True{} : Bool}

the HPET and the BGRT are 56 bytes long

def ckw.bgfit source · line 247 · raw

@+l0:U32 -> @+r0:U32 -> @+c0:U32 -> @+o0:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+t0:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+orv0:U32 -> @+ci0:0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets -> @+cr0:U32 -> @+oem6b:{0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(o0) == 6n : Nat} -> @+tid8b:{0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(t0) == 8n : Nat} -> @+cid4b:{0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(ci0) == 4n : Nat} -> @+v:U32 -> @+st:U32 -> @+it:U32 -> @+a:0xea9c6e6209a3ac3fb21596f70f09f650/word64.W64 -> @+x:U32 -> @+y:U32 -> {Nat.is_le(0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.len(0x437a65a35fd0c02411bea19819f9b33f/header.AcpiSdt.build(0x437a65a35fd0c02411bea19819f9b33f/header.AcpiHeader{0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.of_string("BGRT"), l0, r0, c0, o0, t0, orv0, ci0, cr0}, 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.concat([0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.le16(v), 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.of_list([st, it]), 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.le64(a), 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.le32(x), 0x15cc157649e26d54c7c549cb80d4a2a9/bytes.Octets.le32(y)]))), U32.to_nat(56)) == True{} : Bool}