• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • 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
        • C
          • Syntax-for-tools
          • Atc
          • Transformation-tools
          • Language
            • Abstract-syntax
            • Integer-ranges
            • Implementation-environments
            • Dynamic-semantics
            • Static-semantics
            • Grammar
            • Types
            • Integer-formats-definitions
            • Computation-states
              • Write-object
              • Objdesign-of-var
              • Create-var
              • Compustate-scopes-numbers
              • Read-object
              • Compustate
              • Enter-scope
              • Frame
              • Exit-scope
              • Read-object-of-create-var
              • Compustate-scopes-numbers-aux
              • Compustate-option
              • Push-frame
              • Read-object-of-write-object
              • Pop-frame
              • Compustate-frames-number
              • Exit-scope-of-write-object
              • Compustate-option-result
              • Scope-list-result
              • Not-errorp-of-write-object-of-exit-scope
              • Compustate-result
              • Scope-result
              • Pop-frame-of-write-object
              • Compustate-top-frame-scopes-number
              • Not-errorp-of-write-object-of-pop-frame
              • Read-object-of-exit-scope
                • Heap
                • Top-frame
                • Read-object-of-pop-frame
                • Scope
                • Objdesign-of-var-of-create-var
                • Scope-list
                • Push/pop/top-frame-theorems
                • Objdesign-of-var-of-write-object
                • Frame-list
                • Compustatep-of-write-object-of-objdesign-of-var
                • Valuep-of-read-object-of-objdesign-of-var
                • Read-object-of-enter-scope
                • Objdesign-of-var-of-enter-scope
                • Entr/exit-scope-theorems
              • Portable-ascii-identifiers
              • Values
              • Integer-operations
              • Object-designators
              • Operations
              • Errors
              • Tag-environments
              • Function-environments
              • Character-sets
              • Flexible-array-member-removal
              • Arithmetic-operations
              • Pointer-operations
              • Real-operations
              • Array-operations
              • Scalar-operations
              • Structure-operations
            • Representation
            • Insertion-sort
            • Pack
          • Soft
          • Bv
          • Imp-language
          • Ethereum
          • Event-macros
          • Java
          • Riscv
          • Bitcoin
          • Zcash
          • Yul
          • ACL2-programming-language
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Axe
          • Lists-light
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Computation-states

    Read-object-of-exit-scope

    Invariance of read-object under exit-scope, provided that the object is not in the exited scope.

    Definitions and Theorems

    Theorem: read-object-top-static/alloc-of-exit-scope

    (defthm read-object-top-static/alloc-of-exit-scope
     (implies (and (member-equal (objdesign-kind (objdesign-top objdes))
                                 '(:static :alloc))
                   (not (errorp (read-object objdes compst))))
              (equal (read-object objdes (exit-scope compst))
                     (read-object objdes compst))))

    Theorem: read-object-top-auto-of-exit-scope

    (defthm read-object-top-auto-of-exit-scope
     (implies
      (and
       (equal (objdesign-kind (objdesign-top objdes))
              :auto)
       (not (errorp (read-object objdes compst)))
       (or
        (not (equal (objdesign-auto->frame (objdesign-top objdes))
                    (1- (compustate-frames-number compst))))
        (not (equal (objdesign-auto->scope (objdesign-top objdes))
                    (1- (compustate-top-frame-scopes-number compst))))))
      (equal (read-object objdes (exit-scope compst))
             (read-object objdes compst))))

    Theorem: read-object-of-exit-scope

    (defthm read-object-of-exit-scope
     (implies
      (and
       (not (errorp (read-object objdes compst)))
       (or
        (member-equal (objdesign-kind (objdesign-top objdes))
                      '(:static :alloc))
        (not (equal (objdesign-auto->frame (objdesign-top objdes))
                    (1- (compustate-frames-number compst))))
        (not (equal (objdesign-auto->scope (objdesign-top objdes))
                    (1- (compustate-top-frame-scopes-number compst))))))
      (equal (read-object objdes (exit-scope compst))
             (read-object objdes compst))))