• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
      • Fgl
      • Vwsim
      • Vl
        • Syntax
        • Loader
          • Preprocessor
          • Vl-loadconfig
          • Vl-loadstate
          • Lexer
          • Parser
          • Vl-load-merge-descriptions
          • Vl-find-basename/extension
          • Vl-load-file
          • Vl-loadresult
          • Scope-of-defines
          • Vl-find-file
            • Vl-slow-find-file-aux
            • Vl-cache-find-file-aux
            • Vl-extend-pathname
              • Vl-file-exists-p
              • Vl-ends-with-directory-separatorp
              • Vl-dirlist-cache
              • Vl-dircache
            • Vl-flush-out-descriptions
            • Vl-description
            • Vl-read-file
            • Vl-includeskips-report-gather
            • Vl-load-main
            • Extended-characters
            • Vl-load
            • Vl-load-description
            • Vl-descriptions-left-to-load
            • Inject-warnings
            • Vl-preprocess-debug
            • Vl-write-preprocessor-debug-file
            • Vl-read-file-report-gather
            • Vl-load-descriptions
            • Vl-load-files
            • Translate-off
            • Vl-load-read-file-hook
            • Vl-read-file-report
            • Vl-loadstate-pad
            • Vl-load-summary
            • Vl-collect-modules-from-descriptions
            • Vl-loadstate->warnings
            • Vl-iskips-report
            • Vl-descriptionlist
          • Warnings
          • Getting-started
          • Utilities
          • Printer
          • Kit
          • Mlib
          • Transforms
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Vl-find-file

    Vl-extend-pathname

    (vl-extend-pathname dir filename) concatenates dir and filename, adding a slash to between them only if dir does not end with a slash.

    Signature
    (vl-extend-pathname dir filename) → dir/filename
    Arguments
    dir — Guard (stringp dir).
    filename — Guard (stringp filename).
    Returns
    dir/filename — Type (stringp dir/filename).

    Definitions and Theorems

    Function: vl-extend-pathname

    (defun vl-extend-pathname (dir filename)
      (declare (xargs :guard (and (stringp dir) (stringp filename))))
      (let ((__function__ 'vl-extend-pathname))
        (declare (ignorable __function__))
        (cat dir
             (if (vl-ends-with-directory-separatorp dir)
                 ""
               (implode (list acl2::*directory-separator*)))
             filename)))

    Theorem: stringp-of-vl-extend-pathname

    (defthm stringp-of-vl-extend-pathname
      (b* ((dir/filename (vl-extend-pathname dir filename)))
        (stringp dir/filename))
      :rule-classes :type-prescription)

    Theorem: vl-extend-pathname-of-str-fix-dir

    (defthm vl-extend-pathname-of-str-fix-dir
      (equal (vl-extend-pathname (str-fix dir)
                                 filename)
             (vl-extend-pathname dir filename)))

    Theorem: vl-extend-pathname-streqv-congruence-on-dir

    (defthm vl-extend-pathname-streqv-congruence-on-dir
      (implies (streqv dir dir-equiv)
               (equal (vl-extend-pathname dir filename)
                      (vl-extend-pathname dir-equiv filename)))
      :rule-classes :congruence)

    Theorem: vl-extend-pathname-of-str-fix-filename

    (defthm vl-extend-pathname-of-str-fix-filename
      (equal (vl-extend-pathname dir (str-fix filename))
             (vl-extend-pathname dir filename)))

    Theorem: vl-extend-pathname-streqv-congruence-on-filename

    (defthm vl-extend-pathname-streqv-congruence-on-filename
      (implies (streqv filename filename-equiv)
               (equal (vl-extend-pathname dir filename)
                      (vl-extend-pathname dir filename-equiv)))
      :rule-classes :congruence)