• 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
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
      • Riscv
      • Taspi
      • Bitcoin
      • 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
      • Aleo
        • Aleobft
        • Aleovm
        • Leo
          • Grammar
          • Early-version
            • Json2ast
            • Testing
            • Definition
              • Flattening
              • Abstract-syntax
              • Dynamic-semantics
                • Execution
                  • Exec-expressions/statements
                  • Init-for-loop
                  • Exec-file-main
                  • Update-variable-value-in-scope-list
                  • Step-for-loop
                  • Update-variable-value-in-scope
                  • Expr-value-to-value
                  • Exec-binary
                  • Exec-expression
                  • Init-vcscope-dinfo-call
                  • Value?+denv
                  • Exec-statement
                  • End-of-for-loop-p
                  • Expr-value
                  • Evalue+denv
                  • Write-location
                  • Read-location
                  • Exec-for-loop-iterations
                  • Update-variable-value
                  • Exec-unary
                  • Values+denv
                  • Init-vcscope-dinfo-loop
                    • Extend-denv-with-structdecl
                    • Exec-var/const
                    • Valuemap+denv
                    • Namevalue+denv
                    • Extend-denv-with-fundecl
                    • Ensure-boolean
                    • Int+denv
                    • Push-vcscope-dinfo
                    • Extend-denv-with-topdecl-list
                    • Exec-literal
                    • Build-denv-from-file
                    • Namevalue+denv-result
                    • Extend-denv-with-topdecl
                    • Evalue+denv-result
                    • Value?+denv-result
                    • Values+denv-result
                    • Valuemap+denv-result
                    • Int+denv-result
                    • Push-call-dinfo
                    • Exec-print
                    • Pop-vcscope-dinfo
                    • Exec-if
                    • Exec-function
                    • Pop-call-dinfo
                    • Exec-statement-list
                    • Exec-block
                    • Exec-struct-init-list
                    • Exec-struct-init
                    • Exec-expression-list
                  • Values
                  • Dynamic-environments
                  • Arithmetic-operations
                  • Curve-parameterization
                  • Shift-operations
                  • Errors
                  • Value-expressions
                  • Locations
                  • Input-execution
                  • Edwards-bls12-generator
                  • Equality-operations
                  • Logical-operations
                  • Program-execution
                  • Ordering-operations
                  • Bitwise-operations
                  • Literal-evaluation
                  • Type-maps-for-struct-components
                  • Output-execution
                  • Tuple-operations
                  • Struct-operations
                • Compilation
                • Static-semantics
                • Concrete-syntax
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Community
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Execution

    Init-vcscope-dinfo-loop

    Initialize the dynamic information about a variable and constant scope, for a loop.

    Signature
    (init-vcscope-dinfo-loop name val) → vcscope-info
    Arguments
    name — Guard (identifierp name).
    val — Guard (valuep val).
    Returns
    vcscope-info — Type (vcscope-dinfop vcscope-info).

    This scope consists of just the loop variable, which is marked as a constant because, due to loop unrolling, loop variables are considered constants in the loop bodies.

    Definitions and Theorems

    Function: init-vcscope-dinfo-loop

    (defun init-vcscope-dinfo-loop (name val)
      (declare (xargs :guard (and (identifierp name) (valuep val))))
      (let ((__function__ 'init-vcscope-dinfo-loop))
        (declare (ignorable __function__))
        (b* ((info (make-var/const-dinfo :value val
                                         :constp t)))
          (omap::update (identifier-fix name)
                        info nil))))

    Theorem: vcscope-dinfop-of-init-vcscope-dinfo-loop

    (defthm vcscope-dinfop-of-init-vcscope-dinfo-loop
      (b* ((vcscope-info (init-vcscope-dinfo-loop name val)))
        (vcscope-dinfop vcscope-info))
      :rule-classes :rewrite)

    Theorem: init-vcscope-dinfo-loop-of-identifier-fix-name

    (defthm init-vcscope-dinfo-loop-of-identifier-fix-name
      (equal (init-vcscope-dinfo-loop (identifier-fix name)
                                      val)
             (init-vcscope-dinfo-loop name val)))

    Theorem: init-vcscope-dinfo-loop-identifier-equiv-congruence-on-name

    (defthm init-vcscope-dinfo-loop-identifier-equiv-congruence-on-name
      (implies (identifier-equiv name name-equiv)
               (equal (init-vcscope-dinfo-loop name val)
                      (init-vcscope-dinfo-loop name-equiv val)))
      :rule-classes :congruence)

    Theorem: init-vcscope-dinfo-loop-of-value-fix-val

    (defthm init-vcscope-dinfo-loop-of-value-fix-val
      (equal (init-vcscope-dinfo-loop name (value-fix val))
             (init-vcscope-dinfo-loop name val)))

    Theorem: init-vcscope-dinfo-loop-value-equiv-congruence-on-val

    (defthm init-vcscope-dinfo-loop-value-equiv-congruence-on-val
      (implies (value-equiv val val-equiv)
               (equal (init-vcscope-dinfo-loop name val)
                      (init-vcscope-dinfo-loop name val-equiv)))
      :rule-classes :congruence)