• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
      • Fgl
      • Vwsim
      • Vl
      • 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
      • Svl
      • Rtl
    • Software-verification
    • Math
    • Testing-utilities
  • 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