• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
        • Warnings
        • Primitives
        • Use-set
        • Syntax
        • Getting-started
        • Utilities
        • Loader
          • Preprocessor
          • Vl-loadconfig
          • Lexer
            • Lex-strings
            • Lex-identifiers
            • Vl-typo-uppercase-p
            • Vl-typo-number-p
            • Vl-typo-lowercase-p
            • Lex-numbers
            • Chartypes
            • Vl-lex
            • Defchar
            • Tokens
            • Lex-keywords
            • Lexstate
            • Make-test-tokens
            • Lexer-utils
              • Def-prefix/remainder-thms
              • Def-token/remainder-thms
              • Vl-read-until-literal
              • Vl-read-through-literal
              • Vl-matches-string-p
                • Vl-matches-string-p-impl
                • Vl-read-literal
                • Vl-echarlist-kill-underscores
                • Vl-read-some-literal
              • Lex-comments
              • Vl-typo-uppercase-list-p
              • Vl-typo-lowercase-list-p
              • Vl-typo-number-list-p
            • 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-matches-string-p

    Vl-matches-string-p-impl

    Signature
    (vl-matches-string-p-impl string i len echars) → *
    Arguments
    len — Guard (equal len (length string)).
    echars — Guard (vl-echarlist-p echars).

    Definitions and Theorems

    Function: vl-matches-string-p-impl

    (defun vl-matches-string-p-impl (string i len echars)
     (declare (type string string)
              (type unsigned-byte i))
     (declare (xargs :guard (and (vl-echarlist-p echars)
                                 (equal len (length string)))))
     (let ((__function__ 'vl-matches-string-p-impl))
      (declare (ignorable __function__))
      (mbe
         :logic (or (>= (nfix i) (nfix len))
                    (and (consp echars)
                         (eql (char string i)
                              (vl-echar->char (car echars)))
                         (vl-matches-string-p-impl string (+ (nfix i) 1)
                                                   len (cdr echars))))
         :exec (or (>= i len)
                   (and (consp echars)
                        (eql (char string i)
                             (the character
                                  (vl-echar->char (car echars))))
                        (vl-matches-string-p-impl string (+ i 1)
                                                  len (cdr echars)))))))