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