| fs = abs-files(files), ofh = abs-of(of), root.dir?, dom of < ino, abs(root, ROOT_INO)(dirs), afs-cons(dirs, files), fids-cons(root, abs-files(files), abs-of(of)), of-cons(of, dirs, files), ¬ fd ∈ of, psynced → asynced ⊦ ⟨posix_close#(fd, user, root; err0, fs, ofh)⟩ (ofh = abs-of(of) ∧ fs = abs-files(files) ∧ (psynced → asynced) ∧ EBADFD = err0) |
fs = abs-files(files), ofh = abs-of(of), root.dir?, dom of < ino, abs(root, ROOT_INO)(dirs), afs-cons(dirs, files), fids-cons(root, abs-files(files), abs-of(of)), of-cons(of, dirs, files), psynced → asynced ⊦ ⟨choose err with pre-close(fd, err, user, root, fs, ofh) in err0 := err; if err0 = ESUCCESS then let fid = ofh[fd].fid in {ofh := ofh -- fd; if ¬ fid ∈ ofh.fids ∧ ¬ fid ∈ root.fids then fs := fs -- fid}⟩ (ofh = abs-of(of) ∧ fs = abs-files(files) ∧ (psynced → asynced) ∧ EBADFD = err0), fd ∈ of
Used simplifier rules: posix_close#(FD, USER, ROOT; ERR, FS, OFH) {choose E with pre-close(FD, E, USER, ROOT, FS, OFH) in ERR := E; if ERR = ESUCCESS then let FID = OFH[FD].fid in {OFH := OFH -- FD; if ¬ FID ∈ OFH.fids ∧ ¬ FID ∈ ROOT.fids then FS := FS -- FID} };