• 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
          • Address
          • Wire
          • Module
          • Lhs
          • Path
          • Svar-add-namespace
          • Design
          • Modinst
          • Lhs-add-namespace
          • Modalist
          • Path-add-namespace
          • Modname->submodnames
          • Name
          • Constraintlist-addr-p
          • Svex-alist-addr-p
          • Svar-map-addr-p
          • Lhspairs-addr-p
          • Modname
          • Assigns-addr-p
          • Lhs-addr-p
          • Lhatom-addr-p
          • Modhier-list-measure
          • Attributes
            • Attributes-fix
            • Attributes-p
              • Attributes-equiv
            • Modhier-measure
            • Modhier-list-measure-aux
            • Modhier-loopfreelist-p
            • Modhier-loopfree-p
          • Svstmt
          • Sv-tutorial
          • Expressions
          • Symbolic-test-vector
          • Vl-to-svex
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Attributes

    Attributes-p

    Recognizer for attributes.

    Signature
    (attributes-p x) → *

    Definitions and Theorems

    Function: attributes-p

    (defun attributes-p (x)
      (declare (xargs :guard t))
      (let ((__function__ 'attributes-p))
        (declare (ignorable __function__))
        (if (atom x)
            (eq x nil)
          (and (consp (car x))
               (stringp (caar x))
               (maybe-svex-p (cdar x))
               (attributes-p (cdr x))))))

    Theorem: attributes-p-of-butlast

    (defthm attributes-p-of-butlast
      (implies (attributes-p (double-rewrite x))
               (attributes-p (butlast x acl2::n)))
      :rule-classes ((:rewrite)))

    Theorem: attributes-p-of-take

    (defthm attributes-p-of-take
      (implies (attributes-p (double-rewrite x))
               (iff (attributes-p (take acl2::n x))
                    (or (and (consp nil)
                             (stringp (car nil))
                             (maybe-svex-p (cdr nil)))
                        (<= (nfix acl2::n) (len x)))))
      :rule-classes ((:rewrite)))

    Theorem: attributes-p-of-append

    (defthm attributes-p-of-append
      (equal (attributes-p (append acl2::a acl2::b))
             (and (attributes-p (list-fix acl2::a))
                  (attributes-p acl2::b)))
      :rule-classes ((:rewrite)))

    Theorem: attributes-p-of-repeat

    (defthm attributes-p-of-repeat
      (iff (attributes-p (repeat acl2::n x))
           (or (and (consp x)
                    (stringp (car x))
                    (maybe-svex-p (cdr x)))
               (zp acl2::n)))
      :rule-classes ((:rewrite)))

    Theorem: attributes-p-of-rev

    (defthm attributes-p-of-rev
      (equal (attributes-p (rev x))
             (attributes-p (list-fix x)))
      :rule-classes ((:rewrite)))

    Theorem: attributes-p-of-list-fix

    (defthm attributes-p-of-list-fix
      (implies (attributes-p x)
               (attributes-p (list-fix x)))
      :rule-classes ((:rewrite)))

    Theorem: true-listp-when-attributes-p-compound-recognizer

    (defthm true-listp-when-attributes-p-compound-recognizer
      (implies (attributes-p x)
               (true-listp x))
      :rule-classes :compound-recognizer)

    Theorem: attributes-p-when-not-consp

    (defthm attributes-p-when-not-consp
      (implies (not (consp x))
               (equal (attributes-p x) (not x)))
      :rule-classes ((:rewrite)))

    Theorem: attributes-p-of-cdr-when-attributes-p

    (defthm attributes-p-of-cdr-when-attributes-p
      (implies (attributes-p (double-rewrite x))
               (attributes-p (cdr x)))
      :rule-classes ((:rewrite)))

    Theorem: attributes-p-of-cons

    (defthm attributes-p-of-cons
      (equal (attributes-p (cons acl2::a x))
             (and (and (consp acl2::a)
                       (stringp (car acl2::a))
                       (maybe-svex-p (cdr acl2::a)))
                  (attributes-p x)))
      :rule-classes ((:rewrite)))

    Theorem: attributes-p-of-remove-assoc

    (defthm attributes-p-of-remove-assoc
      (implies (attributes-p x)
               (attributes-p (remove-assoc-equal acl2::name x)))
      :rule-classes ((:rewrite)))

    Theorem: attributes-p-of-put-assoc

    (defthm attributes-p-of-put-assoc
      (implies
           (and (attributes-p x))
           (iff (attributes-p (put-assoc-equal acl2::name acl2::val x))
                (and (stringp acl2::name)
                     (maybe-svex-p acl2::val))))
      :rule-classes ((:rewrite)))

    Theorem: attributes-p-of-fast-alist-clean

    (defthm attributes-p-of-fast-alist-clean
      (implies (attributes-p x)
               (attributes-p (fast-alist-clean x)))
      :rule-classes ((:rewrite)))

    Theorem: attributes-p-of-hons-shrink-alist

    (defthm attributes-p-of-hons-shrink-alist
      (implies (and (attributes-p x) (attributes-p y))
               (attributes-p (hons-shrink-alist x y)))
      :rule-classes ((:rewrite)))

    Theorem: attributes-p-of-hons-acons

    (defthm attributes-p-of-hons-acons
      (equal (attributes-p (hons-acons acl2::a acl2::n x))
             (and (stringp acl2::a)
                  (maybe-svex-p acl2::n)
                  (attributes-p x)))
      :rule-classes ((:rewrite)))

    Theorem: maybe-svex-p-of-cdr-of-hons-assoc-equal-when-attributes-p

    (defthm maybe-svex-p-of-cdr-of-hons-assoc-equal-when-attributes-p
      (implies (attributes-p x)
               (iff (maybe-svex-p (cdr (hons-assoc-equal acl2::k x)))
                    (or (hons-assoc-equal acl2::k x)
                        (maybe-svex-p nil))))
      :rule-classes ((:rewrite)))

    Theorem: alistp-when-attributes-p-rewrite

    (defthm alistp-when-attributes-p-rewrite
      (implies (attributes-p x) (alistp x))
      :rule-classes ((:rewrite)))

    Theorem: alistp-when-attributes-p

    (defthm alistp-when-attributes-p
      (implies (attributes-p x) (alistp x))
      :rule-classes :tau-system)

    Theorem: maybe-svex-p-of-cdar-when-attributes-p

    (defthm maybe-svex-p-of-cdar-when-attributes-p
      (implies (attributes-p x)
               (iff (maybe-svex-p (cdar x))
                    (or (consp x) (maybe-svex-p nil))))
      :rule-classes ((:rewrite)))

    Theorem: stringp-of-caar-when-attributes-p

    (defthm stringp-of-caar-when-attributes-p
      (implies (attributes-p x)
               (iff (stringp (caar x))
                    (or (consp x) (stringp nil))))
      :rule-classes ((:rewrite)))