• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • Proof-checker-array
      • 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
        • Farray
        • Rp-rewriter
        • Instant-runoff-voting
        • Imp-language
        • Sidekick
        • Leftist-trees
        • Java
        • Taspi
        • Bitcoin
        • Riscv
        • Des
        • Ethereum
        • X86isa
        • Sha-2
        • Yul
        • Zcash
        • Proof-checker-itp13
        • Regex
        • ACL2-programming-language
        • Json
        • Jfkr
        • Equational
        • Cryptography
        • Poseidon
        • Where-do-i-place-my-book
        • Axe
        • Bigmems
        • Builtins
        • Execloader
        • Aleo
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Computation-states

    Pop-frame

    Pop a frame from a computation state's non-empty call stack.

    Signature
    (pop-frame compst) → new-compst
    Arguments
    compst — Guard (compustatep compst).
    Returns
    new-compst — Type (compustatep new-compst).

    Definitions and Theorems

    Function: pop-frame

    (defun pop-frame (compst)
      (declare (xargs :guard (compustatep compst)))
      (declare (xargs :guard (> (compustate-frames-number compst)
                                0)))
      (let ((__function__ 'pop-frame))
        (declare (ignorable __function__))
        (b* ((stack (compustate->frames compst))
             (new-stack (cdr stack)))
          (change-compustate compst
                             :frames new-stack))))

    Theorem: compustatep-of-pop-frame

    (defthm compustatep-of-pop-frame
      (b* ((new-compst (pop-frame compst)))
        (compustatep new-compst))
      :rule-classes :rewrite)

    Theorem: compustate-frames-number-of-pop-frame

    (defthm compustate-frames-number-of-pop-frame
      (implies (> (compustate-frames-number compst) 0)
               (b* ((?new-compst (pop-frame compst)))
                 (equal (compustate-frames-number new-compst)
                        (1- (compustate-frames-number compst))))))

    Theorem: pop-frame-of-push-frame

    (defthm pop-frame-of-push-frame
      (equal (pop-frame (push-frame frame compst))
             (compustate-fix compst)))

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

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

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

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