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