Generate a SOFT
(evmac-generate-soft-defun2 name &key (formals ':absent) (guard 't) (body ':absent) (verify-guards ':absent) (enable ':absent) (guard-hints 'nil) (measure 'nil) (hints 'nil)) → (mv loc-event event)
Function:
(defun evmac-generate-soft-defun2-fn (name formals guard body verify-guards enable guard-hints measure hints) (declare (xargs :guard (and (symbolp name) (symbol-listp formals) (booleanp verify-guards) (booleanp enable) (true-listp guard-hints) (true-listp hints)))) (let ((__function__ 'evmac-generate-soft-defun2)) (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::defun2 'soft::defund2)) (measure-decl (and measure (list :measure measure))) (hints-decl (and measure hints (list :hints hints))) (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 measure-decl (append hints-decl (append guard-decl (append verify-guards-decl guard-hints-decl))))) 'nil)) (cons body 'nil))))) 'nil))) (event (cons macro (cons name (cons formals (cons (cons 'declare (cons (cons 'xargs (append measure-decl (append guard-decl verify-guards-decl))) 'nil)) (cons body 'nil))))))) (mv loc-event event))))
Theorem:
(defthm pseudo-event-formp-of-evmac-generate-soft-defun2.loc-event (b* (((mv ?loc-event ?event) (evmac-generate-soft-defun2-fn name formals guard body verify-guards enable guard-hints measure hints))) (pseudo-event-formp loc-event)) :rule-classes :rewrite)
Theorem:
(defthm pseudo-event-formp-of-evmac-generate-soft-defun2.event (b* (((mv ?loc-event ?event) (evmac-generate-soft-defun2-fn name formals guard body verify-guards enable guard-hints measure hints))) (pseudo-event-formp event)) :rule-classes :rewrite)