• 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-evatomlist->svex

    Signature
    (vl-evatomlist->svex x ss scopes) → (mv warnings trigger)
    Arguments
    x — Guard (vl-evatomlist-p x).
    ss — Guard (vl-scopestack-p ss).
    scopes — Guard (vl-elabscopes-p scopes).
    Returns
    warnings — Type (vl-warninglist-p warnings).
    trigger — Type (and (sv::svex-p trigger) (sv::svarlist-addr-p (sv::svex-vars trigger))) .

    Definitions and Theorems

    Function: vl-evatomlist->svex

    (defun vl-evatomlist->svex (x ss scopes)
     (declare (xargs :guard (and (vl-evatomlist-p x)
                                 (vl-scopestack-p ss)
                                 (vl-elabscopes-p scopes))))
     (let ((__function__ 'vl-evatomlist->svex))
      (declare (ignorable __function__))
      (b*
       (((when (atom x))
         (mv nil (sv::svex-quote (sv::2vec 0))))
        ((vl-evatom x1) (car x))
        (warnings nil)
        ((vwmv vttree expr ?type ?size)
         (vl-expr-to-svex-untyped x1.expr ss scopes))
        (delay-expr (sv::svex-add-delay expr 1))
        (trigger1
         (case
          x1.type
          (:vl-noedge (sv::svcall sv::bitnot
                                  (sv::svcall sv::== expr delay-expr)))
          (:vl-posedge
             (sv::svcall
                  sv::uor
                  (sv::svcall sv::bitand
                              (sv::svcall sv::bitnot
                                          (sv::svex-zerox 1 delay-expr))
                              (sv::svex-zerox 1 expr))))
          (:vl-negedge
           (sv::svcall
             sv::uor
             (sv::svcall sv::bitand
                         (sv::svcall sv::bitnot (sv::svex-zerox 1 expr))
                         (sv::svex-zerox 1 delay-expr))))
          (:vl-edge
              (sv::svcall sv::uor
                          (sv::svcall sv::bitxor (sv::svex-zerox 1 expr)
                                      (sv::svex-zerox 1 delay-expr))))))
        ((wmv warnings rest)
         (vl-evatomlist->svex (cdr x)
                              ss scopes)))
       (mv warnings
           (sv::make-svex-call :fn 'sv::bitor
                               :args (list trigger1 rest))))))

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

    (defthm vl-warninglist-p-of-vl-evatomlist->svex.warnings
      (b* (((mv ?warnings ?trigger)
            (vl-evatomlist->svex x ss scopes)))
        (vl-warninglist-p warnings))
      :rule-classes :rewrite)

    Theorem: return-type-of-vl-evatomlist->svex.trigger

    (defthm return-type-of-vl-evatomlist->svex.trigger
      (b* (((mv ?warnings ?trigger)
            (vl-evatomlist->svex x ss scopes)))
        (and (sv::svex-p trigger)
             (sv::svarlist-addr-p (sv::svex-vars trigger))))
      :rule-classes :rewrite)

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

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

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

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

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

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

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

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

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

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

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

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