• 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
              • Verilog-2005-ports
              • Sv-ansi-port-interpretation
              • Verilog-2005-portdecls
                • Vl-parse-basic-port-declaration-tail
                • Vl-parse-port-declaration-noatts-2005
                  • Vl-parse-port-declaration-atts-2005
                  • Vl-parse-1+-port-declarations-separated-by-commas-2005
                  • Vl-parse-1+-identifiers-separated-by-commas
                  • Vl-parse-port-declaration-noatts
                  • Vl-parse-module-port-list-top-2005
                  • Vl-parse-output-reg-port-tail
              • 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
    • Verilog-2005-portdecls

    Vl-parse-port-declaration-noatts-2005

    Verilog-2005 Only. Match inout_declaration | input_declaration | output_declaration.

    Signature
    (vl-parse-port-declaration-noatts-2005 atts force-completep 
                                           &key (tokstream 'tokstream) 
                                           (config 'config)) 
     
      → 
    (mv errmsg? value new-tokstream)
    Arguments
    config — Guard (vl-loadconfig-p config).

    Definitions and Theorems

    Function: vl-parse-port-declaration-noatts-2005-fn

    (defun vl-parse-port-declaration-noatts-2005-fn
           (atts force-completep tokstream config)
     (declare (xargs :stobjs (tokstream)))
     (declare (xargs :guard (vl-loadconfig-p config)))
     (declare (ignorable config))
     (declare (xargs :guard (and (vl-atts-p atts)
                                 (booleanp force-completep))))
     (let ((__function__ 'vl-parse-port-declaration-noatts-2005))
      (declare (ignorable __function__))
      (seq
       tokstream
       (when (vl-is-token? :vl-kwd-input)
             (:= (vl-match))
             (ans := (vl-parse-basic-port-declaration-tail
                          :vl-input atts force-completep))
             (return ans))
       (when (vl-is-token? :vl-kwd-inout)
             (:= (vl-match))
             (ans := (vl-parse-basic-port-declaration-tail
                          :vl-inout atts force-completep))
             (return ans))
       (:= (vl-match-token :vl-kwd-output))
       (when (vl-is-token? :vl-kwd-reg)
             (:= (vl-match))
             (ans := (vl-parse-output-reg-port-tail atts))
             (return ans))
       (when
         (vl-is-some-token? '(:vl-kwd-integer :vl-kwd-time))
         (type := (vl-match))
         (ids := (vl-parse-1+-identifiers-separated-by-commas))
         (return
              (vl-make-ports-and-maybe-nets
                   (vl-parsed-port-identifier-list-from-idtokenlist ids)
                   :dir :vl-output
                   :atts atts :complete-p t :type
                   (if (eq (vl-token->type type)
                           :vl-kwd-integer)
                       *vl-plain-old-integer-type*
                     *vl-plain-old-time-type*))))
       (ans := (vl-parse-basic-port-declaration-tail
                    :vl-output atts force-completep))
       (return ans))))

    Theorem: vl-parse-port-declaration-noatts-2005-fails-gracefully

    (defthm vl-parse-port-declaration-noatts-2005-fails-gracefully
     (implies
      (mv-nth
           0
           (vl-parse-port-declaration-noatts-2005 atts force-completep))
      (not
       (mv-nth
        1
        (vl-parse-port-declaration-noatts-2005 atts force-completep)))))

    Theorem: vl-warning-p-of-vl-parse-port-declaration-noatts-2005

    (defthm vl-warning-p-of-vl-parse-port-declaration-noatts-2005
     (iff
      (vl-warning-p
       (mv-nth
          0
          (vl-parse-port-declaration-noatts-2005 atts force-completep)))
      (mv-nth
         0
         (vl-parse-port-declaration-noatts-2005 atts force-completep))))

    Theorem: vl-parse-port-declaration-noatts-2005-result

    (defthm vl-parse-port-declaration-noatts-2005-result
     (implies
      (and (and (force (vl-atts-p atts))
                (force (booleanp force-completep))))
      (equal
       (consp
        (mv-nth
          1
          (vl-parse-port-declaration-noatts-2005 atts force-completep)))
       (not (mv-nth 0
                    (vl-parse-port-declaration-noatts-2005
                         atts force-completep))))))

    Theorem: vl-parse-port-declaration-noatts-2005-count-strong

    (defthm vl-parse-port-declaration-noatts-2005-count-strong
     (and
      (<=
       (vl-tokstream-measure
        :tokstream
        (mv-nth
          2
          (vl-parse-port-declaration-noatts-2005 atts force-completep)))
       (vl-tokstream-measure))
      (implies
       (not
        (mv-nth
          0
          (vl-parse-port-declaration-noatts-2005 atts force-completep)))
       (<
        (vl-tokstream-measure
         :tokstream
         (mv-nth
          2
          (vl-parse-port-declaration-noatts-2005 atts force-completep)))
        (vl-tokstream-measure))))
     :rule-classes ((:rewrite) (:linear)))

    Theorem: true-listp-of-vl-parse-port-declaration-noatts-2005-1

    (defthm true-listp-of-vl-parse-port-declaration-noatts-2005-1
     (true-listp
      (car
       (mv-nth
         1
         (vl-parse-port-declaration-noatts-2005 atts force-completep))))
     :rule-classes :type-prescription)

    Theorem: true-listp-of-vl-parse-port-declaration-noatts-2005-2

    (defthm true-listp-of-vl-parse-port-declaration-noatts-2005-2
     (true-listp
      (cdr
       (mv-nth
         1
         (vl-parse-port-declaration-noatts-2005 atts force-completep))))
     :rule-classes :type-prescription)

    Theorem: vl-parse-port-declaration-noatts-2005-basics

    (defthm vl-parse-port-declaration-noatts-2005-basics
     (and
      (vl-portdecllist-p
       (car
        (mv-nth
         1
         (vl-parse-port-declaration-noatts-2005 atts force-completep))))
      (vl-vardecllist-p (cdr (mv-nth 1
                                     (vl-parse-port-declaration-noatts-2005
                                          atts force-completep))))))