• 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

    Comp-db-arguments-absolute-dirs

    Signature
    (comp-db-arguments-absolute-dirs directory arguments state) 
      → 
    arguments$
    Arguments
    directory — Guard (stringp directory).
    arguments — Guard (comp-db-arg-listp arguments).
    Returns
    arguments$ — Type (comp-db-arg-listp arguments$).

    Definitions and Theorems

    Function: comp-db-arguments-absolute-dirs

    (defun comp-db-arguments-absolute-dirs (directory arguments state)
     (declare (xargs :stobjs (state)))
     (declare (xargs :guard (and (stringp directory)
                                 (comp-db-arg-listp arguments))))
     (b*
      ((directory (acl2::str-fix directory))
       (arguments (comp-db-arg-list-fix arguments))
       ((when (endp arguments)) nil)
       (argument (first arguments))
       ((comp-db-arg argument) argument)
       ((unless (member-equal argument.name *cc-options-dir*))
        (cons
             (comp-db-arg-fix argument)
             (comp-db-arguments-absolute-dirs directory (rest arguments)
                                              state)))
       (value
          (if argument.value
              (ec-call (extend-pathname directory argument.value state))
            argument.value))
       (value (if (stringp value)
                  value
                argument.value)))
      (cons (change-comp-db-arg argument
                                :value value)
            (comp-db-arguments-absolute-dirs directory (rest arguments)
                                             state))))

    Theorem: comp-db-arg-listp-of-comp-db-arguments-absolute-dirs

    (defthm comp-db-arg-listp-of-comp-db-arguments-absolute-dirs
     (b*
      ((arguments$
           (comp-db-arguments-absolute-dirs directory arguments state)))
      (comp-db-arg-listp arguments$))
     :rule-classes :rewrite)

    Theorem: comp-db-arguments-absolute-dirs-of-str-fix-directory

    (defthm comp-db-arguments-absolute-dirs-of-str-fix-directory
      (equal
           (comp-db-arguments-absolute-dirs (acl2::str-fix directory)
                                            arguments state)
           (comp-db-arguments-absolute-dirs directory arguments state)))

    Theorem: comp-db-arguments-absolute-dirs-streqv-congruence-on-directory

    (defthm
         comp-db-arguments-absolute-dirs-streqv-congruence-on-directory
     (implies
      (acl2::streqv directory directory-equiv)
      (equal (comp-db-arguments-absolute-dirs directory arguments state)
             (comp-db-arguments-absolute-dirs
                  directory-equiv arguments state)))
     :rule-classes :congruence)

    Theorem: comp-db-arguments-absolute-dirs-of-comp-db-arg-list-fix-arguments

    (defthm
      comp-db-arguments-absolute-dirs-of-comp-db-arg-list-fix-arguments
     (equal
       (comp-db-arguments-absolute-dirs directory
                                        (comp-db-arg-list-fix arguments)
                                        state)
       (comp-db-arguments-absolute-dirs directory arguments state)))

    Theorem: comp-db-arguments-absolute-dirs-comp-db-arg-list-equiv-congruence-on-arguments

    (defthm
     comp-db-arguments-absolute-dirs-comp-db-arg-list-equiv-congruence-on-arguments
     (implies
      (comp-db-arg-list-equiv arguments arguments-equiv)
      (equal (comp-db-arguments-absolute-dirs directory arguments state)
             (comp-db-arguments-absolute-dirs
                  directory arguments-equiv state)))
     :rule-classes :congruence)