Handler for
(vl-process-else loc istack activep) → (mv successp new-istack new-activep)
Function:
(defun vl-process-else (loc istack activep) (declare (xargs :guard (and (vl-location-p loc) (vl-istack-p istack) (booleanp activep)))) (let ((__function__ 'vl-process-else)) (declare (ignorable __function__)) (b* (((when (atom istack)) (mv (cw "Preprocessor error (~s0): found an `else, but no ~ ifdef/ifndef is open.~%" (vl-location-string loc)) istack activep)) ((when (vl-iframe->already-saw-elsep (car istack))) (mv (cw "Preprocessor error (~s0): found an `else, but we have ~ already seen an `else.~%" (vl-location-string loc)) istack activep)) (iframe (car istack)) (prev-satisfiedp (vl-iframe->some-thing-satisfiedp iframe)) (initially-activep (vl-iframe->initially-activep iframe)) (new-activep (and initially-activep (not prev-satisfiedp))) (new-iframe (make-vl-iframe :initially-activep initially-activep :some-thing-satisfiedp t :already-saw-elsep t)) (new-istack (cons new-iframe (cdr istack)))) (mv t new-istack new-activep))))
Theorem:
(defthm booleanp-of-vl-process-else.successp (b* (((mv ?successp ?new-istack ?new-activep) (vl-process-else loc istack activep))) (booleanp successp)) :rule-classes :type-prescription)
Theorem:
(defthm vl-istack-p-of-vl-process-else.new-istack (implies (force (vl-istack-p istack)) (b* (((mv ?successp ?new-istack ?new-activep) (vl-process-else loc istack activep))) (vl-istack-p new-istack))) :rule-classes :rewrite)
Theorem:
(defthm booleanp-of-vl-process-else.new-activep (implies (booleanp activep) (b* (((mv ?successp ?new-istack ?new-activep) (vl-process-else loc istack activep))) (booleanp new-activep))) :rule-classes :type-prescription)