Unoptimized guard of a named function or of a lambda expression.
(uguard fn wrld) → guard
- fn — Guard (pseudo-termfnp fn).
- wrld — Guard (plist-worldp wrld).
- guard — A pseudo-termp.
This is a specialization of guard with nil as the second argument.
Since guard is in program mode only because of
the code that handles the case in which
the second argument is non-nil,
we avoid calling guard and instead replicate
the code that handles the case in which the second argument is nil;
thus, this utility is in logic mode and guard-verified.
See uguard+ for an enhanced variant of this utility.
Definitions and Theorems
(defun uguard (fn wrld)
(declare (xargs :guard (and (pseudo-termfnp fn)
(let ((__function__ 'uguard))
(declare (ignorable __function__))
(cond ((symbolp fn)
(getpropc fn 'guard *t* wrld))