• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • 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
            • Parse-expressions
            • Parse-udps
            • Parse-statements
            • Parse-property
            • Vl-genelements
            • Parse-paramdecls
            • Parse-blockitems
            • Parse-utils
              • Defparser
              • Vl-endinfo-p
              • Vl-match-token
              • Vl-match-some-token
              • Vl-match-any-except
              • Vl-parse-error
              • Vl-match
              • Vl-type-of-matched-token
              • Vl-tokstream-backup-p
              • Vl-maybe-match-token
              • Vl-parse-warning
              • Vl-match-any
              • Vl-linestart-indent
              • Vl-current-loc
              • Vl-choose-parse-error
              • Vl-parse-endblock-name
              • Vl-tokenlist-fix
                • Vl-lookahead-is-some-token?
                • Vl-tokstream-fix
                • Vl-is-token?
                • Vl-is-some-token?
                • Vl-add-context-to-parser-warning
                • Vl-lookahead-is-token?
                • Vl-tokstream-save
                • Vl-tokstream->tokens
                • Vl-tokstream-restore
                • Vl-tokstream-add-warning
                • Vl-tokstream->pstate
                • Vl-tokstream->position
                • Expand-defparsers
                • Vl-tokstream-pop
                • *vl-default-token*
              • Parse-insts
              • Parse-functions
              • Parse-assignments
              • Parse-clocking
              • Parse-strengths
              • Vl-parse-genvar-declaration
              • Vl-parse
              • Parse-netdecls
              • Parse-asserts
              • Vl-maybe-parse-lifetime
              • Parse-dpi-import-export
              • Parse-ports
              • Parse-timeunits
              • Seq
              • Parse-packages
              • Parse-eventctrl
            • Vl-load-merge-descriptions
            • Vl-find-basename/extension
            • Vl-load-file
            • Vl-loadresult
            • Scope-of-defines
            • Vl-find-file
            • 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
    • Parse-utils

    Vl-tokenlist-fix

    Signature
    (vl-tokenlist-fix x) → *
    Arguments
    x — Guard (vl-tokenlist-p x).

    Definitions and Theorems

    Function: vl-tokenlist-fix$inline

    (defun vl-tokenlist-fix$inline (x)
      (declare (xargs :guard (vl-tokenlist-p x)))
      (let ((__function__ 'vl-tokenlist-fix))
        (declare (ignorable __function__))
        (mbe :logic
             (if (atom x)
                 x
               (cons (if (vl-token-p (car x))
                         (car x)
                       *vl-default-token*)
                     (vl-tokenlist-fix (cdr x))))
             :exec x)))

    Theorem: vl-tokenlist-p-of-vl-tokenlist-fix

    (defthm vl-tokenlist-p-of-vl-tokenlist-fix
      (vl-tokenlist-p (vl-tokenlist-fix x)))

    Theorem: vl-tokenlist-fix-when-vl-tokenlist-p

    (defthm vl-tokenlist-fix-when-vl-tokenlist-p
      (implies (vl-tokenlist-p x)
               (equal (vl-tokenlist-fix x) x)))

    Theorem: len-of-vl-tokenlist-fix

    (defthm len-of-vl-tokenlist-fix
      (equal (len (vl-tokenlist-fix x))
             (len x)))

    Theorem: consp-of-vl-tokenlist-fix

    (defthm consp-of-vl-tokenlist-fix
      (equal (consp (vl-tokenlist-fix x))
             (consp x)))

    Theorem: cdr-of-vl-tokenlist-fix

    (defthm cdr-of-vl-tokenlist-fix
      (equal (cdr (vl-tokenlist-fix (cons a x)))
             (vl-tokenlist-fix x)))

    Theorem: len-of-cdr-of-vl-tokenlist-fix

    (defthm len-of-cdr-of-vl-tokenlist-fix
      (equal (len (cdr (vl-tokenlist-fix x)))
             (len (cdr x))))