• 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
          • Vl-loadstate
          • Parser
            • Parse-expressions
            • Parse-udps
            • Vl-genelements
            • Parse-paramdecls
            • Parse-blockitems
            • Parse-utils
            • Parse-insts
            • Parse-datatype
            • Parse-functions
            • Parse-datatypes
            • Parse-strengths
            • Vl-parse-genvar-declaration
            • Vl-parse
            • Parse-ports
              • Parse-port-types
              • Sv-ansi-portdecls
              • Creating-portdecls/vardecls
              • Sv-non-ansi-portdecls
                • Vl-parse-port-declaration-noatts-2012
                • Vl-parse-port-declaration-noatts
                • Vl-parse-list-of-port-identifiers
                  • Vl-parsed-portdecl-head->complete-p
                • Verilog-2005-ports
                • Sv-ansi-port-interpretation
                • Verilog-2005-portdecls
              • Seq
              • Parse-packages
            • 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
    • Sv-non-ansi-portdecls

    Vl-parse-list-of-port-identifiers

    Approximation of list_of_port_identifiers, list_of_variable_identifiers, and list_of_variable_port_identifiers.

    Signature
    (vl-parse-list-of-port-identifiers &key (tokstream 'tokstream) 
                                       (config 'config)) 
     
      → 
    (mv errmsg? value new-tokstream)
    Arguments
    config — Guard (vl-loadconfig-p config).

    Definitions and Theorems

    Function: vl-parse-list-of-port-identifiers-fn

    (defun vl-parse-list-of-port-identifiers-fn (tokstream config)
      (declare (xargs :stobjs (tokstream)))
      (declare (xargs :guard (vl-loadconfig-p config)))
      (declare (ignorable config))
      (let ((__function__ 'vl-parse-list-of-port-identifiers))
        (declare (ignorable __function__))
        (seq tokstream
             (id := (vl-match-token :vl-idtoken))
             (udims := (vl-parse-0+-variable-dimensions))
             (when (and (vl-is-token? :vl-comma)
                        (vl-lookahead-is-token?
                             :vl-idtoken (cdr (vl-tokstream->tokens))))
                   (:= (vl-match))
                   (rest := (vl-parse-list-of-port-identifiers)))
             (return (cons (make-vl-parsed-port-identifier :name id
                                                           :udims udims)
                           rest)))))

    Theorem: vl-parse-list-of-port-identifiers-fails-gracefully

    (defthm vl-parse-list-of-port-identifiers-fails-gracefully
      (implies (mv-nth 0 (vl-parse-list-of-port-identifiers))
               (not (mv-nth 1
                            (vl-parse-list-of-port-identifiers)))))

    Theorem: vl-warning-p-of-vl-parse-list-of-port-identifiers

    (defthm vl-warning-p-of-vl-parse-list-of-port-identifiers
      (iff (vl-warning-p (mv-nth 0 (vl-parse-list-of-port-identifiers)))
           (mv-nth 0 (vl-parse-list-of-port-identifiers))))

    Theorem: vl-parse-list-of-port-identifiers-result

    (defthm vl-parse-list-of-port-identifiers-result
      (implies (and t)
               (vl-parsed-port-identifier-list-p
                    (mv-nth 1
                            (vl-parse-list-of-port-identifiers)))))

    Theorem: vl-parse-list-of-port-identifiers-true-listp

    (defthm vl-parse-list-of-port-identifiers-true-listp
      (true-listp (mv-nth 1 (vl-parse-list-of-port-identifiers)))
      :rule-classes :type-prescription)

    Theorem: vl-parse-list-of-port-identifiers-count-strong

    (defthm vl-parse-list-of-port-identifiers-count-strong
     (and
      (<=
         (vl-tokstream-measure
              :tokstream (mv-nth 2 (vl-parse-list-of-port-identifiers)))
         (vl-tokstream-measure))
      (implies
       (not (mv-nth 0 (vl-parse-list-of-port-identifiers)))
       (<
         (vl-tokstream-measure
              :tokstream (mv-nth 2 (vl-parse-list-of-port-identifiers)))
         (vl-tokstream-measure))))
     :rule-classes ((:rewrite) (:linear)))