| m3 + 1 = fs0[ri[inodekey(fs0[ri[dentrykey(m1, str)]].ino)]].nlink, fs = fs0[adr1, inodenode(inodekey(m1), md0, true, fs0[ri[inodekey(m1)]].nlink, fs0[ri[inodekey(m1)]].nsubdirs, fs0[ri[inodekey(m1)]].size - 1)] [adr2, dentrynode(dentrykey(m1, str), 0) ] [adr3, inodenode(inodekey(fs0[ri[dentrykey(m1, str)]].ino), md, false, m3, fs0[ri[inodekey(fs0[ri[dentrykey(m1, str)]].ino)]].nsubdirs, m2) ], m = fs0[ri[dentrykey(m1, str)]].ino, nd = inodenode(inodekey(fs0[ri[dentrykey(m1, str)]].ino), md, false, m3, fs0[ri[inodekey(fs0[ri[dentrykey(m1, str)]].ino)]].nsubdirs, m2), nd1 = inodenode(inodekey(m1), md0, true, fs0[ri[inodekey(m1)]].nlink, fs0[ri[inodekey(m1)]].nsubdirs, fs0[ri[inodekey(m1)]].size - 1), fs0[ri[dentrykey(m1, str)]].ino ≠ ROOT_INO, fs0[ri[dentrykey(m1, str)]].ino ≠ 0, fs0[ri[inodekey(m1)]].size ≠ 0, adr1 ≠ adr2, adr1 ≠ adr3, adr2 ≠ adr3, m1 ≠ 0, fs0[ri[inodekey(m1)]].directory, fs0[ri[inodekey(fs0[ri[dentrykey(m1, str)]].ino)]].inode?, fs0[ri[inodekey(m1)]].inode?, ro.inodes?, fo.inodes?, file-node-cons(fs0, ri), log-cons(log0, fs0), orphans-cons(fs0, ri, ro), replay-cons-strong(fs0, ri, ro, fi, fo, log0), ri-cons(ri, fs0), ri-inj(ri), ri-inj(fi), ubifs-cons(fs0, ri, ro, fi, fo, log0), ri[inodekey(fs0[ri[dentrykey(m1, str)]].ino)] ∈ fs0, dentrykey(m1, str) ∈ ri, inodekey(fs0[ri[dentrykey(m1, str)]].ino) ∈ ri, ri[inodekey(m1)] ∈ fs0, inodekey(m1) ∈ ri, 1 ≤ fs0[ri[inodekey(m1)]].size, ¬ fs0[ri[inodekey(fs0[ri[dentrykey(m1, str)]].ino)]].directory, ¬ adr3 ∈ fs0, ¬ adr2 ∈ fs0, ¬ adr1 ∈ fs0, ¬ inodekey(fs0[ri[dentrykey(m1, str)]].ino) ∈ ro, ¬ inodekey(m1) ∈ ro, m3 = 0 → links(fs0[ri[dentrykey(m1, str)]].ino, fs0, ri) = ∅ ++ dentrykey(m1, str), fs0[ri[inodekey(m1)]].nlink ≠ 0 ∨ m1 = ROOT_INO ⊦ ⟪aubifs_core_index_store#(inodekey(m1), adr1, fi, ro, fo, fs, ((log0 + adr1 ') + adr2 ') + adr3 ', boolvar; ri); aubifs_core_index_remove#(dentrykey(m1, str), fi, ro, fo, fs, ((log0 + adr1 ') + adr2 ') + adr3 ', boolvar; ri); aubifs_core_index_store#(inodekey(m), adr3, fi, ro, fo, fs, ((log0 + adr1 ') + adr2 ') + adr3 ', boolvar; ri); log := ((log0 + adr1 ') + adr2 ') + adr3 '; if m3 = 0 then aubifs_core_orphans_insert#(inodekey(m), ri, fi, fo, fs, log, boolvar; ro); dent := negdentry(str); p_inode := mkinode(m1, nd1.meta, nd1.directory, nd1.nlink, nd1.nsubdirs, nd1.size); c_inode0 := mkinode(m, nd.meta, nd.directory, nd.nlink, nd.nsubdirs, nd.size)⟫ (ubifs-cons(fs, ri, ro, fi, fo, log) ∧ replay-cons-strong(fs, ri, ro, fi, fo, log) ∧ file-node-cons(fs, ri) ∧ orphans-cons(fs, ri, ro)) |
m3 + 1 = fs0[ri[inodekey(fs0[ri[dentrykey(m1, str)]].ino)]].nlink, adr = adr1, fs = fs0[adr1, inodenode(inodekey(m1), md0, true, fs0[ri[inodekey(m1)]].nlink, fs0[ri[inodekey(m1)]].nsubdirs, fs0[ri[inodekey(m1)]].size - 1)] [adr2, dentrynode(dentrykey(m1, str), 0) ] [adr3, inodenode(inodekey(fs0[ri[dentrykey(m1, str)]].ino), md, false, m3, fs0[ri[inodekey(fs0[ri[dentrykey(m1, str)]].ino)]].nsubdirs, m2) ], key = inodekey(m1), log = ((log0 + adr1 ') + adr2 ') + adr3 ', m = fs0[ri[dentrykey(m1, str)]].ino, nd = inodenode(inodekey(fs0[ri[dentrykey(m1, str)]].ino), md, false, m3, fs0[ri[inodekey(fs0[ri[dentrykey(m1, str)]].ino)]].nsubdirs, m2), nd1 = inodenode(inodekey(m1), md0, true, fs0[ri[inodekey(m1)]].nlink, fs0[ri[inodekey(m1)]].nsubdirs, fs0[ri[inodekey(m1)]].size - 1), fs0[ri[inodekey(m1)]].directory, fs0[ri[inodekey(m1)]].inode?, fs0[ri[inodekey(fs0[ri[dentrykey(m1, str)]].ino)]].inode?, fo.inodes?, ro.inodes?, file-node-cons(fs0, ri), log-cons(log0, fs0), orphans-cons(fs0, ri, ro), replay-cons-strong(fs0, ri, ro, fi, fo, log0), ri-cons(ri, fs0), ri-inj(fi), ri-inj(ri), ubifs-cons(fs0, ri, ro, fi, fo, log0), inodekey(m1) ∈ ri, ri[inodekey(m1)] ∈ fs0, inodekey(fs0[ri[dentrykey(m1, str)]].ino) ∈ ri, dentrykey(m1, str) ∈ ri, ri[inodekey(fs0[ri[dentrykey(m1, str)]].ino)] ∈ fs0, 1 ≤ fs0[ri[inodekey(m1)]].size, m3 = 0 → links(fs0[ri[dentrykey(m1, str)]].ino, fs0, ri) = ∅ ++ dentrykey(m1, str), fs0[ri[inodekey(m1)]].nlink ≠ 0 ∨ m1 = ROOT_INO ⊦ ⟪if ¬ adr ∈ ri ∧ adr ∈ fs ∧ key-cons(key, fs[adr]) then ri[key] := adr else abort; aubifs_core_index_remove#(dentrykey(m1, str), fi, ro, fo, fs, ((log0 + adr1 ') + adr2 ') + adr3 ', boolvar; ri); aubifs_core_index_store#(inodekey(m), adr3, fi, ro, fo, fs, ((log0 + adr1 ') + adr2 ') + adr3 ', boolvar; ri); log := ((log0 + adr1 ') + adr2 ') + adr3 '; if m3 = 0 then aubifs_core_orphans_insert#(inodekey(m), ri, fi, fo, fs, log, boolvar; ro); dent := negdentry(str); p_inode := mkinode(m1, nd1.meta, nd1.directory, nd1.nlink, nd1.nsubdirs, nd1.size); c_inode0 := mkinode(m, nd.meta, nd.directory, nd.nlink, nd.nsubdirs, nd.size)⟫ (ubifs-cons(fs, ri, ro, fi, fo, log) ∧ replay-cons-strong(fs, ri, ro, fi, fo, log) ∧ file-node-cons(fs, ri) ∧ orphans-cons(fs, ri, ro)), fs0[ri[dentrykey(m1, str)]].ino = ROOT_INO, fs0[ri[dentrykey(m1, str)]].ino = 0, fs0[ri[inodekey(m1)]].size = 0, adr1 = adr2, adr1 = adr3, adr2 = adr3, m1 = 0, fs0[ri[inodekey(fs0[ri[dentrykey(m1, str)]].ino)]].directory, adr3 ∈ fs0, adr2 ∈ fs0, adr1 ∈ fs0, inodekey(fs0[ri[dentrykey(m1, str)]].ino) ∈ ro, inodekey(m1) ∈ ro
Used simplifier rules: aubifs_core_index_store#(KEY, ADR, FI, RO, FO, FS, LOG, CSYNCED; RI) {if ¬ ADR ∈ RI ∧ ADR ∈ FS ∧ key-cons(KEY, FS[ADR]) then RI[KEY] := ADR else abort };