• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
        • Warnings
        • Primitives
        • Use-set
        • Syntax
        • Getting-started
        • Utilities
        • Loader
        • Transforms
          • Expression-sizing
          • Occform
          • Oprewrite
          • Expand-functions
            • Vl-expr-expand-function-calls
            • Vl-expand-function-call
            • Vl-module-expand-functions
            • Vl-modulelist-expand-functions
            • Vl-check-bad-funcalls
            • Vl-funtemplate
              • Vl-funtemplate-p
                • Vl-fun-vardecllist-to-vardecls
                • Vl-funinputlist-to-vardecls
                • Vl-fundecl-expansion-template
                • Vl-funinput-to-vardecl
                • Vl-fundecllist-expansion-templates
                • Vl-fun-vardecllist-types-okp
                • Vl-portdecllist-types-okp
                • Vl-fun-vardecl-to-vardecl
                • Vl-find-funtemplate
                  • Vl-funtemplatelist
                • Vl-funtemplate-fix
                • Vl-funtemplate-equiv
                • Make-vl-funtemplate
                • Vl-funtemplate->locals
                • Vl-funtemplate->inputs
                • Vl-funtemplate->assigns
                • Change-vl-funtemplate
                • Vl-funtemplate->out
                • Vl-funtemplate->name
              • Vl-funbody-to-assignments
              • Vl-assignlist->rhses
              • Vl-fundecl-expand-params
              • Vl-fun-stmt-okp
              • Vl-fundecllist-expand-params
              • Vl-remove-fake-function-vardecls
              • Vl-design-expand-functions
            • Delayredux
            • Unparameterization
            • Caseelim
            • Split
            • Selresolve
            • Weirdint-elim
            • Vl-delta
            • Replicate-insts
            • Rangeresolve
            • Propagate
            • Clean-selects
            • Clean-params
            • Blankargs
            • Inline-mods
            • Expr-simp
            • Trunc
            • Always-top
            • Gatesplit
            • Gate-elim
            • Expression-optimization
            • Elim-supplies
            • Wildelim
            • Drop-blankports
            • Clean-warnings
            • Addinstnames
            • Custom-transform-hooks
            • Annotate
            • Latchcode
            • Elim-unused-vars
            • Problem-modules
          • Lint
          • Mlib
          • Server
          • Kit
          • Printer
          • Esim-vl
          • Well-formedness
        • Sv
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Vl-funtemplate-p

    Vl-find-funtemplate

    Find a function template by name.

    Signature
    (vl-find-funtemplate name templates) → template?
    Arguments
    name — Guard (stringp name).
    templates — Guard (vl-funtemplatelist-p templates).
    Returns
    template? — Type (equal (vl-funtemplate-p template?) (if template? t nil)), given the guard.

    Definitions and Theorems

    Function: vl-find-funtemplate

    (defun vl-find-funtemplate (name templates)
      (declare (xargs :guard (and (stringp name)
                                  (vl-funtemplatelist-p templates))))
      (let ((__function__ 'vl-find-funtemplate))
        (declare (ignorable __function__))
        (cond ((atom templates) nil)
              ((equal name
                      (vl-funtemplate->name (car templates)))
               (car templates))
              (t (vl-find-funtemplate name (cdr templates))))))

    Theorem: return-type-of-vl-find-funtemplate

    (defthm return-type-of-vl-find-funtemplate
      (implies (and (force (stringp name))
                    (force (vl-funtemplatelist-p templates)))
               (b* ((template? (vl-find-funtemplate name templates)))
                 (equal (vl-funtemplate-p template?)
                        (if template? t nil))))
      :rule-classes :rewrite)