[Imprint][Data Privacy Statement][E-Mail]

View long theorem info. View the proof. Back to main index. View the specification. View theorem base summary, View theorem base listing, the used properties by spec, the dependency list, the symbol table,

Theorem add-ind

persistence_add_ind#(IND, LEBSIZE, WROOTADR, WMAXINO, WLOG, WLPT, WORPHANS, WBUFLEB; ADR, LPT, WVOL, AROFS; ERR) {if ¬ AROFS → WBUFLEB.isbuf? ∧ WBUFLEB.leb < # LPT ∧ LPT[WBUFLEB.leb].flags = LP_INDEX_NODES ∧ WVOL[WBUFLEB.leb].mapped? ∧ (LPT[WBUFLEB.leb].size + IND.flashsize ≤ LEB_SIZE → LPT[WBUFLEB.leb].size = # WVOL[WBUFLEB.leb].data) then let AROFS0 = ? in {awbuf_is_readonly#(WROOTADR, WMAXINO, WLOG, WVOL, WLPT, WORPHANS, WBUFLEB, AROFS; ; AROFS0); if AROFS0 then ERR := EROFS else let BUF = mkbuf(IND.flashsize), SIZE = ?, WBUFLEB0 = ? in {awbuf_get_buf#(WROOTADR, WMAXINO, WLOG, WVOL, WLPT, WORPHANS, WBUFLEB, AROFS; ; WBUFLEB0); encode_index_node#(IND, 0; SIZE, BUF; ERR); if ERR = ESUCCESS then if ¬ LPT[WBUFLEB0.leb].size + SIZE ≤ LEBSIZE then {debug#("persistence: trying to write beyond LEB size"); awbuf_enter_readonly#(WROOTADR, WMAXINO, WLOG, WVOL, WLPT, WORPHANS, WBUFLEB; ; AROFS); ERR := ENOSPC} else {awbuf_write_buf#(SIZE, BUF, WROOTADR, WMAXINO, WLOG, WLPT, WORPHANS, WBUFLEB; WVOL, AROFS; ERR); if ERR = ESUCCESS then {ADR := @(WBUFLEB0.leb, LPT[WBUFLEB0.leb].size, SIZE); LPT[WBUFLEB0.leb].size := LPT[WBUFLEB0.leb].size + SIZE} else LPT[WBUFLEB0.leb].size := LEBSIZE} else {debug#("persistence: could not encode index node"); awbuf_enter_readonly#(WROOTADR, WMAXINO, WLOG, WVOL, WLPT, WORPHANS, WBUFLEB; ; AROFS)}}} else abort }