A ruleset containing all the events supposed to be mostly globally disabled in our books
The macro
Use the following form to see the events in this ruleset:
(show-globally-disabled-events-ruleset)
The idea behind having a
If you need to enable some events in
Use the following form to see the current status (enabled or
disabled) of the events in the
(show-globally-disabled-events-status)
Function:
(defun globally-disable-fn (events) (declare (xargs :guard t)) (let ((__function__ 'globally-disable-fn)) (declare (ignorable __function__)) (b* ((events (if (true-listp events) (cons 'quote (cons events 'nil)) events))) (cons 'progn (cons (cons 'add-to-ruleset (cons 'globally-disabled-events (cons events 'nil))) '((in-theory (disable* globally-disabled-events))))))))
Function:
(defun show-globally-disabled-events-fn (state) (declare (xargs :stobjs (state))) (declare (xargs :guard t)) (let ((__function__ 'show-globally-disabled-events-fn)) (declare (ignorable __function__)) (let ((world (w state))) (ruleset-theory 'globally-disabled-events))))
Function:
(defun disabledp-lst (lst count state) (declare (xargs :stobjs (state))) (if (endp lst) (mv (cw "~%~%Number of events in GLOBALLY-DISABLED-EVENTS: ~x0~%~%" count) :invisible state) (b* ((- (cw "~%-- ~x0 ~%~t1 ~x2~%" (car lst) 1 (or (disabledp (car lst)) :enabled)))) (disabledp-lst (cdr lst) (1+ count) state))))