| err = err0, n = n0, 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 ⊦ ⟪vfs_seek#(fd, whence, user, dirs, files, asynced; n, err, of)⟫ ⟨posix_seek#(fd, whence, user, root, abs-files(files); n0, err0, ofh)⟩ (ofh = abs-of(of) ∧ (psynced → asynced) ∧ n = n0 ∧ err = err0) |
err = err0, n = n0, 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 ⊦ ⟪err := ESUCCESS; if ¬ fd ∈ of then err := EBADFD else {if whence = SEEK_CUR then n := of[fd].pos + n else if whence = SEEK_END then choose inode with true in {afs_iget#(of[fd].ino, dirs, files, asynced; inode, err); if err = ESUCCESS then n := inode.size + n}; if err = ESUCCESS then of[fd].pos := n}⟫ ⟨posix_seek#(fd, whence, user, root, abs-files(files); n0, err0, ofh)⟩ (ofh = abs-of(of) ∧ (psynced → asynced) ∧ n = n0 ∧ err = err0)
Used simplifier rules: vfs_seek#(FD, WHENCE, USER, DIRS, FILES, ASYNCED; N, ERR, OF) {ERR := ESUCCESS; if ¬ FD ∈ OF then ERR := EBADFD else {if WHENCE = SEEK_CUR then N := OF[FD].pos + N else if WHENCE = SEEK_END then choose INODE with true in {afs_iget# (OF[FD].ino, DIRS, FILES, ASYNCED; INODE, ERR); if ERR = ESUCCESS then N := INODE.size + N}; if ERR = ESUCCESS then OF[FD].pos := N} };