(vl-read-timescale echars) → (mv prefix remainder)
Function:
(defun vl-read-timescale (echars) (declare (xargs :guard (vl-echarlist-p echars))) (let ((__function__ 'vl-read-timescale)) (declare (ignorable __function__)) (b* (((mv ws1 remainder) (vl-read-while-whitespace echars)) ((mv tu-val remainder) (vl-read-some-literal (list "100" "10" "1") remainder)) ((mv ws2 remainder) (vl-read-while-whitespace remainder)) ((mv tu-type remainder) (vl-read-some-literal (list "fs" "ps" "ns" "us" "ms" "s") remainder)) ((mv ws3 remainder) (vl-read-while-whitespace remainder)) ((mv div remainder) (vl-read-literal "/" remainder)) ((mv ws4 remainder) (vl-read-while-whitespace remainder)) ((mv tp-val remainder) (vl-read-some-literal (list "100" "10" "1") remainder)) ((mv ws5 remainder) (vl-read-while-whitespace remainder)) ((mv tp-type remainder) (vl-read-some-literal (list "fs" "ps" "ns" "us" "ms" "s") remainder))) (if (and tu-val tu-type div tp-val tp-type) (mv (append ws1 tu-val ws2 tu-type ws3 div ws4 tp-val ws5 tp-type) remainder) (mv (cw "Preprocessor error (~s0): invalid `timescale directive.~%" (if (consp echars) (vl-location-string (vl-echar->loc (car echars))) "at end of file")) echars)))))
Theorem:
(defthm prefix-of-vl-read-timescale (and (true-listp (mv-nth 0 (vl-read-timescale echars))) (implies (force (vl-echarlist-p echars)) (vl-echarlist-p (mv-nth 0 (vl-read-timescale echars))))) :rule-classes ((:rewrite) (:type-prescription :corollary (true-listp (mv-nth 0 (vl-read-timescale echars))))))
Theorem:
(defthm remainder-of-vl-read-timescale (and (equal (true-listp (mv-nth 1 (vl-read-timescale echars))) (true-listp echars)) (implies (force (vl-echarlist-p echars)) (vl-echarlist-p (mv-nth 1 (vl-read-timescale echars))))) :rule-classes ((:rewrite) (:type-prescription :corollary (implies (true-listp echars) (true-listp (mv-nth 1 (vl-read-timescale echars)))))))
Theorem:
(defthm append-of-vl-read-timescale (equal (append (mv-nth 0 (vl-read-timescale echars)) (mv-nth 1 (vl-read-timescale echars))) echars))
Theorem:
(defthm no-change-loser-of-vl-read-timescale (implies (not (mv-nth 0 (vl-read-timescale echars))) (equal (mv-nth 1 (vl-read-timescale echars)) echars)))
Theorem:
(defthm acl2-count-of-vl-read-timescale-weak (<= (acl2-count (mv-nth 1 (vl-read-timescale echars))) (acl2-count echars)) :rule-classes ((:rewrite) (:linear)))
Theorem:
(defthm acl2-count-of-vl-read-timescale-strong (implies (mv-nth 0 (vl-read-timescale echars)) (< (acl2-count (mv-nth 1 (vl-read-timescale echars))) (acl2-count echars))) :rule-classes ((:rewrite) (:linear)))