• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Set
        • C
          • Syntax-for-tools
            • Formalized-subset
            • Mapping-to-language-definition
            • Input-files
            • Compilation-database
              • Comp-db-entry
              • Comp-db-arg
              • Json-to-comp-db-entry
              • Json-to-comp-db-entry-list
              • To-preprocess-db
              • To-preprocess-map
              • Comp-db-arguments-absolute-dirs
              • Comp-db-keep-only-preprocessor-args
              • Json-to-comp-db
              • Json-to-comp-db-arguments
              • Comp-db-relativize-keys
              • Json-to-comp-db-get-exec-and-arguments
              • Relativize-path
              • Preprocess-map-from-comp-file
              • Json-to-comp-db-exec-and-arguments
              • Comp-db-arguments-keep-only-preprocessor-args
              • Comp-db-arguments-escape-for-shell
              • Parse-comp-db
              • Json-to-comp-db-get-directory
              • Json-to-comp-db-get-output
                • Json-to-comp-db-get-file
                • Comp-db-drop-shared
                • Comp-db-drop-non-c
                • Comp-db-arg-list-to-string-list
                • Comp-db-absolute-dirs
                • Comp-db-escape-for-shell
                • Json-to-comp-db-try-parse-short-option
                • Preprocess-db-to-map
                • Comp-db-arg-to-string
                • Comp-db
                • Json-to-comp-db-try-parse-equal-arg
                • Defpreprocess-map-fn
                • String-escape-for-shell
                • Comp-db-arg-list
                • Irr-comp-db-arg
                • Show-warnings
                • *cc-options-space-sep*
                • *cc-options-equal-sep*
                • *cc-options-dir*
              • Printer
              • Output-files
              • Abstract-syntax-operations
              • Implementation-environments
              • Abstract-syntax
              • Concrete-syntax
              • Disambiguation
              • Validation
              • Gcc-builtins
              • Preprocessing
              • Parsing
            • Atc
            • Transformation-tools
            • Language
            • Representation
            • Insertion-sort
            • Pack
          • Soft
          • Bv
          • Imp-language
          • Ethereum
          • Event-macros
          • Java
          • Riscv
          • Bitcoin
          • Zcash
          • Yul
          • ACL2-programming-language
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Axe
          • Lists-light
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Compilation-database

    Json-to-comp-db-get-output

    Signature
    (json-to-comp-db-get-output entry) → (mv erp output?)
    Arguments
    entry — Guard (json::valuep entry).
    Returns
    output? — Type (string-optionp output?).

    Definitions and Theorems

    Function: json-to-comp-db-get-output

    (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: string-optionp-of-json-to-comp-db-get-output.output?

    (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: json-to-comp-db-get-output-of-value-fix-entry

    (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: json-to-comp-db-get-output-value-equiv-congruence-on-entry

    (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)