• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • 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
          • Svstmt-case
          • Svstmt-while
          • Svstmt-p
          • Svstmt-if
          • Svstmt-equiv
          • Svstmt-xcond
          • Svstmt-scope
          • Svstmt-assign
          • Svstmt-compile
            • Svstmt-compile.lisp
              • Svstate-merge-branches
              • Svex-alist-merge-branches
              • Svstmt-assign->subst
              • Svstack-merge-branches
              • Svstacks-compatible
              • Svjumpstate-merge-svstate-branches
              • Svjumpstate-svstate-compatible
              • Svstmt-lhs-check-masks
              • Svjumpstate
              • Svjumpstates-compatible
              • Svstmtlist-compile-top
              • Svjumpstate-sequence-svstates
              • Constraintlist-merge-branches
              • Svjumpstate-merge-branches
              • Svex-replace-range
              • Svex-svstmt-ite
              • Svstmt-process-write
              • Svjumpstate-sequence
              • Svstmt-process-writelist
              • Svstack-assign
              • Svstmt-writelist-var-sizes
              • Svstates-compatible
              • 4vec-replace-range
              • Svstmt-write-var-sizes
              • Make-empty-svjumpstate
              • Constraintlist-add-pathcond
              • Svjumpstate-pop-scope
              • Constraintlist-compose-svstack
              • Svstack-to-svex-alist
              • Svstack-filter-global-lhs-vars
              • Svjumpstate-vars
              • Svex-svstmt-or
              • Svex-svstmt-andc1
              • Svstate-push-scope
              • Svstate-pop-scope
              • Svstate-vars
                • Svstack-lookup
                • Svar-subtract-delay
                • Svstmt-initialize-locals
                • Svstack-fork
                • Svstack-clean
                • Svstack-nonempty-fix
                • Svstate-fork
                • Svstate-clean
                • Svstack-globalp
                • Svjumpstate-fork
                • Svar-delayed-member
                • Svjumpstate-levels
                • Svjumpstate-free
                • Svstate-free
                • Svstack-free
                • Svstack
                • Svar-size-alist
              • Svstate
            • Svstmt-constraints
            • Svstmt-jump
            • Svstmtlist
            • Svstmt-kind
            • Svstmt.lisp
            • Svstmt-fix
            • Svstmt-count
          • Sv-tutorial
          • Expressions
          • Symbolic-test-vector
          • Vl-to-svex
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Svstmt-compile.lisp

    Svstate-vars

    Signature
    (svstate-vars st) → vars
    Arguments
    st — Guard (svstate-p st).
    Returns
    vars — Type (and (svarlist-p vars) (setp vars)).

    Definitions and Theorems

    Function: svstate-vars

    (defun svstate-vars (st)
      (declare (xargs :guard (svstate-p st)))
      (let ((__function__ 'svstate-vars))
        (declare (ignorable __function__))
        (b* (((svstate st))
             (blkst-alist (svstack-to-svex-alist st.blkst)))
          (union (union (svex-alist-vars blkst-alist)
                        (mergesort (svex-alist-keys blkst-alist)))
                 (union (svex-alist-vars st.nonblkst)
                        (mergesort (svex-alist-keys st.nonblkst)))))))

    Theorem: return-type-of-svstate-vars

    (defthm return-type-of-svstate-vars
      (b* ((vars (svstate-vars st)))
        (and (svarlist-p vars) (setp vars)))
      :rule-classes :rewrite)

    Theorem: vars-of-accessors-of-svstate-vars

    (defthm vars-of-accessors-of-svstate-vars
      (b* ((?vars (svstate-vars st)))
        (implies
             (not (member v vars))
             (b* (((svstate st))
                  (blkst-alist (svstack-to-svex-alist st.blkst)))
               (and (not (member v (svex-alist-vars blkst-alist)))
                    (not (member v (svex-alist-keys blkst-alist)))
                    (not (member v (svex-alist-vars st.nonblkst)))
                    (not (member v (svex-alist-keys st.nonblkst))))))))

    Theorem: svar-lookup-of-accessors-of-svstate-vars

    (defthm svar-lookup-of-accessors-of-svstate-vars
      (b* ((?vars (svstate-vars st)))
        (implies (not (member (svar-fix v) vars))
                 (b* (((svstate st))
                      (blkst-alist (svstack-to-svex-alist st.blkst)))
                   (and (not (svex-lookup v blkst-alist))
                        (not (svex-lookup v st.nonblkst)))))))

    Theorem: svstate-vars-of-svstate-fix-st

    (defthm svstate-vars-of-svstate-fix-st
      (equal (svstate-vars (svstate-fix st))
             (svstate-vars st)))

    Theorem: svstate-vars-svstate-equiv-congruence-on-st

    (defthm svstate-vars-svstate-equiv-congruence-on-st
      (implies (svstate-equiv st st-equiv)
               (equal (svstate-vars st)
                      (svstate-vars st-equiv)))
      :rule-classes :congruence)