• 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
            • Printer
            • Output-files
              • Output-files-implementation
                • Output-files-process-inputs
                • Output-files-process-const/arg
                • Output-files-process-printer-options
                • Output-files-gen-files
                • Output-files-fn
                • Output-files-process-path
                  • Output-files-process-inputs-and-gen-files
                  • *output-files-printer-options*
                  • *output-files-allowed-options*
                  • Output-files-definition
                • Output-files-prog
              • 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
    • Output-files-implementation

    Output-files-process-path

    Process the :path input.

    Signature
    (output-files-process-path options) → (mv erp path)
    Arguments
    options — Guard (symbol-alistp options).
    Returns
    path — Type (stringp path).

    Definitions and Theorems

    Function: output-files-process-path

    (defun output-files-process-path (options)
     (declare (xargs :guard (symbol-alistp options)))
     (let ((__function__ 'output-files-process-path))
      (declare (ignorable __function__))
      (b*
       (((reterr) "")
        (path-option (assoc-eq :path options))
        (path (if path-option (cdr path-option) "."))
        ((unless (stringp path))
         (reterr
          (msg
           "The :PATH input must be a string, ~
                          but it is ~x0 instead."
           path)))
        (path-chars (acl2::explode path))
        ((unless (consp path-chars))
         (reterr
          (msg
           "The :PATH input must be not empty, ~
                          but it is the empty string instead.")))
        (path-chars (if (and (consp (cdr path-chars))
                             (eql (car (last path-chars)) #\/))
                        (butlast path-chars 1)
                      path-chars))
        (path (acl2::implode path-chars)))
       (retok path))))

    Theorem: stringp-of-output-files-process-path.path

    (defthm stringp-of-output-files-process-path.path
      (b* (((mv acl2::?erp ?path)
            (output-files-process-path options)))
        (stringp path))
      :rule-classes :rewrite)