• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
        • Svex-stvs
        • Svex-decomposition-methodology
        • Sv-versus-esim
        • Svex-decomp
        • Svex-compose-dfs
        • 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
            • Aliases-indexed->named-aux
            • Svex-compose-assigns/delays
            • 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
              • Svar-register-indnamememo
              • Svarlist-indexed->named
              • Maybe-svar-fix
              • Lhs-register-indnamememo
              • Maybe-indname-result
              • Aliases-to-var-decl-map
              • Svar-indexed->named
              • Aliases-boundedp-aux
              • Svex-apply-overrides
              • Indnamememo-to-var-decl-map
              • Indname-result
              • Assigns-compose
              • Delay-svarlist->delays
              • Indnamememo
              • Svex-override-vars
              • Delay-svar->delays
              • Assigns-to-overrides
              • Svarlist-collect-delays
              • Svex-overridelist-vars
              • Svex-overridelist-keys
              • Assigns-to-overrides-nrev
              • Var-decl-map
              • Cap-length
            • Assign->segment-drivers
            • Segment-driver-map-resolve
            • Assigns->segment-drivers
          • Moddb
          • Svmods
          • Svstmt
          • Sv-tutorial
          • Expressions
          • Symbolic-test-vector
          • Vl-to-svex
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Compile.lisp

    Lhs-indexed->named

    Signature
    (lhs-indexed->named x scope moddb indnamememo) 
      → 
    (mv xx indnamememo1)
    Arguments
    x — Guard (lhs-p x).
    scope — Guard (modscope-p scope).
    moddb — Guard (moddb-ok moddb).
    Returns
    xx — Type (and (lhs-p xx) (svarlist-addr-p (lhs-vars xx))).
    indnamememo1 — Type (equal (len indnamememo1) (len indnamememo)).

    Definitions and Theorems

    Function: lhs-indexed->named

    (defun lhs-indexed->named (x scope moddb indnamememo)
     (declare (xargs :stobjs (moddb indnamememo)))
     (declare (xargs :guard (and (lhs-p x)
                                 (modscope-p scope)
                                 (moddb-ok moddb))))
     (declare
      (xargs
          :guard
          (and (modscope-okp scope moddb)
               (svarlist-boundedp (lhs-vars x)
                                  (modscope-local-bound scope moddb)))))
     (let ((__function__ 'lhs-indexed->named))
      (declare (ignorable __function__))
      (b*
       (((mv first rest) (lhs-decomp x))
        ((unless first) (mv nil indnamememo))
        ((lhrange first) first)
        ((mv repl indnamememo)
         (lhatom-case
              first.atom :z (mv first indnamememo)
              :var
              (b* (((mv name indnamememo)
                    (svar-indexed->named-memo first.atom.name
                                              scope moddb indnamememo)))
                (mv (lhrange first.w
                             (lhatom-var name first.atom.rsh))
                    indnamememo))))
        ((mv rest indnamememo)
         (lhs-indexed->named rest scope moddb indnamememo)))
       (mv (lhs-cons repl rest) indnamememo))))

    Theorem: return-type-of-lhs-indexed->named.xx

    (defthm return-type-of-lhs-indexed->named.xx
      (b* (((mv ?xx ?indnamememo1)
            (lhs-indexed->named x scope moddb indnamememo)))
        (and (lhs-p xx)
             (svarlist-addr-p (lhs-vars xx))))
      :rule-classes :rewrite)

    Theorem: return-type-of-lhs-indexed->named.indnamememo1

    (defthm return-type-of-lhs-indexed->named.indnamememo1
      (b* (((mv ?xx ?indnamememo1)
            (lhs-indexed->named x scope moddb indnamememo)))
        (equal (len indnamememo1)
               (len indnamememo)))
      :rule-classes :rewrite)

    Theorem: lhs-indexed->named-of-lhs-fix-x

    (defthm lhs-indexed->named-of-lhs-fix-x
      (equal (lhs-indexed->named (lhs-fix x)
                                 scope moddb indnamememo)
             (lhs-indexed->named x scope moddb indnamememo)))

    Theorem: lhs-indexed->named-lhs-equiv-congruence-on-x

    (defthm lhs-indexed->named-lhs-equiv-congruence-on-x
      (implies
           (lhs-equiv x x-equiv)
           (equal (lhs-indexed->named x scope moddb indnamememo)
                  (lhs-indexed->named x-equiv scope moddb indnamememo)))
      :rule-classes :congruence)

    Theorem: lhs-indexed->named-of-modscope-fix-scope

    (defthm lhs-indexed->named-of-modscope-fix-scope
      (equal (lhs-indexed->named x (modscope-fix scope)
                                 moddb indnamememo)
             (lhs-indexed->named x scope moddb indnamememo)))

    Theorem: lhs-indexed->named-modscope-equiv-congruence-on-scope

    (defthm lhs-indexed->named-modscope-equiv-congruence-on-scope
      (implies
           (modscope-equiv scope scope-equiv)
           (equal (lhs-indexed->named x scope moddb indnamememo)
                  (lhs-indexed->named x scope-equiv moddb indnamememo)))
      :rule-classes :congruence)

    Theorem: lhs-indexed->named-of-moddb-fix-moddb

    (defthm lhs-indexed->named-of-moddb-fix-moddb
      (equal (lhs-indexed->named x scope (moddb-fix moddb)
                                 indnamememo)
             (lhs-indexed->named x scope moddb indnamememo)))

    Theorem: lhs-indexed->named-moddb-equiv-congruence-on-moddb

    (defthm lhs-indexed->named-moddb-equiv-congruence-on-moddb
      (implies
           (moddb-equiv moddb moddb-equiv)
           (equal (lhs-indexed->named x scope moddb indnamememo)
                  (lhs-indexed->named x scope moddb-equiv indnamememo)))
      :rule-classes :congruence)