[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 btree-truncate

btree_truncate#(KEY, RP, ADR0, ROOTADR, ISTORE0, GINVAL, GSTORE, GSTORE0, NL, MAXINO, OS, PSTATE, PSYNCED; R, DIRTY, DONE, AS, ZH, ISTORE; ERR) {btree_io_load#(RP, ADR0, ROOTADR, ISTORE, ISTORE0, GINVAL, GSTORE, GSTORE0, NL, MAXINO, OS, PSTATE, PSYNCED; R, ZH; ERR); if ERR = ESUCCESS then if ZH[R].leaf then let POSITION = 0, N = 0 in {btree_io_scan#(KEY, 0, R, ZH; POSITION); while POSITION + N < ZH[R].usedsize ∧ KEY.ino = ZH[R].zbranches[POSITION + N].key.ino ∧ ZH[R].zbranches[POSITION + N].key.data? do {if ZH[R].zbranches[POSITION + N].entry? then AS := AS ++ ZH[R].zbranches[POSITION + N].adr; DIRTY := true; N := N + 1}; btree_io_shift_n_left#(POSITION, N, R; ZH); DONE := POSITION + N < ZH[R].usedsize; ZH[R].usedsize := ZH[R].usedsize - N} else let N = 0 in {btree_io_scan#(KEY, 1, R, ZH; N); while N < ZH[R].usedsize ∧ ¬ DONE do let RC = ZH[R].zbranches[N].child, ADRC = ZH[R].zbranches[N].adr in {btree_truncate# (KEY, R, ADRC, ROOTADR, ISTORE0, GINVAL, GSTORE, GSTORE0, NL, MAXINO, OS, PSTATE, PSYNCED; RC, DIRTY, DONE, AS, ZH, ISTORE; ERR); ZH[R].zbranches[N].child := RC; if ZH[RC].usedsize = 0 ∧ ZH[R].usedsize ≠ 0 then {btree_io_shift_left#(N, R; ZH); ZH[R].usedsize := ZH[R].usedsize - 1; ZH := ZH -- RC} else N := N + 1}}; btree_io_dirty#(R, ADR0, DIRTY, ROOTADR, ISTORE0, GINVAL, GSTORE, GSTORE0, NL, MAXINO, OS, PSTATE, PSYNCED; ERR, ZH, ISTORE) }