(vl-stmt-atomicstmts x) returns a flat list of all atomic
statements in the statement
(vl-stmt-atomicstmts x) → stmts
This is sometimes useful to avoid needing to write a mutually recursive function to walk over statements. For instance, if you want to look at all of the assignments anywhere within a statement, you can first grab all of the atomic statements, then filter it down to just the assignments, then process them.
Theorem:
(defthm return-type-of-vl-stmt-atomicstmts.stmts (b* ((?stmts (vl-stmt-atomicstmts x))) (and (vl-stmtlist-p stmts) (vl-atomicstmtlist-p stmts))) :rule-classes :rewrite)
Theorem:
(defthm return-type-of-vl-stmtlist-atomicstmts.stmts (b* ((?stmts (vl-stmtlist-atomicstmts x))) (and (vl-stmtlist-p stmts) (vl-atomicstmtlist-p stmts))) :rule-classes :rewrite)
Theorem:
(defthm vl-stmt-atomicstmts-nrev-removal (equal (vl-stmt-atomicstmts-nrev x nrev) (append nrev (vl-stmt-atomicstmts x))))
Theorem:
(defthm vl-stmtlist-atomicstmts-nrev-removal (equal (vl-stmtlist-atomicstmts-nrev x nrev) (append nrev (vl-stmtlist-atomicstmts x))))
Theorem:
(defthm vl-stmt-atomicstmts-of-vl-stmt-fix-x (equal (vl-stmt-atomicstmts (vl-stmt-fix x)) (vl-stmt-atomicstmts x)))
Theorem:
(defthm vl-stmtlist-atomicstmts-of-vl-stmtlist-fix-x (equal (vl-stmtlist-atomicstmts (vl-stmtlist-fix x)) (vl-stmtlist-atomicstmts x)))
Theorem:
(defthm vl-stmt-atomicstmts-vl-stmt-equiv-congruence-on-x (implies (vl-stmt-equiv x x-equiv) (equal (vl-stmt-atomicstmts x) (vl-stmt-atomicstmts x-equiv))) :rule-classes :congruence)
Theorem:
(defthm vl-stmtlist-atomicstmts-vl-stmtlist-equiv-congruence-on-x (implies (vl-stmtlist-equiv x x-equiv) (equal (vl-stmtlist-atomicstmts x) (vl-stmtlist-atomicstmts x-equiv))) :rule-classes :congruence)