• 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
        • Symbolic-test-vector
        • Vl-to-svex
          • Vl-to-sv
          • Vl-design->sv-design
            • Vl-simpconfig
            • Vl-hierarchy-sv-translation
            • Vl-expr-svex-translation
            • Vl-design->svex-modalist
            • Vl-svstmt
              • Vl-svstmt.lisp
                • Vl-casestmt-violation-conds
                • Vl-caselist-none/multiple
                • Vl-elaborated-expr-consteval
                • Vl-always->svex
                • Vl-caseexprs->svex-test
                • Vl-always->svex-checks
                • Vl-implicitvalueparam-final-type
                • Vl-assignstmt->svstmts
                • Vl-fundecl-to-svex
                • Vl-evatomlist-delay-substitution
                • Vl-consteval
                • Vl-alwayslist->svex
                  • Vl-index-expr-svex/size/type
                  • Vl-vardecllist->svstmts
                  • Sv::svex-alist->assigns
                  • Vl-case-conservative-test-expr
                  • Vl-evatomlist->svex
                  • Vl-case-xcond-wrapper
                  • Sv::constraintlist-maybe-rewrite-fixpoint
                  • Vl-always-apply-trigger-to-updates
                  • Vl-initiallist-size-warnings
                  • Vl-initial-size-warnings
                  • Vl-finallist-size-warnings
                  • Vl-always->svex-latch-warnings
                  • Vl-final-size-warnings
                  • Sv::svarlist-masked-x-subst
                  • Sv::svar->lhs-by-mask
                  • Svstmt-config
                  • Sv::svex-alist-unset-nonblocking
                  • Sv::svar->lhs-by-size
                  • Combine-mask-alists
                  • Sv::svarlist-delay-subst
                  • Vttree-constraints-to-svstmts
                  • Sv::4vmask-alist-unset-nonblocking
                  • Sv::svarlist-remove-delays
                  • Vl-caselist->caseexprs
                  • Vl-evatomlist-has-edge
            • Vl-to-sv-main
            • Vl-simplify-sv
            • Vl-user-paramsettings->unparam-names
            • Vl-user-paramsettings->modnames
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Vl-svstmt.lisp

    Vl-alwayslist->svex

    Translate a combinational or latch-type always block into a set of SVEX expressions.

    Signature
    (vl-alwayslist->svex x ss scopes config) 
      → 
    (mv warnings assigns constraints)
    Arguments
    x — Guard (vl-alwayslist-p x).
    ss — Guard (vl-scopestack-p ss).
    scopes — Guard (vl-elabscopes-p scopes).
    config — Guard (vl-simpconfig-p config).
    Returns
    warnings — Type (vl-warninglist-p warnings).
    assigns — Type (sv::assigns-p assigns).
    constraints — Type (sv::constraintlist-p constraints).

    Definitions and Theorems

    Function: vl-alwayslist->svex

    (defun vl-alwayslist->svex (x ss scopes config)
     (declare (xargs :guard (and (vl-alwayslist-p x)
                                 (vl-scopestack-p ss)
                                 (vl-elabscopes-p scopes)
                                 (vl-simpconfig-p config))))
     (let ((__function__ 'vl-alwayslist->svex))
      (declare (ignorable __function__))
      (b*
       ((warnings nil)
        ((when (atom x)) (mv (ok) nil nil))
        ((wmv warnings assigns1 constraints1)
         (time$
            (vl-always->svex (car x)
                             ss scopes config)
            :mintime 1
            :msg "; vl-always->svex at ~s0 total: ~st sec, ~sa bytes~%"
            :args (list (vl-location-string (vl-always->loc (car x))))))
        ((wmv warnings assigns2 constraints2)
         (vl-alwayslist->svex (cdr x)
                              ss scopes config)))
       (mv warnings
           (append-without-guard assigns1 assigns2)
           (append-without-guard constraints1 constraints2)))))

    Theorem: vl-warninglist-p-of-vl-alwayslist->svex.warnings

    (defthm vl-warninglist-p-of-vl-alwayslist->svex.warnings
      (b* (((mv ?warnings ?assigns ?constraints)
            (vl-alwayslist->svex x ss scopes config)))
        (vl-warninglist-p warnings))
      :rule-classes :rewrite)

    Theorem: assigns-p-of-vl-alwayslist->svex.assigns

    (defthm assigns-p-of-vl-alwayslist->svex.assigns
      (b* (((mv ?warnings ?assigns ?constraints)
            (vl-alwayslist->svex x ss scopes config)))
        (sv::assigns-p assigns))
      :rule-classes :rewrite)

    Theorem: constraintlist-p-of-vl-alwayslist->svex.constraints

    (defthm constraintlist-p-of-vl-alwayslist->svex.constraints
      (b* (((mv ?warnings ?assigns ?constraints)
            (vl-alwayslist->svex x ss scopes config)))
        (sv::constraintlist-p constraints))
      :rule-classes :rewrite)

    Theorem: vars-of-vl-alwayslist->svex

    (defthm vars-of-vl-alwayslist->svex
     (b* (((mv ?warnings ?assigns ?constraints)
           (vl-alwayslist->svex x ss scopes config)))
      (and
          (sv::svarlist-addr-p (sv::assigns-vars assigns))
          (sv::svarlist-addr-p (sv::constraintlist-vars constraints)))))

    Theorem: vl-alwayslist->svex-of-vl-alwayslist-fix-x

    (defthm vl-alwayslist->svex-of-vl-alwayslist-fix-x
      (equal (vl-alwayslist->svex (vl-alwayslist-fix x)
                                  ss scopes config)
             (vl-alwayslist->svex x ss scopes config)))

    Theorem: vl-alwayslist->svex-vl-alwayslist-equiv-congruence-on-x

    (defthm vl-alwayslist->svex-vl-alwayslist-equiv-congruence-on-x
      (implies (vl-alwayslist-equiv x x-equiv)
               (equal (vl-alwayslist->svex x ss scopes config)
                      (vl-alwayslist->svex x-equiv ss scopes config)))
      :rule-classes :congruence)

    Theorem: vl-alwayslist->svex-of-vl-scopestack-fix-ss

    (defthm vl-alwayslist->svex-of-vl-scopestack-fix-ss
      (equal (vl-alwayslist->svex x (vl-scopestack-fix ss)
                                  scopes config)
             (vl-alwayslist->svex x ss scopes config)))

    Theorem: vl-alwayslist->svex-vl-scopestack-equiv-congruence-on-ss

    (defthm vl-alwayslist->svex-vl-scopestack-equiv-congruence-on-ss
      (implies (vl-scopestack-equiv ss ss-equiv)
               (equal (vl-alwayslist->svex x ss scopes config)
                      (vl-alwayslist->svex x ss-equiv scopes config)))
      :rule-classes :congruence)

    Theorem: vl-alwayslist->svex-of-vl-elabscopes-fix-scopes

    (defthm vl-alwayslist->svex-of-vl-elabscopes-fix-scopes
      (equal (vl-alwayslist->svex x ss (vl-elabscopes-fix scopes)
                                  config)
             (vl-alwayslist->svex x ss scopes config)))

    Theorem: vl-alwayslist->svex-vl-elabscopes-equiv-congruence-on-scopes

    (defthm vl-alwayslist->svex-vl-elabscopes-equiv-congruence-on-scopes
      (implies (vl-elabscopes-equiv scopes scopes-equiv)
               (equal (vl-alwayslist->svex x ss scopes config)
                      (vl-alwayslist->svex x ss scopes-equiv config)))
      :rule-classes :congruence)

    Theorem: vl-alwayslist->svex-of-vl-simpconfig-fix-config

    (defthm vl-alwayslist->svex-of-vl-simpconfig-fix-config
     (equal (vl-alwayslist->svex x ss scopes (vl-simpconfig-fix config))
            (vl-alwayslist->svex x ss scopes config)))

    Theorem: vl-alwayslist->svex-vl-simpconfig-equiv-congruence-on-config

    (defthm vl-alwayslist->svex-vl-simpconfig-equiv-congruence-on-config
      (implies (vl-simpconfig-equiv config config-equiv)
               (equal (vl-alwayslist->svex x ss scopes config)
                      (vl-alwayslist->svex x ss scopes config-equiv)))
      :rule-classes :congruence)