• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • 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
            • X86isa-state-history
            • Environment-field
              • Env-alistp
                • Rip-ret-alistp
              • Physical-memory-model
              • Save-restore
            • 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
            • Paging
          • Implemented-opcodes
          • To-do
          • Proof-utilities
          • Peripherals
          • Model-validation
          • Modelcalls
          • Concrete-simulation-examples
          • Utils
          • Debugging-code-proofs
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Environment-field

    Env-alistp

    Recognizer of the environment field env

    Signature
    (env-alistp env) → *

    As of now, env-alistp consists of three sub-fields, all of which are basically alists --- file descriptors, file contents, and an oracle field.

    Definitions and Theorems

    Function: env-alistp

    (defun env-alistp (env)
      (declare (xargs :guard t))
      (let ((__function__ 'env-alistp))
        (declare (ignorable __function__))
        (or (equal env nil)
            (and (alistp env)
                 (equal (len env) 3)
                 (consp (assoc :file-descriptors env))
                 (alistp (cdr (assoc :file-descriptors env)))
                 (consp (assoc :file-contents env))
                 (alistp (cdr (assoc :file-contents env)))
                 (consp (assoc :oracle env))
                 (rip-ret-alistp (cdr (assoc :oracle env)))))))

    Function: env-alist-fix

    (defun env-alist-fix (x)
      (declare (xargs :guard (env-alistp x)))
      (mbe :logic (if (env-alistp x) x nil)
           :exec x))

    Theorem: env-alistp-fwd-chaining-alistp

    (defthm env-alistp-fwd-chaining-alistp
      (implies (env-alistp x) (alistp x))
      :rule-classes :forward-chaining)

    Theorem: env-alistp-implies-rip-ret-alistp

    (defthm env-alistp-implies-rip-ret-alistp
      (implies (env-alistp x)
               (rip-ret-alistp (cdr (assoc-equal :oracle x))))
      :rule-classes (:rewrite :forward-chaining))

    Theorem: env-alistp-implies-alistp-file-descriptors

    (defthm env-alistp-implies-alistp-file-descriptors
      (implies (env-alistp x)
               (alistp (cdr (assoc-equal :file-descriptors x))))
      :rule-classes (:rewrite :forward-chaining))

    Theorem: env-alistp-implies-alistp-file-contents

    (defthm env-alistp-implies-alistp-file-contents
      (implies (env-alistp x)
               (alistp (cdr (assoc-equal :file-contents x))))
      :rule-classes (:rewrite :forward-chaining))