(json-to-comp-db-get-file entry) → (mv erp file)
Function:
(defun json-to-comp-db-get-file (entry) (declare (xargs :guard (json::valuep entry))) (declare (xargs :guard (eq (json::value-kind entry) :object))) (b* (((reterr) "") (entry (json::value-fix entry)) (values (json::object-member-values "file" entry)) ((when (endp values)) (retmsg$ "JSON compilation entry has no \"file\" member. ~ Compilation entry: ~x0" entry)) ((unless (endp (rest values))) (retmsg$ "JSON compilation entry has multiple \"file\" members. ~ Compilation entry: ~x0" entry)) (value (first values))) (json::value-case value :string (retok value.get) :otherwise (retmsg$ "Expected string type in member field \"file\" of ~ JSON compilation database entry. Found ~x0 instead." (json::value-kind value)))))
Theorem:
(defthm stringp-of-json-to-comp-db-get-file.file (b* (((mv acl2::?erp ?file) (json-to-comp-db-get-file entry))) (stringp file)) :rule-classes :rewrite)
Theorem:
(defthm json-to-comp-db-get-file-of-value-fix-entry (equal (json-to-comp-db-get-file (json::value-fix entry)) (json-to-comp-db-get-file entry)))
Theorem:
(defthm json-to-comp-db-get-file-value-equiv-congruence-on-entry (implies (json::value-equiv entry entry-equiv) (equal (json-to-comp-db-get-file entry) (json-to-comp-db-get-file entry-equiv))) :rule-classes :congruence)