• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
        • Warnings
          • Vl-warninglist->types
            • Vl-warning
            • Propagating-errors
            • Vl-reportcard
            • Vl-warning-sort
            • Lint-warning-suppression
            • Clean-warnings
            • Warn
            • Vl-some-warning-fatalp
            • Vl-print-warnings-with-header
            • Vl-print-warnings-with-named-header
            • Flat-warnings
            • Vl-keep-warnings
            • Vl-remove-warnings
            • Vl-print-warnings
            • Vl-some-warning-of-type-p
            • Vl-clean-warnings
            • Vl-warnings-to-string
            • Vl-warninglist
            • Vl-print-warning
            • Ok
            • Vl-trace-warnings
            • Fatal
          • Primitives
          • Use-set
          • Syntax
          • Getting-started
          • Utilities
          • Loader
          • Transforms
          • Lint
          • Mlib
          • Server
          • Kit
          • Printer
          • Esim-vl
          • Well-formedness
        • Sv
        • Vwsim
        • Fgl
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Testing-utilities
      • Math
    • Warnings

    Vl-warninglist->types

    (vl-warninglist->types x) maps vl-warning->type across a list.

    Signature
    (vl-warninglist->types x) → types
    Arguments
    x — Guard (vl-warninglist-p x).
    Returns
    types — Type (symbol-listp types).

    This is an ordinary defprojection.

    Definitions and Theorems

    Function: vl-warninglist->types-exec

    (defun vl-warninglist->types-exec (x acc)
           (declare (xargs :guard (vl-warninglist-p x)))
           (declare (xargs :guard t))
           (let ((__function__ 'vl-warninglist->types-exec))
                (declare (ignorable __function__))
                (if (consp x)
                    (vl-warninglist->types-exec
                         (cdr x)
                         (cons (vl-warning->type (car x)) acc))
                    acc)))

    Function: vl-warninglist->types-nrev

    (defun vl-warninglist->types-nrev (x nrev)
           (declare (xargs :stobjs (nrev)))
           (declare (xargs :guard (vl-warninglist-p x)))
           (declare (xargs :guard t))
           (let ((__function__ 'vl-warninglist->types-nrev))
                (declare (ignorable __function__))
                (if (atom x)
                    (nrev-fix nrev)
                    (let ((nrev (nrev-push (vl-warning->type (car x))
                                           nrev)))
                         (vl-warninglist->types-nrev (cdr x)
                                                     nrev)))))

    Function: vl-warninglist->types

    (defun
     vl-warninglist->types (x)
     (declare (xargs :guard (vl-warninglist-p x)))
     (declare (xargs :guard t))
     (let
      ((__function__ 'vl-warninglist->types))
      (declare (ignorable __function__))
      (mbe :logic (if (consp x)
                      (cons (vl-warning->type (car x))
                            (vl-warninglist->types (cdr x)))
                      nil)
           :exec
           (if (atom x)
               nil
               (with-local-nrev (vl-warninglist->types-nrev x nrev))))))

    Theorem: symbol-listp-of-vl-warninglist->types

    (defthm symbol-listp-of-vl-warninglist->types
            (b* ((types (vl-warninglist->types x)))
                (symbol-listp types))
            :rule-classes :rewrite)

    Theorem: vl-warninglist->types-of-vl-warninglist-fix-x

    (defthm vl-warninglist->types-of-vl-warninglist-fix-x
            (equal (vl-warninglist->types (vl-warninglist-fix x))
                   (vl-warninglist->types x)))

    Theorem: vl-warninglist->types-vl-warninglist-equiv-congruence-on-x

    (defthm vl-warninglist->types-vl-warninglist-equiv-congruence-on-x
            (implies (vl-warninglist-equiv x x-equiv)
                     (equal (vl-warninglist->types x)
                            (vl-warninglist->types x-equiv)))
            :rule-classes :congruence)

    Theorem: vl-warninglist->types-of-update-nth

    (defthm
     vl-warninglist->types-of-update-nth
     (implies
       (<= (nfix acl2::n) (len acl2::x))
       (equal
            (vl-warninglist->types (update-nth acl2::n acl2::v acl2::x))
            (update-nth acl2::n (vl-warning->type acl2::v)
                        (vl-warninglist->types acl2::x))))
     :rule-classes ((:rewrite)))

    Theorem: vl-warninglist->types-of-revappend

    (defthm vl-warninglist->types-of-revappend
            (equal (vl-warninglist->types (revappend acl2::x acl2::y))
                   (revappend (vl-warninglist->types acl2::x)
                              (vl-warninglist->types acl2::y)))
            :rule-classes ((:rewrite)))

    Theorem: nthcdr-of-vl-warninglist->types

    (defthm nthcdr-of-vl-warninglist->types
            (equal (nthcdr acl2::n (vl-warninglist->types acl2::x))
                   (vl-warninglist->types (nthcdr acl2::n acl2::x)))
            :rule-classes ((:rewrite)))

    Theorem: nth-of-vl-warninglist->types

    (defthm nth-of-vl-warninglist->types
            (equal (nth acl2::n (vl-warninglist->types acl2::x))
                   (and (< (nfix acl2::n) (len acl2::x))
                        (vl-warning->type (nth acl2::n acl2::x))))
            :rule-classes ((:rewrite)))

    Theorem: vl-warninglist->types-nrev-removal

    (defthm vl-warninglist->types-nrev-removal
            (equal (vl-warninglist->types-nrev acl2::x nrev)
                   (append nrev (vl-warninglist->types acl2::x)))
            :rule-classes ((:rewrite)))

    Theorem: vl-warninglist->types-exec-removal

    (defthm vl-warninglist->types-exec-removal
            (equal (vl-warninglist->types-exec acl2::x acl2::acc)
                   (revappend (vl-warninglist->types acl2::x)
                              acl2::acc))
            :rule-classes ((:rewrite)))

    Theorem: vl-warninglist->types-of-take

    (defthm
         vl-warninglist->types-of-take
         (implies (<= (nfix acl2::n) (len acl2::x))
                  (equal (vl-warninglist->types (take acl2::n acl2::x))
                         (take acl2::n
                               (vl-warninglist->types acl2::x))))
         :rule-classes ((:rewrite)))

    Theorem: set-equiv-congruence-over-vl-warninglist->types

    (defthm set-equiv-congruence-over-vl-warninglist->types
            (implies (set-equiv acl2::x acl2::y)
                     (set-equiv (vl-warninglist->types acl2::x)
                                (vl-warninglist->types acl2::y)))
            :rule-classes ((:congruence)))

    Theorem: subsetp-of-vl-warninglist->types-when-subsetp

    (defthm subsetp-of-vl-warninglist->types-when-subsetp
            (implies (subsetp acl2::x acl2::y)
                     (subsetp (vl-warninglist->types acl2::x)
                              (vl-warninglist->types acl2::y)))
            :rule-classes ((:rewrite)))

    Theorem: member-of-vl-warning->type-in-vl-warninglist->types

    (defthm member-of-vl-warning->type-in-vl-warninglist->types
            (implies (member acl2::k acl2::x)
                     (member (vl-warning->type acl2::k)
                             (vl-warninglist->types acl2::x)))
            :rule-classes ((:rewrite)))

    Theorem: vl-warninglist->types-of-rev

    (defthm vl-warninglist->types-of-rev
            (equal (vl-warninglist->types (rev acl2::x))
                   (rev (vl-warninglist->types acl2::x)))
            :rule-classes ((:rewrite)))

    Theorem: vl-warninglist->types-of-list-fix

    (defthm vl-warninglist->types-of-list-fix
            (equal (vl-warninglist->types (list-fix acl2::x))
                   (vl-warninglist->types acl2::x))
            :rule-classes ((:rewrite)))

    Theorem: vl-warninglist->types-of-append

    (defthm vl-warninglist->types-of-append
            (equal (vl-warninglist->types (append acl2::a acl2::b))
                   (append (vl-warninglist->types acl2::a)
                           (vl-warninglist->types acl2::b)))
            :rule-classes ((:rewrite)))

    Theorem: cdr-of-vl-warninglist->types

    (defthm cdr-of-vl-warninglist->types
            (equal (cdr (vl-warninglist->types acl2::x))
                   (vl-warninglist->types (cdr acl2::x)))
            :rule-classes ((:rewrite)))

    Theorem: car-of-vl-warninglist->types

    (defthm car-of-vl-warninglist->types
            (equal (car (vl-warninglist->types acl2::x))
                   (and (consp acl2::x)
                        (vl-warning->type (car acl2::x))))
            :rule-classes ((:rewrite)))

    Theorem: vl-warninglist->types-under-iff

    (defthm vl-warninglist->types-under-iff
            (iff (vl-warninglist->types acl2::x)
                 (consp acl2::x))
            :rule-classes ((:rewrite)))

    Theorem: consp-of-vl-warninglist->types

    (defthm consp-of-vl-warninglist->types
            (equal (consp (vl-warninglist->types acl2::x))
                   (consp acl2::x))
            :rule-classes ((:rewrite)))

    Theorem: len-of-vl-warninglist->types

    (defthm len-of-vl-warninglist->types
            (equal (len (vl-warninglist->types acl2::x))
                   (len acl2::x))
            :rule-classes ((:rewrite)))

    Theorem: true-listp-of-vl-warninglist->types

    (defthm true-listp-of-vl-warninglist->types
            (true-listp (vl-warninglist->types acl2::x))
            :rule-classes :type-prescription)

    Theorem: vl-warninglist->types-when-not-consp

    (defthm vl-warninglist->types-when-not-consp
            (implies (not (consp acl2::x))
                     (equal (vl-warninglist->types acl2::x)
                            nil))
            :rule-classes ((:rewrite)))

    Theorem: vl-warninglist->types-of-cons

    (defthm vl-warninglist->types-of-cons
            (equal (vl-warninglist->types (cons acl2::a acl2::b))
                   (cons (vl-warning->type acl2::a)
                         (vl-warninglist->types acl2::b)))
            :rule-classes ((:rewrite)))