• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
        • Warnings
        • Primitives
        • Use-set
        • Syntax
        • Getting-started
        • Utilities
        • Loader
          • Preprocessor
          • Vl-loadconfig
            • Vl-loadconfig-p
            • Vl-loadconfig-fix
            • Make-vl-loadconfig
            • Vl-loadconfig-clean
              • Vl-clean-search-extensions-aux
              • Vl-clean-search-extension
                • Vl-clean-search-extensions
              • Vl-loadconfig-equiv
              • Change-vl-loadconfig
              • Vl-loadconfig->include-dirs
              • Vl-loadconfig->start-names
              • Vl-loadconfig->start-files
              • Vl-loadconfig->search-path
              • Vl-loadconfig->search-exts
              • Vl-loadconfig->flush-tries
              • Vl-loadconfig->strictp
              • Vl-loadconfig->mintime
              • Vl-loadconfig->filemapp
              • Vl-loadconfig->edition
              • Vl-loadconfig->defines
            • Lexer
            • Vl-loadstate
            • Parser
            • Vl-load-merge-descriptions
            • Scope-of-defines
            • Vl-load-file
            • Vl-flush-out-descriptions
            • Vl-description
            • Vl-loadresult
            • Vl-read-file
            • Vl-find-basename/extension
            • Vl-find-file
            • Vl-read-files
            • Extended-characters
            • Vl-load
            • Vl-load-main
            • Vl-load-description
            • Vl-descriptions-left-to-load
            • Inject-warnings
            • Vl-load-descriptions
            • Vl-load-files
            • Vl-load-summary
            • Vl-collect-modules-from-descriptions
            • Vl-descriptionlist
          • Transforms
          • Lint
          • Mlib
          • Server
          • Kit
          • Printer
          • Esim-vl
          • Well-formedness
        • Sv
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Vl-loadconfig-clean

    Vl-clean-search-extension

    Normalize search extensions so that they don't have leading dots.

    Signature
    (vl-clean-search-extension searchext) → new-searchext
    Arguments
    searchext — Guard (stringp searchext).
    Returns
    new-searchext — Type (stringp new-searchext).

    This is a DWIM feature so that we can just do the right thing regardless of whether you say the search extensions are, e.g., ".sv" or just "sv".

    Definitions and Theorems

    Function: vl-clean-search-extension

    (defun vl-clean-search-extension (searchext)
      (declare (xargs :guard (stringp searchext)))
      (let ((__function__ 'vl-clean-search-extension))
        (declare (ignorable __function__))
        (b* ((searchext (string-fix searchext))
             (len (length searchext))
             ((when (and (< 0 len)
                         (eql (char searchext 0) #\.)))
              (subseq searchext 1 nil)))
          searchext)))

    Theorem: stringp-of-vl-clean-search-extension

    (defthm stringp-of-vl-clean-search-extension
      (b* ((new-searchext (vl-clean-search-extension searchext)))
        (stringp new-searchext))
      :rule-classes :type-prescription)