• 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
              • Exec-expr
              • Exec
              • Exec-expr-pure
              • Exec-arrsub
              • Variable-resolution-preservation
              • Init-value-to-value
              • Apconvert-expr-value
              • Execution-limit-monotonicity
              • Exec-memberp
              • Exec-stmt
              • Exec-address
              • Init-scope
              • Exec-unary
              • Exec-member
              • Exec-fun
              • Exec-stmt-while
              • Eval-iconst
              • Exec-binary-strict-pure
              • Variable-visibility-preservation
                • Var-visible-preservep-of-exec
                  • Var-visible-preservep
                  • Var-visible-of-exec
                  • Var-visible-preservep-of-exit-scope-when-enter-scope
                  • Var-visible-preservep-of-pop-frame-when-push-frame
                  • Var-visible-preservep-of-exit-scope-and-exit-scope
                  • Var-visible-preservep-of-pop-frame-and-pop-frame
                  • Var-visible-preservep-of-trans-exit-scope-when-enter-scope
                  • Var-visible-preservep-of-create-var
                  • Var-visible-preservep-of-write-object
                • Exec-expr-pure-list
                • Object-type-preservation
                • Eval-binary-strict-pure
                • Exec-block-item-list
                • Exec-indir
                • Exec-ident
                • Exec-block-item
                • Eval-cast
                • Frame-and-scope-peeling
                • Exec-obj-declon
                • Exec-cast
                • Exec-const
                • Eval-unary
                • Exec-stmt-dowhile
                • Pure-expression-execution
                • Exec-initer
                • Eval-const
                • Execution-without-function-calls
              • Static-semantics
              • Grammar
              • Types
              • Integer-formats-definitions
              • Computation-states
              • 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
    • Variable-visibility-preservation

    Var-visible-preservep-of-exec

    Preservation of variable visibility under execution, for any number of peeled frames and scopes.

    We prove by induction that var-visible-preservep holds between each computation state before execution and the computation state after execution.

    Definitions and Theorems

    Theorem: var-visible-preservep-of-exec-fun

    (defthm var-visible-preservep-of-exec-fun
      (b* (((mv result compst1)
            (exec-fun fun args compst fenv limit)))
        (implies (not (errorp result))
                 (var-visible-preservep compst compst1))))

    Theorem: var-visible-preservep-of-exec-expr

    (defthm var-visible-preservep-of-exec-expr
      (b* (((mv result compst1)
            (exec-expr e compst fenv limit)))
        (implies (not (errorp result))
                 (var-visible-preservep compst compst1))))

    Theorem: var-visible-preservep-of-exec-stmt

    (defthm var-visible-preservep-of-exec-stmt
      (b* (((mv result compst1)
            (exec-stmt s compst fenv limit)))
        (implies (and (> (compustate-frames-number compst) 0)
                      (not (errorp result)))
                 (var-visible-preservep compst compst1))))

    Theorem: var-visible-preservep-of-exec-stmt-while

    (defthm var-visible-preservep-of-exec-stmt-while
      (b* (((mv result compst1)
            (exec-stmt-while test body compst fenv limit)))
        (implies (and (> (compustate-frames-number compst) 0)
                      (not (errorp result)))
                 (var-visible-preservep compst compst1))))

    Theorem: var-visible-preservep-of-exec-stmt-dowhile

    (defthm var-visible-preservep-of-exec-stmt-dowhile
      (b* (((mv result compst1)
            (exec-stmt-dowhile body test compst fenv limit)))
        (implies (and (> (compustate-frames-number compst) 0)
                      (not (errorp result)))
                 (var-visible-preservep compst compst1))))

    Theorem: var-visible-preservep-of-exec-initer

    (defthm var-visible-preservep-of-exec-initer
      (b* (((mv result compst1)
            (exec-initer initer compst fenv limit)))
        (implies (and (> (compustate-frames-number compst) 0)
                      (not (errorp result)))
                 (var-visible-preservep compst compst1))))

    Theorem: var-visible-preservep-of-exec-obj-declon

    (defthm var-visible-preservep-of-exec-obj-declon
      (b* ((compst1 (exec-obj-declon declon compst fenv limit)))
        (implies (and (> (compustate-frames-number compst) 0)
                      (not (errorp compst1)))
                 (var-visible-preservep compst compst1))))

    Theorem: var-visible-preservep-of-exec-block-item

    (defthm var-visible-preservep-of-exec-block-item
      (b* (((mv result compst1)
            (exec-block-item item compst fenv limit)))
        (implies (and (> (compustate-frames-number compst) 0)
                      (not (errorp result)))
                 (var-visible-preservep compst compst1))))

    Theorem: var-visible-preservep-of-exec-block-item-list

    (defthm var-visible-preservep-of-exec-block-item-list
      (b* (((mv result compst1)
            (exec-block-item-list items compst fenv limit)))
        (implies (and (> (compustate-frames-number compst) 0)
                      (not (errorp result)))
                 (var-visible-preservep compst compst1))))