Match
(vl-match-latchbody-form1 x) → (mv test lhs rhs delay)
Function:
(defun vl-match-latchbody-form1 (x) (declare (xargs :guard (vl-stmt-p x))) (let ((__function__ 'vl-match-latchbody-form1)) (declare (ignorable __function__)) (b* (((unless (vl-assignstmt-p x)) (mv nil nil nil nil)) ((vl-assignstmt x) x) ((unless (or (eq x.type :vl-blocking) (eq x.type :vl-nonblocking))) (mv nil nil nil nil)) ((unless (and (not (vl-fast-atom-p x.expr)) (eq (vl-nonatom->op x.expr) :vl-qmark))) (mv nil nil nil nil)) ((list test rhs lhs-copy?) (vl-nonatom->args x.expr)) ((unless (equal x.lvalue lhs-copy?)) (mv nil nil nil nil)) ((unless (or (not x.ctrl) (and (mbe :logic (vl-delaycontrol-p x.ctrl) :exec (eq (tag x.ctrl) :vl-delaycontrol)) (vl-simpledelaycontrol-p x.ctrl)))) (mv nil nil nil nil)) (ticks (and x.ctrl (vl-simpledelaycontrol->ticks x.ctrl)))) (mv test x.lvalue rhs ticks))))
Theorem:
(defthm return-type-of-vl-match-latchbody-form1.test (implies (and (force (vl-stmt-p x))) (b* (((mv ?test ?lhs ?rhs ?delay) (vl-match-latchbody-form1 x))) (equal (vl-expr-p test) (if test t nil)))) :rule-classes :rewrite)
Theorem:
(defthm return-type-of-vl-match-latchbody-form1.lhs (implies (and (force (vl-stmt-p x))) (b* (((mv ?test ?lhs ?rhs ?delay) (vl-match-latchbody-form1 x))) (and (equal (vl-expr-p lhs) (if test t nil)) (iff lhs test)))) :rule-classes :rewrite)
Theorem:
(defthm return-type-of-vl-match-latchbody-form1.rhs (implies (and (force (vl-stmt-p x))) (b* (((mv ?test ?lhs ?rhs ?delay) (vl-match-latchbody-form1 x))) (and (equal (vl-expr-p rhs) (if test t nil)) (iff rhs test)))) :rule-classes :rewrite)
Theorem:
(defthm maybe-natp-of-vl-match-latchbody-form1.ticks (maybe-natp (mv-nth 3 (vl-match-latchbody-form1 x))) :rule-classes :type-prescription)