• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • 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
              • Vl-parse-param-or-localparam-declaration-2012
              • Vl-parse-param-or-localparam-declaration-2005
              • Vl-parse-param-assignment
              • Vl-parse-list-of-param-assignments
              • Vl-parse-parameter-port-declaration-2012
              • Vl-parse-param-or-localparam-declaration
              • Vl-parse-module-parameter-port-list-aux-2005
              • Vl-parse-module-parameter-port-list-2012
              • Vl-parse-1+-parameter-port-declarations-2012
              • Vl-parse-module-parameter-port-list-2005
              • Vl-parse-list-of-type-assignments
              • Vl-parse-module-parameter-port-list
              • Vl-parse-0+-param-assignments
                • Vl-parse-type-assignment
                • Vl-maybe-parse-parameter-port-list
                • Vl-update-paramtype-udims
              • Parse-blockitems
              • Parse-utils
              • 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-paramdecls

    Vl-parse-0+-param-assignments

    Signature
    (vl-parse-0+-param-assignments leading-comma-required 
                                   &key (tokstream 'tokstream) 
                                   (config 'config)) 
     
      → 
    (mv errmsg? value new-tokstream)
    Arguments
    config — Guard (vl-loadconfig-p config).

    Definitions and Theorems

    Function: vl-parse-0+-param-assignments-fn

    (defun vl-parse-0+-param-assignments-fn
           (leading-comma-required tokstream config)
     (declare (xargs :stobjs (tokstream)))
     (declare (xargs :guard (vl-loadconfig-p config)))
     (declare (ignorable config))
     (let ((__function__ 'vl-parse-0+-param-assignments))
      (declare (ignorable __function__))
      (b*
       ((backup (vl-tokstream-save))
        ((mv err assigns tokstream)
         (seq
          tokstream
          (when leading-comma-required
                (:= (vl-match-token :vl-comma)))
          (first := (vl-parse-param-assignment
                         nil nil
                         *vl-parse-0+-param-assignments-implicit-type*))
          (unless (vl-is-some-token? '(:vl-comma :vl-rparen))
                  (return-raw (mv t nil tokstream)))
          (rest := (vl-parse-0+-param-assignments t))
          (return (cons first rest))))
        ((unless err)
         (mv err assigns tokstream))
        (tokstream (vl-tokstream-restore backup)))
       (mv nil nil tokstream))))

    Theorem: vl-parse-0+-param-assignments-never-fails

    (defthm vl-parse-0+-param-assignments-never-fails
     (not
       (mv-nth 0
               (vl-parse-0+-param-assignments leading-comma-required))))

    Theorem: vl-parse-0+-param-assignments-result

    (defthm vl-parse-0+-param-assignments-result
     (implies
      (and
       (not
        (mv-nth 0
                (vl-parse-0+-param-assignments leading-comma-required)))
       (and t))
      (vl-paramdecllist-p
         (mv-nth
              1
              (vl-parse-0+-param-assignments leading-comma-required)))))

    Theorem: vl-parse-0+-param-assignments-true-listp

    (defthm vl-parse-0+-param-assignments-true-listp
     (true-listp
        (mv-nth 1
                (vl-parse-0+-param-assignments leading-comma-required)))
     :rule-classes :type-prescription)

    Theorem: vl-parse-0+-param-assignments-count-strong-on-value

    (defthm vl-parse-0+-param-assignments-count-strong-on-value
     (and
      (<=
       (vl-tokstream-measure
        :tokstream
        (mv-nth 2
                (vl-parse-0+-param-assignments leading-comma-required)))
       (vl-tokstream-measure))
      (implies
       (mv-nth 1
               (vl-parse-0+-param-assignments leading-comma-required))
       (<
        (vl-tokstream-measure
           :tokstream
           (mv-nth
                2
                (vl-parse-0+-param-assignments leading-comma-required)))
        (vl-tokstream-measure))))
     :rule-classes ((:rewrite) (:linear)))