Generate a SOFT
(evmac-generate-soft-defun-sk2 name &key (formals ':absent) (guard 't) (body ':absent) (verify-guards ':absent) (enable ':absent) (guard-hints 'nil) (rewrite ':default)) → (mv loc-event event)
Function:
(defun evmac-generate-soft-defun-sk2-fn (name formals guard body verify-guards enable guard-hints rewrite) (declare (xargs :guard (and (symbolp name) (symbol-listp formals) (booleanp verify-guards) (booleanp enable) (true-listp guard-hints)))) (let ((__function__ 'evmac-generate-soft-defun-sk2)) (declare (ignorable __function__)) (b* (((when (eq formals :absent)) (raise "Internal error: :FORMALS not supplied.") (mv '(irrelevant) '(irrelevant))) ((when (eq body :absent)) (raise "Internal error: :BODY not supplied.") (mv '(irrelevant) '(irrelevant))) ((when (eq verify-guards :absent)) (raise "Internal error: :VERIFY-GUARDS not supplied.") (mv '(irrelevant) '(irrelevant))) ((when (eq enable :absent)) (raise "Internal error: :ENABLE not supplied.") (mv '(irrelevant) '(irrelevant))) (macro (if enable 'soft::defun-sk2 'soft::defund-sk2)) (guard-decl (list :guard guard)) (verify-guards-decl (list :verify-guards verify-guards)) (guard-hints-decl (and guard-hints (list :guard-hints guard-hints))) (loc-event (cons 'local (cons (cons macro (cons name (cons formals (cons (cons 'declare (cons (cons 'xargs (append guard-decl (append verify-guards-decl guard-hints-decl))) 'nil)) (cons body (cons ':rewrite (cons rewrite 'nil))))))) 'nil))) (event (cons macro (cons name (cons formals (cons (cons 'declare (cons (cons 'xargs (append guard-decl verify-guards-decl)) 'nil)) (cons body (cons ':rewrite (cons rewrite 'nil))))))))) (mv loc-event event))))
Theorem:
(defthm pseudo-event-formp-of-evmac-generate-soft-defun-sk2.loc-event (b* (((mv ?loc-event ?event) (evmac-generate-soft-defun-sk2-fn name formals guard body verify-guards enable guard-hints rewrite))) (pseudo-event-formp loc-event)) :rule-classes :rewrite)
Theorem:
(defthm pseudo-event-formp-of-evmac-generate-soft-defun-sk2.event (b* (((mv ?loc-event ?event) (evmac-generate-soft-defun-sk2-fn name formals guard body verify-guards enable guard-hints rewrite))) (pseudo-event-formp event)) :rule-classes :rewrite)