Convert an vl-location-p into a string.
(vl-location-string loc) → str
(vl-location-string loc) is often useful in generating warning or error messages. It converts a vl-location-p object into a string of the form filename:line:col.
Function:
(defun vl-location-string (loc) (declare (xargs :guard (vl-location-p loc))) (let ((__function__ 'vl-location-string)) (declare (ignorable __function__)) (cat (vl-location->filename loc) ":" (natstr (vl-location->line loc)) ":" (natstr (vl-location->col loc)))))
Theorem:
(defthm stringp-of-vl-location-string (b* ((str (vl-location-string loc))) (stringp str)) :rule-classes :type-prescription)
Theorem:
(defthm vl-location-string-of-vl-location-fix-loc (equal (vl-location-string (vl-location-fix loc)) (vl-location-string loc)))
Theorem:
(defthm vl-location-string-vl-location-equiv-congruence-on-loc (implies (vl-location-equiv loc loc-equiv) (equal (vl-location-string loc) (vl-location-string loc-equiv))) :rule-classes :congruence)