• 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

    Compustate-frames-number

    Number of frames in the call stack of a computation state.

    Signature
    (compustate-frames-number compst) → n
    Arguments
    compst — Guard (compustatep compst).
    Returns
    n — Type (natp n).

    The theorem compustate-frames-number-of-compustate-same-frames is useful to show that change-compustate for a component other than :frames preserves the number of frames.

    Definitions and Theorems

    Function: compustate-frames-number

    (defun compustate-frames-number (compst)
      (declare (xargs :guard (compustatep compst)))
      (let ((__function__ 'compustate-frames-number))
        (declare (ignorable __function__))
        (len (compustate->frames compst))))

    Theorem: natp-of-compustate-frames-number

    (defthm natp-of-compustate-frames-number
      (b* ((n (compustate-frames-number compst)))
        (natp n))
      :rule-classes :rewrite)

    Theorem: compustate-frames-number-of-compustate-same-frames

    (defthm compustate-frames-number-of-compustate-same-frames
      (equal (compustate-frames-number
                  (compustate static (compustate->frames compst)
                              heap))
             (compustate-frames-number compst)))

    Theorem: compustate-frames-number-of-compustate-fix-compst

    (defthm compustate-frames-number-of-compustate-fix-compst
      (equal (compustate-frames-number (compustate-fix compst))
             (compustate-frames-number compst)))

    Theorem: compustate-frames-number-compustate-equiv-congruence-on-compst

    (defthm
         compustate-frames-number-compustate-equiv-congruence-on-compst
      (implies (compustate-equiv compst compst-equiv)
               (equal (compustate-frames-number compst)
                      (compustate-frames-number compst-equiv)))
      :rule-classes :congruence)