• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
      • X86isa
        • Program-execution
        • Sdm-instruction-set-summary
        • Tlb
        • Running-linux
        • Introduction
        • Asmtest
        • X86isa-build-instructions
        • Publications
        • Contributors
        • Machine
          • X86isa-state
          • Syscalls
            • Syscalls-logic
            • X86-syscall-args-and-return-value-marshalling
              • X86-syscall-link
              • X86-syscall-truncate
              • X86-syscall-unlink
              • X86-syscall-stat
              • X86-syscall-open
              • X86-syscall-lstat
                • X86-syscall-write
                • X86-syscall-read
                • X86-syscall-lseek
                • X86-syscall-ftruncate
                • X86-syscall-fstat
                • X86-syscall-fcntl
                • X86-syscall-fadvise64
                • X86-syscall-dup3
                • X86-syscall-dup2
                • X86-syscall-dup
                • X86-syscall-close
              • Syscall-numbers
              • Syscalls-exec
            • Cpuid
            • Linear-memory
            • Rflag-specifications
            • Characterizing-undefined-behavior
            • Top-level-memory
            • App-view
            • X86-decoder
            • Physical-memory
            • Decoding-and-spec-utils
            • Instructions
            • Register-readers-and-writers
            • X86-modes
            • Segmentation
            • Other-non-deterministic-computations
            • Environment
            • Paging
          • Implemented-opcodes
          • To-do
          • Proof-utilities
          • Peripherals
          • Model-validation
          • Modelcalls
          • Concrete-simulation-examples
          • Utils
          • Debugging-code-proofs
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • X86-syscall-args-and-return-value-marshalling

    X86-syscall-lstat

    Signature
    (x86-syscall-lstat x86) → x86
    Returns
    x86 — Type (x86p x86), given the guard.

    Definitions and Theorems

    Function: x86-syscall-lstat

    (defun x86-syscall-lstat (x86)
      (declare (xargs :stobjs (x86)))
      (declare (xargs :guard t))
      (let ((__function__ 'x86-syscall-lstat))
        (declare (ignorable __function__))
        (b* ((ctx 'x86-syscall-lstat)
             (path (rgfi *rdi* x86))
             (statbuf (rgfi *rsi* x86))
             ((when (not (canonical-address-p path)))
              (!ms (list ctx
                         :syscall-lstat-path-ptr-not-canonical)
                   x86))
             ((mv flg pathname x86)
              (read-string-zero-terminated path x86))
             ((when flg)
              (!ms (list ctx :path flg) x86))
             ((mv ret x86)
              (syscall-lstat pathname statbuf x86))
             ((when (or (ms x86) (not (i64p ret))))
              (!ms (list ctx
                         :oracle-val-for-syscall-lstat ret)
                   x86))
             (x86 (!rgfi *rax* ret x86)))
          x86)))

    Theorem: x86p-of-x86-syscall-lstat

    (defthm x86p-of-x86-syscall-lstat
      (implies (and (x86p x86))
               (b* ((x86 (x86-syscall-lstat x86)))
                 (x86p x86)))
      :rule-classes :rewrite)