• 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
            • 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
              • Vl-lexstate-p
              • Vl-plaintoken-alistp
                • *vl-2012-strict-lexstate*
                • Vl-lexstate->plainalist
                • Vl-lexstate-init
                • *vl-2005-strict-lexstate*
                • *vl-2012-lexstate*
                • *vl-2005-lexstate*
              • Make-test-tokens
              • Lexer-utils
              • Lex-comments
              • Vl-typo-uppercase-list-p
              • Vl-typo-lowercase-list-p
              • Vl-typo-number-list-p
            • Parser
            • 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
    • Lexstate

    Vl-plaintoken-alistp

    Recognize alists binding strings to plaintoken types.

    Signature
    (vl-plaintoken-alistp x) → *

    We use these for configurable operator handling, based on the particular standard we're implementing.

    Definitions and Theorems

    Function: vl-plaintoken-alistp

    (defun vl-plaintoken-alistp (x)
      (declare (xargs :guard t))
      (let ((__function__ 'vl-plaintoken-alistp))
        (declare (ignorable __function__))
        (if (atom x)
            t
          (and (consp (car x))
               (stringp (caar x))
               (not (equal (caar x) ""))
               (vl-plaintokentype-p (cdar x))
               (vl-plaintoken-alistp (cdr x))))))

    Theorem: vl-plaintoken-alistp-when-atom

    (defthm vl-plaintoken-alistp-when-atom
      (implies (atom x)
               (equal (vl-plaintoken-alistp x) t)))

    Theorem: vl-plaintoken-alistp-of-cons

    (defthm vl-plaintoken-alistp-of-cons
      (equal (vl-plaintoken-alistp (cons a x))
             (and (consp a)
                  (stringp (car a))
                  (not (equal (car a) ""))
                  (vl-plaintokentype-p (cdr a))
                  (vl-plaintoken-alistp x))))

    Theorem: vl-plaintoken-alistp-of-append

    (defthm vl-plaintoken-alistp-of-append
      (equal (vl-plaintoken-alistp (append x y))
             (and (vl-plaintoken-alistp x)
                  (vl-plaintoken-alistp y))))

    Theorem: vl-plaintokentype-p-of-hons-assoc-equal-when-vl-plaintoken-alistp

    (defthm
      vl-plaintokentype-p-of-hons-assoc-equal-when-vl-plaintoken-alistp
      (implies
           (vl-plaintoken-alistp x)
           (equal (vl-plaintokentype-p (cdr (hons-assoc-equal key x)))
                  (if (hons-assoc-equal key x) t nil))))