• 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
          • Syscalls
          • Cpuid
          • Linear-memory
          • Rflag-specifications
          • Characterizing-undefined-behavior
          • Top-level-memory
          • App-view
          • X86-decoder
            • Get-prefixes
            • Vex-0f3a-execute
            • Vex-0f38-execute
            • Vex-0f-execute
            • Two-byte-opcode-execute
            • Second-three-byte-opcode-execute
            • One-byte-opcode-execute
            • First-three-byte-opcode-execute
            • Evex-0f3a-execute
            • Evex-0f38-execute
            • Evex-0f-execute
            • X86-fetch-decode-execute
            • Vex-decode-and-execute
            • Evex-decode-and-execute
            • X86-run
            • Implemented-opcodes
            • Three-byte-opcode-decode-and-execute
            • X86-run-halt-count
            • Two-byte-opcode-decode-and-execute
            • X86-run-steps
              • Opcode-maps
              • X86-run-halt
              • X86-fetch-decode-execute-halt
              • X86-run-steps1
            • 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
    • X86-decoder

    X86-run-steps

    An alternative to x86-run

    Signature
    (x86-run-steps n x86) → (mv * x86)

    x86-run-steps returns two values --- number of steps taken by the machine before it comes to a halt and the x86 state. Note that the number of steps will always be less than or equal to n.

    Definitions and Theorems

    Function: x86-run-steps

    (defun x86-run-steps (n x86)
      (declare (xargs :stobjs (x86)))
      (declare (type (unsigned-byte 59) n))
      (let ((__function__ 'x86-run-steps))
        (declare (ignorable __function__))
        (x86-run-steps1 n n x86)))

    Theorem: x86-run-steps1-is-x86-run-ms

    (defthm x86-run-steps1-is-x86-run-ms
      (implies (ms x86)
               (equal (mv-nth 1 (x86-run-steps1 n n0 x86))
                      (x86-run n x86))))

    Theorem: x86-run-steps1-is-x86-run-zp-n

    (defthm x86-run-steps1-is-x86-run-zp-n
      (implies (and (not (ms x86))
                    (not (fault x86))
                    (zp n))
               (equal (mv-nth 1 (x86-run-steps1 n n0 x86))
                      (!ms (list (list* 'x86-run
                                        :rip (rip x86)
                                        '(:timeout t)))
                           (x86-run n x86)))))

    Theorem: x86-run-steps1-open

    (defthm x86-run-steps1-open
     (implies
      (and (not (ms x86))
           (not (fault x86))
           (not (zp n)))
      (equal
          (mv-nth 1 (x86-run-steps1 n n0 x86))
          (mv-nth 1
                  (x86-run-steps1 (1- n)
                                  n0 (x86-fetch-decode-execute x86))))))