• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
        • Svex-stvs
        • Svex-fixpoint-decomposition-methodology
        • Sv-versus-esim
        • Svex-decomp
        • Svex-compose-dfs
        • Moddb
        • Svex-compilation
          • Alias-normalization
          • Svex-design-flatten-and-normalize
          • Svex-design-compile
          • Svex-composition
          • Compile.lisp
            • Svex-normalize-assigns
            • Svex-design-flatten
            • Svex-override-lhrange
            • Svex-override-lhs
            • Svex-compose-assigns/delays
            • Aliases-indexed->named-aux
            • Svex-alist-truncate-by-var-decls
            • Svar-map-truncate-by-var-decls
            • Aliases-to-var-decl-map-aux
            • Aliases-indexed->named
            • Svar-indexed->named-memo
            • Lhs-indexed->named
            • Maybe-svar-p
            • Svar-register-indnamememo
            • Svarlist-indexed->named
            • Maybe-svar-fix
            • Lhs-register-indnamememo
            • Maybe-indname-result
            • Aliases-to-var-decl-map
            • Svar-indexed->named
            • Svex-apply-overrides
            • Aliases-boundedp-aux
            • Indnamememo-to-var-decl-map
              • Indname-result
              • Assigns-compose
              • Delay-svarlist->delays
              • Svex-override-vars
              • Indnamememo
              • Delay-svar->delays
              • Assigns-to-overrides
              • Svarlist-collect-delays
              • Svex-overridelist-vars
              • Svex-overridelist-keys
              • Assigns-to-overrides-nrev
              • Cap-length
              • Var-decl-map
            • Assign->netassigns
          • Svmods
          • Svstmt
          • Sv-tutorial
          • Expressions
          • Symbolic-test-vector
          • Vl-to-svex
        • Vwsim
        • Fgl
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Testing-utilities
      • Math
    • Compile.lisp

    Indnamememo-to-var-decl-map

    Signature
    (indnamememo-to-var-decl-map n indnamememo acc) → map
    Arguments
    n — Guard (natp n).
    acc — Guard (var-decl-map-p acc).
    Returns
    map — Type (var-decl-map-p map).

    Definitions and Theorems

    Function: indnamememo-to-var-decl-map

    (defun
     indnamememo-to-var-decl-map
     (n indnamememo acc)
     (declare (xargs :stobjs (indnamememo)))
     (declare (xargs :guard (and (natp n) (var-decl-map-p acc))))
     (declare (xargs :guard (<= n (indnames-length indnamememo))))
     (let
       ((__function__ 'indnamememo-to-var-decl-map))
       (declare (ignorable __function__))
       (b* (((when (mbe :logic (zp (- (indnames-length indnamememo)
                                      (nfix n)))
                        :exec (eql n (indnames-length indnamememo))))
             (var-decl-map-fix acc))
            (entry (get-indname n indnamememo))
            (acc (if entry
                     (b* (((indname-result entry)))
                         (hons-acons entry.varname
                                     entry.decl (var-decl-map-fix acc)))
                     (var-decl-map-fix acc))))
           (indnamememo-to-var-decl-map (1+ (lnfix n))
                                        indnamememo acc))))

    Theorem: var-decl-map-p-of-indnamememo-to-var-decl-map

    (defthm var-decl-map-p-of-indnamememo-to-var-decl-map
            (b* ((map (indnamememo-to-var-decl-map n indnamememo acc)))
                (var-decl-map-p map))
            :rule-classes :rewrite)

    Theorem: indnamememo-to-var-decl-map-of-nfix-n

    (defthm indnamememo-to-var-decl-map-of-nfix-n
            (equal (indnamememo-to-var-decl-map (nfix n)
                                                indnamememo acc)
                   (indnamememo-to-var-decl-map n indnamememo acc)))

    Theorem: indnamememo-to-var-decl-map-nat-equiv-congruence-on-n

    (defthm
     indnamememo-to-var-decl-map-nat-equiv-congruence-on-n
     (implies
          (nat-equiv n n-equiv)
          (equal (indnamememo-to-var-decl-map n indnamememo acc)
                 (indnamememo-to-var-decl-map n-equiv indnamememo acc)))
     :rule-classes :congruence)

    Theorem: indnamememo-to-var-decl-map-of-var-decl-map-fix-acc

    (defthm
     indnamememo-to-var-decl-map-of-var-decl-map-fix-acc
     (equal
      (indnamememo-to-var-decl-map n indnamememo (var-decl-map-fix acc))
      (indnamememo-to-var-decl-map n indnamememo acc)))

    Theorem: indnamememo-to-var-decl-map-var-decl-map-equiv-congruence-on-acc

    (defthm
     indnamememo-to-var-decl-map-var-decl-map-equiv-congruence-on-acc
     (implies
          (var-decl-map-equiv acc acc-equiv)
          (equal (indnamememo-to-var-decl-map n indnamememo acc)
                 (indnamememo-to-var-decl-map n indnamememo acc-equiv)))
     :rule-classes :congruence)