• 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
          • 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
            • Components-of-the-environment-field
              • Write-x86-file-des-logic
              • Write-x86-file-contents-logic
                • Read-x86-file-des-logic
                • Read-x86-file-contents-logic
                • Delete-x86-file-des-logic
                • Delete-x86-file-contents-logic
                • Pop-x86-oracle-logic
                • Write-x86-file-des
                • Write-x86-file-contents
                • Pop-x86-oracle
                • Env-read
                • Delete-x86-file-des
                • Delete-x86-file-contents
                • Env-write
                • Read-x86-file-des
                • Read-x86-file-contents
                • Env-write-logic
                • Env-read-logic
              • Reading-memory-as-strings-or-bytes
              • Converting-between-strings-and-bytes
              • Writing-strings-or-bytes-to-memory
            • Paging
          • Implemented-opcodes
          • To-do
          • Proof-utilities
          • Peripherals
          • Model-validation
          • Modelcalls
          • Concrete-simulation-examples
          • Utils
          • Debugging-code-proofs
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Components-of-the-environment-field

    Write-x86-file-contents-logic

    Signature
    (write-x86-file-contents-logic name contents-field x86) → x86

    Replacing the value associated with the name key by contents-field in the :FILE-CONTENTS field of the environment.

    Definitions and Theorems

    Function: write-x86-file-contents-logic

    (defun write-x86-file-contents-logic (name contents-field x86)
     (declare (xargs :stobjs (x86)))
     (declare (xargs :guard (stringp name)))
     (let ((__function__ 'write-x86-file-contents-logic))
      (declare (ignorable __function__))
      (b*
       ((env (env-read x86))
        (file-contents-field (cdr (assoc-equal :file-contents env)))
        (x86
         (env-write
          (acons
           ':file-descriptors
           (cdr (assoc-equal :file-descriptors env))
           (acons
               ':file-contents
               (put-assoc-equal name contents-field file-contents-field)
               (acons ':oracle
                      (cdr (assoc-equal :oracle env))
                      nil)))
          x86)))
       x86)))