• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • 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
              • Vl-lex-token1
              • Vl-lex-plain-alist
              • Vl-lex-plain
              • Vl-lex-token
                • Vl-lex-token-token/remainder-thms
              • Vl-lex-main
              • Vl-lex-main-exec
            • Defchar
            • Tokens
            • Lex-keywords
            • Lexstate
            • Make-test-tokens
            • Lexer-utils
            • 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-lex

Vl-lex-token

Signature
(vl-lex-token echars st warnings) 
  → 
(mv token/nil remainder warnings)
Arguments
echars — Guard (vl-echarlist-p echars).
st — Guard (vl-lexstate-p st).
warnings — Guard (vl-warninglist-p warnings).
Returns
warnings — Type (vl-warninglist-p warnings).

Definitions and Theorems

Function: vl-lex-token$inline

(defun vl-lex-token$inline (echars st warnings)
  (declare (xargs :guard (and (vl-echarlist-p echars)
                              (vl-lexstate-p st)
                              (vl-warninglist-p warnings))))
  (let ((__function__ 'vl-lex-token))
    (declare (ignorable __function__))
    (b* (((when (atom echars))
          (mv nil echars (ok)))
         (echar1 (car echars))
         (char1 (vl-echar->char echar1)))
      (vl-lex-token1 char1 echars st warnings))))

Theorem: vl-warninglist-p-of-vl-lex-token.warnings

(defthm vl-warninglist-p-of-vl-lex-token.warnings
  (b* (((mv ?token/nil ?remainder ?warnings)
        (vl-lex-token$inline echars st warnings)))
    (vl-warninglist-p warnings))
  :rule-classes :rewrite)

Theorem: vl-token-p-of-vl-lex-token

(defthm vl-token-p-of-vl-lex-token
 (implies
    (and (force (vl-echarlist-p echars))
         (vl-lexstate-p st))
    (equal (vl-token-p (mv-nth 0 (vl-lex-token echars st warnings)))
           (if (mv-nth 0 (vl-lex-token echars st warnings))
               t
             nil))))

Theorem: true-listp-of-vl-lex-token

(defthm true-listp-of-vl-lex-token
 (equal (true-listp (mv-nth 1 (vl-lex-token echars st warnings)))
        (true-listp echars))
 :rule-classes
 ((:rewrite)
  (:type-prescription
    :corollary
    (implies
         (true-listp echars)
         (true-listp (mv-nth 1
                             (vl-lex-token echars st warnings)))))))

Theorem: vl-echarlist-p-of-vl-lex-token

(defthm vl-echarlist-p-of-vl-lex-token
 (implies
  (force (vl-echarlist-p echars))
  (equal
       (vl-echarlist-p (mv-nth 1 (vl-lex-token echars st warnings)))
       t)))

Theorem: append-of-vl-lex-token

(defthm append-of-vl-lex-token
 (implies
  (and (mv-nth 0 (vl-lex-token echars st warnings))
       (force (vl-echarlist-p echars))
       (vl-lexstate-p st))
  (equal
   (append
      (vl-token->etext (mv-nth 0 (vl-lex-token echars st warnings)))
      (mv-nth 1 (vl-lex-token echars st warnings)))
   echars)))

Theorem: no-change-loser-of-vl-lex-token

(defthm no-change-loser-of-vl-lex-token
  (implies (not (mv-nth 0 (vl-lex-token echars st warnings)))
           (equal (mv-nth 1 (vl-lex-token echars st warnings))
                  echars)))

Theorem: acl2-count-of-vl-lex-token-weak

(defthm acl2-count-of-vl-lex-token-weak
  (<= (acl2-count (mv-nth 1 (vl-lex-token echars st warnings)))
      (acl2-count echars))
  :rule-classes ((:rewrite) (:linear)))

Theorem: acl2-count-of-vl-lex-token-strong

(defthm acl2-count-of-vl-lex-token-strong
  (implies
       (and (mv-nth 0 (vl-lex-token echars st warnings))
            t)
       (< (acl2-count (mv-nth 1 (vl-lex-token echars st warnings)))
          (acl2-count echars)))
  :rule-classes ((:rewrite) (:linear)))

Subtopics

Vl-lex-token-token/remainder-thms
Token and remainder theorems for vl-lex-token, automatically generated by def-token/remainder-thms.