• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Set
        • Soft
        • C
          • Syntax-for-tools
          • Atc
          • Language
            • Abstract-syntax
            • Integer-ranges
            • Implementation-environments
            • Dynamic-semantics
            • Static-semantics
            • Grammar
            • Integer-formats
            • Types
            • Portable-ascii-identifiers
            • Values
            • Integer-operations
            • Computation-states
              • Write-object
              • Objdesign-of-var
              • Compustate-scopes-numbers
              • Create-var
              • Read-object
              • Compustate
              • Frame
              • Enter-scope
              • Compustate-scopes-numbers-aux
              • Compustate-option
              • Push-frame
              • Exit-scope
              • Compustate-frames-number
              • Compustate-option-result
              • Scope-list-result
              • Pop-frame
              • Compustate-result
              • Scope-result
              • Compustate-top-frame-scopes-number
              • Top-frame
                • Heap
                • Scope
                • Scope-list
                • Frame-list
              • Object-designators
              • Operations
              • Errors
              • Tag-environments
              • Function-environments
              • Character-sets
              • Flexible-array-member-removal
              • Arithmetic-operations
              • Pointer-operations
              • Bytes
              • Keywords
              • Real-operations
              • Array-operations
              • Scalar-operations
              • Structure-operations
            • Representation
            • Transformation-tools
            • Insertion-sort
            • Pack
          • Bv
          • Imp-language
          • Event-macros
          • Java
          • Bitcoin
          • Ethereum
          • Yul
          • Zcash
          • ACL2-programming-language
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Lists-light
          • Axe
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Computation-states

    Top-frame

    Top frame of a computation state's call stack.

    Signature
    (top-frame compst) → frame
    Arguments
    compst — Guard (compustatep compst).
    Returns
    frame — Type (framep frame).

    Definitions and Theorems

    Function: top-frame

    (defun top-frame (compst)
      (declare (xargs :guard (compustatep compst)))
      (declare (xargs :guard (> (compustate-frames-number compst)
                                0)))
      (let ((__function__ 'top-frame))
        (declare (ignorable __function__))
        (frame-fix (car (compustate->frames compst)))))

    Theorem: framep-of-top-frame

    (defthm framep-of-top-frame
      (b* ((frame (top-frame compst)))
        (framep frame))
      :rule-classes :rewrite)

    Theorem: top-frame-of-push-frame

    (defthm top-frame-of-push-frame
      (equal (top-frame (push-frame frame compst))
             (frame-fix frame)))

    Theorem: top-frame-of-compustate-fix-compst

    (defthm top-frame-of-compustate-fix-compst
      (equal (top-frame (compustate-fix compst))
             (top-frame compst)))

    Theorem: top-frame-compustate-equiv-congruence-on-compst

    (defthm top-frame-compustate-equiv-congruence-on-compst
      (implies (compustate-equiv compst compst-equiv)
               (equal (top-frame compst)
                      (top-frame compst-equiv)))
      :rule-classes :congruence)