(vl-udpline-match-expr inexprs entries warnings) → (mv okp warnings match-expr)
Function:
(defun vl-udpline-match-expr (inexprs entries warnings) (declare (xargs :guard (and (vl-exprlist-p inexprs) (vl-udpentrylist-p entries) (vl-warninglist-p warnings)))) (declare (xargs :guard (and (consp inexprs) (same-lengthp inexprs entries)))) (let ((__function__ 'vl-udpline-match-expr)) (declare (ignorable __function__)) (b* ((in1 (vl-expr-fix (car inexprs))) (entry1 (vl-udpentry-fix (car entries))) ((when (mbe :logic (vl-udpedge-p entry1) :exec (consp entry1))) (mv nil (fatal :type :vl-bad-udp-entry :msg "Expected no edges in combinational UDP lines, but found ~a0." :args (list entry1)) |*sized-1'bx*|)) ((unless (or (eq entry1 :vl-udp-0) (eq entry1 :vl-udp-1) (eq entry1 :vl-udp-?) (eq entry1 :vl-udp-b))) (mv nil (fatal :type :vl-bad-udp-entry :msg "UDP levels other than 0/1/?/b are not supported, but found ~a0." :args (list entry1)) |*sized-1'bx*|)) (match-expr1 (case entry1 (:vl-udp-1 in1) (:vl-udp-0 (make-vl-unary :op :vl-unary-bitnot :arg in1)) (:vl-udp-? |*sized-1'b1*|) (:vl-udp-b (make-vl-binary :op :vl-binary-bitor :left in1 :right (make-vl-unary :op :vl-unary-bitnot :arg in1))))) ((when (atom (cdr inexprs))) (mv t (ok) match-expr1)) ((mv okp warnings rest-expr) (vl-udpline-match-expr (cdr inexprs) (cdr entries) warnings)) ((unless okp) (mv nil warnings rest-expr))) (mv t warnings (make-vl-binary :op :vl-binary-bitand :left match-expr1 :right rest-expr)))))
Theorem:
(defthm booleanp-of-vl-udpline-match-expr.okp (b* (((mv ?okp ?warnings ?match-expr) (vl-udpline-match-expr inexprs entries warnings))) (booleanp okp)) :rule-classes :type-prescription)
Theorem:
(defthm vl-warninglist-p-of-vl-udpline-match-expr.warnings (b* (((mv ?okp ?warnings ?match-expr) (vl-udpline-match-expr inexprs entries warnings))) (vl-warninglist-p warnings)) :rule-classes :rewrite)
Theorem:
(defthm vl-expr-p-of-vl-udpline-match-expr.match-expr (b* (((mv ?okp ?warnings ?match-expr) (vl-udpline-match-expr inexprs entries warnings))) (vl-expr-p match-expr)) :rule-classes :rewrite)