• 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
                • Frame-fix
                  • Frame-equiv
                  • Make-frame
                  • Frame->scopes
                  • Frame->function
                  • Change-frame
                  • Framep
                • 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
    • Frame

    Frame-fix

    Fixing function for frame structures.

    Signature
    (frame-fix x) → new-x
    Arguments
    x — Guard (framep x).
    Returns
    new-x — Type (framep new-x).

    Definitions and Theorems

    Function: frame-fix$inline

    (defun frame-fix$inline (x)
      (declare (xargs :guard (framep x)))
      (let ((__function__ 'frame-fix))
        (declare (ignorable __function__))
        (mbe :logic
             (b* ((function (ident-fix (cdr (std::da-nth 0 x))))
                  (scopes (scope-list-fix (cdr (std::da-nth 1 x)))))
               (let ((scopes (if (consp scopes) scopes (list nil))))
                 (list (cons 'function function)
                       (cons 'scopes scopes))))
             :exec x)))

    Theorem: framep-of-frame-fix

    (defthm framep-of-frame-fix
      (b* ((new-x (frame-fix$inline x)))
        (framep new-x))
      :rule-classes :rewrite)

    Theorem: frame-fix-when-framep

    (defthm frame-fix-when-framep
      (implies (framep x)
               (equal (frame-fix x) x)))

    Function: frame-equiv$inline

    (defun frame-equiv$inline (acl2::x acl2::y)
      (declare (xargs :guard (and (framep acl2::x)
                                  (framep acl2::y))))
      (equal (frame-fix acl2::x)
             (frame-fix acl2::y)))

    Theorem: frame-equiv-is-an-equivalence

    (defthm frame-equiv-is-an-equivalence
      (and (booleanp (frame-equiv x y))
           (frame-equiv x x)
           (implies (frame-equiv x y)
                    (frame-equiv y x))
           (implies (and (frame-equiv x y)
                         (frame-equiv y z))
                    (frame-equiv x z)))
      :rule-classes (:equivalence))

    Theorem: frame-equiv-implies-equal-frame-fix-1

    (defthm frame-equiv-implies-equal-frame-fix-1
      (implies (frame-equiv acl2::x x-equiv)
               (equal (frame-fix acl2::x)
                      (frame-fix x-equiv)))
      :rule-classes (:congruence))

    Theorem: frame-fix-under-frame-equiv

    (defthm frame-fix-under-frame-equiv
      (frame-equiv (frame-fix acl2::x)
                   acl2::x)
      :rule-classes (:rewrite :rewrite-quoted-constant))

    Theorem: equal-of-frame-fix-1-forward-to-frame-equiv

    (defthm equal-of-frame-fix-1-forward-to-frame-equiv
      (implies (equal (frame-fix acl2::x) acl2::y)
               (frame-equiv acl2::x acl2::y))
      :rule-classes :forward-chaining)

    Theorem: equal-of-frame-fix-2-forward-to-frame-equiv

    (defthm equal-of-frame-fix-2-forward-to-frame-equiv
      (implies (equal acl2::x (frame-fix acl2::y))
               (frame-equiv acl2::x acl2::y))
      :rule-classes :forward-chaining)

    Theorem: frame-equiv-of-frame-fix-1-forward

    (defthm frame-equiv-of-frame-fix-1-forward
      (implies (frame-equiv (frame-fix acl2::x)
                            acl2::y)
               (frame-equiv acl2::x acl2::y))
      :rule-classes :forward-chaining)

    Theorem: frame-equiv-of-frame-fix-2-forward

    (defthm frame-equiv-of-frame-fix-2-forward
      (implies (frame-equiv acl2::x (frame-fix acl2::y))
               (frame-equiv acl2::x acl2::y))
      :rule-classes :forward-chaining)