• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • 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
        • Moddb
        • Svmods
        • Svstmt
        • Sv-tutorial
        • Expressions
          • Rewriting
          • Svex
            • Svar
            • Least-fixpoint
            • Svex-p
            • Svex-select
              • Svex-select-staticify-assignment
              • Svex-select-fix
              • Svex-select-case
              • Svex-select-split-static
                • Svex-select-p
                • Svex-selects-merge
                • Svex-select-replace-indices
                • Svex-select-vars
                • Svex-select-to-svex-with-substitution
                • Svex-select-equiv
                • Svex-select-part
                • Svex-select-count
                • Svex-select-var
                • Svex-select-to-lhs
                • Svex-select-staticp
                • Svex-select-inner-var
                • Svex-select->indices
                • Svex-select-to-svex
                • Svex-select-inner-width
                • Svex-select->width
                • Svex-select-kind
              • Svex-alist
              • Svex-equiv
              • Svexlist
              • Svex-call
              • Fnsym
              • Svex-quote
              • Svex-var
              • Svcall-rw
              • Svcall
              • Svex-kind
              • Svcall*
              • Svex-fix
              • Svex-count
              • Svex-1z
              • Svex-1x
              • Svex-z
              • Svex-x
            • Bit-blasting
            • Functions
            • 4vmask
            • Why-infinite-width
            • Svex-vars
            • Evaluation
            • Values
          • Symbolic-test-vector
          • Vl-to-svex
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Svex-select

    Svex-select-split-static

    Signature
    (svex-select-split-static x) 
      → 
    (mv staticp dynamic-part static-part)
    Arguments
    x — Guard (svex-select-p x).
    Returns
    staticp — Type (equal staticp (svex-select-staticp x)).
    dynamic-part — Type (svex-select-p dynamic-part).
    static-part — Type (svex-select-p static-part).

    Definitions and Theorems

    Function: svex-select-split-static

    (defun svex-select-split-static (x)
      (declare (xargs :guard (svex-select-p x)))
      (let ((__function__ 'svex-select-split-static))
        (declare (ignorable __function__))
        (svex-select-case
             x :var
             (mv t
                 (svex-select-var *svex-longest-static-prefix-var*
                                  x.width)
                 (svex-select-fix x))
             :part
             (b* (((mv rest-staticp rest-dyn rest-stat)
                   (svex-select-split-static x.subexp))
                  ((when (and rest-staticp
                              (svex-case x.lsb
                                         :quote (4vec-index-p x.lsb.val)
                                         :otherwise nil)))
                   (mv t
                       (svex-select-var *svex-longest-static-prefix-var*
                                        x.width)
                       (change-svex-select-part x
                                                :subexp rest-stat))))
               (mv nil
                   (change-svex-select-part x
                                            :subexp rest-dyn)
                   rest-stat)))))

    Theorem: return-type-of-svex-select-split-static.staticp

    (defthm return-type-of-svex-select-split-static.staticp
      (b* (((mv ?staticp ?dynamic-part ?static-part)
            (svex-select-split-static x)))
        (equal staticp (svex-select-staticp x)))
      :rule-classes :rewrite)

    Theorem: svex-select-p-of-svex-select-split-static.dynamic-part

    (defthm svex-select-p-of-svex-select-split-static.dynamic-part
      (b* (((mv ?staticp ?dynamic-part ?static-part)
            (svex-select-split-static x)))
        (svex-select-p dynamic-part))
      :rule-classes :rewrite)

    Theorem: svex-select-p-of-svex-select-split-static.static-part

    (defthm svex-select-p-of-svex-select-split-static.static-part
      (b* (((mv ?staticp ?dynamic-part ?static-part)
            (svex-select-split-static x)))
        (svex-select-p static-part))
      :rule-classes :rewrite)

    Theorem: svex-select-inner-var-of-split-static

    (defthm svex-select-inner-var-of-split-static
      (b* (((mv ?staticp ?dynamic-part ?static-part)
            (svex-select-split-static x)))
        (and (equal (svex-select-inner-var dynamic-part)
                    *svex-longest-static-prefix-var*)
             (equal (svex-select-inner-var static-part)
                    (svex-select-inner-var x)))))

    Theorem: svex-select-split-static-dynamic-type-when-staticp

    (defthm svex-select-split-static-dynamic-type-when-staticp
      (b* (((mv ?staticp ?dynamic-part ?static-part)
            (svex-select-split-static x)))
        (implies staticp
                 (equal (svex-select-kind dynamic-part)
                        :var))))

    Theorem: svex-selects-merge-of-split-static

    (defthm svex-selects-merge-of-split-static
      (b* (((mv ?staticp ?dynamic-part ?static-part)
            (svex-select-split-static x)))
        (equal (svex-selects-merge dynamic-part static-part)
               (svex-select-fix x))))

    Theorem: svex-select-split-static-of-svex-select-fix-x

    (defthm svex-select-split-static-of-svex-select-fix-x
      (equal (svex-select-split-static (svex-select-fix x))
             (svex-select-split-static x)))

    Theorem: svex-select-split-static-svex-select-equiv-congruence-on-x

    (defthm svex-select-split-static-svex-select-equiv-congruence-on-x
      (implies (svex-select-equiv x x-equiv)
               (equal (svex-select-split-static x)
                      (svex-select-split-static x-equiv)))
      :rule-classes :congruence)