• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
      • X86isa
        • Program-execution
        • Introduction
        • X86isa-build-instructions
        • Publications
        • Contributors
        • Machine
          • Syscalls
          • Cpuid
          • X86isa-state
            • X86isa-state-history
            • Environment-field
              • Env-alistp
              • Rip-ret-alistp
          • Linear-memory
          • Rflag-specifications
          • Characterizing-undefined-behavior
          • Top-level-memory
          • App-view
          • X86-decoder
          • Physical-memory
          • Decoding-and-spec-utils
          • Instructions
          • X86-modes
          • Segmentation
          • Register-readers-and-writers
          • Other-non-deterministic-computations
          • Environment
          • Paging
        • Implemented-opcodes
        • Proof-utilities
        • To-do
        • Concrete-simulation-examples
        • Model-validation
        • Utils
        • Debugging-code-proofs
      • Execloader
      • Axe
    • Testing-utilities
    • Math
  • X86isa-state

Environment-field

An environment field that includes a simple model of the file system and an oracle

The environment allows reasoning about non-deterministic events and computations in the ISA, like the RDRAND instruction and in the user-level mode, the SYSCALL instruction.

Definitions and Theorems

Function: rip-ret-alistp

(defun rip-ret-alistp (lst)
       (declare (xargs :guard t))
       (let ((__function__ 'rip-ret-alistp))
            (declare (ignorable __function__))
            (if (atom lst)
                (equal lst nil)
                (and (consp (car lst))
                     (i48p (caar lst))
                     (true-listp (cdar lst))
                     (rip-ret-alistp (cdr lst))))))

Theorem: rip-ret-alistp-fwd-chaining-alistp

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

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))

Subtopics

Env-alistp
Recognizer of the environment field env
Rip-ret-alistp
Recognizer for the oracle sub-field of the environment field env