• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
        • Warnings
        • Primitives
        • Use-set
        • Syntax
        • Getting-started
        • Utilities
        • Loader
        • Transforms
        • Lint
        • Mlib
          • Scopestack
          • Filtering-by-name
          • Vl-namefactory
          • Substitution
          • Allexprs
          • Hid-tools
          • Vl-consteval
          • Range-tools
          • Lvalexprs
          • Hierarchy
          • Finding-by-name
          • Expr-tools
            • Vl-expr-widthsfixed-p
            • Vl-make-idexpr-list
            • Vl-exprlist-resolved->vals
            • Vl-idexprlist->names
            • Vl-expr-names
            • Vl-expr-count
            • Vl-idexpr
            • Vl-exprlist-to-plainarglist
              • Vl-expr-atoms
              • Vl-expr-ops
              • Vl-expr-count-noatts
              • Vl-make-index
              • Vl-expr-selects
              • Vl-bitlist-from-nat
              • Vl-pps-expr
              • Vl-expr-add-atts
              • Vl-idexprlist-p
              • Vl-expr-resolved-p
              • Vl-pps-origexpr
              • Vl-expr-funnames
              • Vl-idexpr->name
              • Vl-idexpr-p
              • Vl-exprlist-funnames
              • Vl-resolved->val
              • Vl-exprlist-resolved-p
              • Vl-expr->atts
              • Vl-obviously-true-expr-p
              • Vl-obviously-false-expr-p
              • Vl-exprlist-has-funcalls
              • Vl-expr-has-funcalls
              • Vl-zbitlist-p
              • Vl-zatom-p
              • Vl-exprlist-has-ops
              • Vl-expr-has-ops
              • Vl-expr-varnames
              • Vl-one-bit-constants
            • Expr-slicing
            • Stripping-functions
            • Stmt-tools
            • Modnamespace
            • Vl-parse-expr-from-str
            • Welltyped
            • Reordering-by-name
            • Flat-warnings
            • Genblob
            • Expr-building
            • Datatype-tools
            • Syscalls
            • Relocate
            • Expr-cleaning
            • Namemangle
            • Caremask
            • Port-tools
            • Lvalues
          • Server
          • Kit
          • Printer
          • Esim-vl
          • Well-formedness
        • Sv
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Expr-tools

    Vl-exprlist-to-plainarglist

    Convert expressions into vl-plainarg-ps.

    Signature
    (vl-exprlist-to-plainarglist x &key dir atts) → ans
    Arguments
    x — list to convert.
        Guard (vl-exprlist-p x).
    dir — direction for each new plainarg.
        Guard (vl-maybe-direction-p dir).
    atts — attributes for each new plainarg.
        Guard (vl-atts-p atts).
    Returns
    ans — Type (vl-plainarglist-p ans).

    Definitions and Theorems

    Function: vl-exprlist-to-plainarglist-fn

    (defun vl-exprlist-to-plainarglist-fn (x dir atts)
      (declare (xargs :guard (and (vl-exprlist-p x)
                                  (vl-maybe-direction-p dir)
                                  (vl-atts-p atts))))
      (let ((__function__ 'vl-exprlist-to-plainarglist))
        (declare (ignorable __function__))
        (if (consp x)
            (cons (make-vl-plainarg :expr (vl-expr-fix (car x))
                                    :dir dir
                                    :atts atts)
                  (vl-exprlist-to-plainarglist-fn (cdr x)
                                                  dir atts))
          nil)))

    Theorem: vl-plainarglist-p-of-vl-exprlist-to-plainarglist

    (defthm vl-plainarglist-p-of-vl-exprlist-to-plainarglist
      (b* ((ans (vl-exprlist-to-plainarglist-fn x dir atts)))
        (vl-plainarglist-p ans))
      :rule-classes :rewrite)

    Theorem: vl-exprlist-to-plainarglist-under-iff

    (defthm vl-exprlist-to-plainarglist-under-iff
      (iff (vl-exprlist-to-plainarglist x
                                        :dir dir
                                        :atts atts)
           (consp x)))

    Theorem: len-of-vl-exprlist-to-plainarglist

    (defthm len-of-vl-exprlist-to-plainarglist
      (equal (len (vl-exprlist-to-plainarglist x
                                               :dir dir
                                               :atts atts))
             (len x)))

    Theorem: vl-exprlist-to-plainarglist-fn-of-vl-exprlist-fix-x

    (defthm vl-exprlist-to-plainarglist-fn-of-vl-exprlist-fix-x
      (equal (vl-exprlist-to-plainarglist-fn (vl-exprlist-fix x)
                                             dir atts)
             (vl-exprlist-to-plainarglist-fn x dir atts)))

    Theorem: vl-exprlist-to-plainarglist-fn-vl-exprlist-equiv-congruence-on-x

    (defthm
       vl-exprlist-to-plainarglist-fn-vl-exprlist-equiv-congruence-on-x
     (implies (vl-exprlist-equiv x x-equiv)
              (equal (vl-exprlist-to-plainarglist-fn x dir atts)
                     (vl-exprlist-to-plainarglist-fn x-equiv dir atts)))
     :rule-classes :congruence)

    Theorem: vl-exprlist-to-plainarglist-fn-of-vl-maybe-direction-fix-dir

    (defthm vl-exprlist-to-plainarglist-fn-of-vl-maybe-direction-fix-dir
     (equal
          (vl-exprlist-to-plainarglist-fn x (vl-maybe-direction-fix dir)
                                          atts)
          (vl-exprlist-to-plainarglist-fn x dir atts)))

    Theorem: vl-exprlist-to-plainarglist-fn-vl-maybe-direction-equiv-congruence-on-dir

    (defthm
     vl-exprlist-to-plainarglist-fn-vl-maybe-direction-equiv-congruence-on-dir
     (implies (vl-maybe-direction-equiv dir dir-equiv)
              (equal (vl-exprlist-to-plainarglist-fn x dir atts)
                     (vl-exprlist-to-plainarglist-fn x dir-equiv atts)))
     :rule-classes :congruence)

    Theorem: vl-exprlist-to-plainarglist-fn-of-vl-atts-fix-atts

    (defthm vl-exprlist-to-plainarglist-fn-of-vl-atts-fix-atts
      (equal (vl-exprlist-to-plainarglist-fn x dir (vl-atts-fix atts))
             (vl-exprlist-to-plainarglist-fn x dir atts)))

    Theorem: vl-exprlist-to-plainarglist-fn-vl-atts-equiv-congruence-on-atts

    (defthm
        vl-exprlist-to-plainarglist-fn-vl-atts-equiv-congruence-on-atts
     (implies (vl-atts-equiv atts atts-equiv)
              (equal (vl-exprlist-to-plainarglist-fn x dir atts)
                     (vl-exprlist-to-plainarglist-fn x dir atts-equiv)))
     :rule-classes :congruence)