(qualify-ident filepath valid-table ident) → qualified-ident
Function:
(defun qualify-ident (filepath valid-table ident) (declare (xargs :guard (and (filepathp filepath) (c$::valid-tablep valid-table) (identp ident)))) (let ((__function__ 'qualify-ident)) (declare (ignorable __function__)) (b* ((info? (valid-table-global-lookup ident valid-table)) (is-internal (and info? (c$::valid-ord-info-case info? :objfun (equal (c$::valid-ord-info-objfun->linkage info?) (c$::linkage-internal)) :otherwise nil)))) (if is-internal (internal-ident filepath ident) (external-ident ident)))))
Theorem:
(defthm qualified-identp-of-qualify-ident (b* ((qualified-ident (qualify-ident filepath valid-table ident))) (qualified-identp qualified-ident)) :rule-classes :rewrite)