• 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
        • 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
              • Sv::vl-expr.lisp
              • Vttree
                • Vttree-p
                • Vttree-fix
                • Vttree-count
                • Vttree-equiv
                • Vttree-context
                • Vttree-branch
                • Vttree-warnings
                • Vttree-constraints
                • Vttree-none
                • Vttree-kind
                • Patbind-wvmv
                • Patbind-vwmv
                • Patbind-vmv
              • Vl-design->svex-modalist
              • Vl-svstmt
            • 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
    • Vttree

    Patbind-vmv

    B* binder to automatically join returned vttrees

    This is a b* binder introduced with ACL2::def-b*-binder.

    Macro: patbind-vmv

    (defmacro patbind-vmv (args acl2::forms acl2::rest-expr)
     (b* (((mv ctx args)
           (b* ((mem (member :ctx args)))
             (if mem (mv (cadr mem)
                         (append (take (- (len args) (len mem)) args)
                                 (cddr mem)))
               (mv nil args)))))
      (cons
       'b*
       (cons
        (cons
         (if (equal args '(vttree))
             (cons '__tmp__vttree acl2::forms)
           (cons (cons 'mv
                       (subst '__tmp__vttree 'vttree args))
                 acl2::forms))
         (cons
          (cons
           'vttree
           (cons
            (cons
             'vttree-join
             (cons
              (if ctx (cons 'make-vttree-context
                            (cons ':ctx
                                  (cons ctx '(:subtree __tmp__vttree))))
                '__tmp__vttree)
              '(vttree)))
            'nil))
          'nil))
        (cons acl2::rest-expr 'nil)))))