Retrieve information about a shallowly embedded C structure.
(defstruct-table-lookup tag wrld) → info?
Function:
(defun defstruct-table-lookup (tag wrld) (declare (xargs :guard (and (stringp tag) (plist-worldp wrld)))) (let ((__function__ 'defstruct-table-lookup)) (declare (ignorable __function__)) (b* ((pair (assoc-equal tag (table-alist+ *defstruct-table* wrld))) ((when (not (consp pair))) nil) (info (cdr pair)) ((unless (defstruct-infop info)) (raise "Internal error: malformed DEFSTRUCT information ~x0." info))) info)))
Theorem:
(defthm defstruct-info-optionp-of-defstruct-table-lookup (b* ((info? (defstruct-table-lookup tag wrld))) (defstruct-info-optionp info?)) :rule-classes :rewrite)