Matches
(vl-read-decimal-value echars) → (mv prefix remainder)
This doesn't correspond to a named production in the Verilog
grammars, but captures everything that's legal after the
decimal-number ::= unsigned_number | [size] decimal_base decimal_value decimal_value ::= unsigned_number | x_digit { _ } | z_digit { _ }
Neither Verilog-2005 and SystemVerilog-2012 explicitly rules out spaces in
the
Function:
(defun vl-read-decimal-value (echars) (declare (xargs :guard (vl-echarlist-p echars))) (let ((__function__ 'vl-read-decimal-value)) (declare (ignorable __function__)) (b* (((when (atom echars)) (mv nil echars)) ((unless (or (vl-x-digit-echar-p (car echars)) (vl-z-digit-echar-p (car echars)))) (vl-read-unsigned-number echars)) ((mv prefix remainder) (vl-read-while-underscore (cdr echars)))) (mv (cons (car echars) prefix) remainder))))
Theorem:
(defthm prefix-of-vl-read-decimal-value (and (true-listp (mv-nth 0 (vl-read-decimal-value echars))) (implies (force (vl-echarlist-p echars)) (vl-echarlist-p (mv-nth 0 (vl-read-decimal-value echars))))) :rule-classes ((:rewrite) (:type-prescription :corollary (true-listp (mv-nth 0 (vl-read-decimal-value echars))))))
Theorem:
(defthm remainder-of-vl-read-decimal-value (and (equal (true-listp (mv-nth 1 (vl-read-decimal-value echars))) (true-listp echars)) (implies (force (vl-echarlist-p echars)) (vl-echarlist-p (mv-nth 1 (vl-read-decimal-value echars))))) :rule-classes ((:rewrite) (:type-prescription :corollary (implies (true-listp echars) (true-listp (mv-nth 1 (vl-read-decimal-value echars)))))))
Theorem:
(defthm append-of-vl-read-decimal-value (equal (append (mv-nth 0 (vl-read-decimal-value echars)) (mv-nth 1 (vl-read-decimal-value echars))) echars))
Theorem:
(defthm no-change-loser-of-vl-read-decimal-value (implies (not (mv-nth 0 (vl-read-decimal-value echars))) (equal (mv-nth 1 (vl-read-decimal-value echars)) echars)))
Theorem:
(defthm acl2-count-of-vl-read-decimal-value-weak (<= (acl2-count (mv-nth 1 (vl-read-decimal-value echars))) (acl2-count echars)) :rule-classes ((:rewrite) (:linear)))
Theorem:
(defthm acl2-count-of-vl-read-decimal-value-strong (implies (mv-nth 0 (vl-read-decimal-value echars)) (< (acl2-count (mv-nth 1 (vl-read-decimal-value echars))) (acl2-count echars))) :rule-classes ((:rewrite) (:linear)))