• 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
                • Vl-process-subsequent-ansi-port
                • Vl-process-first-ansi-port
                • Vl-process-subsequent-ansi-ports
                • Vl-nettype-for-parsed-ansi-port
                • Vl-parse-module-port-list-top-2012
                • Vl-process-ansi-ports
                • Vl-port-starts-ansi-port-list-p
                  • Vl-parse-module-port-list-top
                  • Vl-genelementlist->portdecls
                • 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-ansi-port-interpretation

    Vl-port-starts-ansi-port-list-p

    Determine whether we're in an ANSI or non-ANSI port list.

    Signature
    (vl-port-starts-ansi-port-list-p port1) → ansi-p
    Arguments
    port1 — Guard (vl-parsed-ansi-port-p port1).
    Returns
    ansi-p — Type (booleanp ansi-p).

    To tell which version we are in, we follow the rule suggested in 23.2.2.3 (pg 667):

    For the first port in the port list: if the direction, port kind, and data type are all omitted, then the port shall be assumed to be a member of a non-ANSI style list_of_ports...

    Definitions and Theorems

    Function: vl-port-starts-ansi-port-list-p

    (defun vl-port-starts-ansi-port-list-p (port1)
     (declare (xargs :guard (vl-parsed-ansi-port-p port1)))
     (let ((__function__ 'vl-port-starts-ansi-port-list-p))
      (declare (ignorable __function__))
      (b* (((vl-parsed-ansi-port port1))
           ((when port1.dir) t))
       (case (tag port1.head)
             (:vl-parsed-interface-head t)
             (:vl-parsed-portdecl-head
                  (b* (((vl-parsed-portdecl-head port1.head))
                       ((when (or port1.head.nettype
                                  port1.head.var-p port1.head.explicit-p
                                  port1.head.implicit-p))
                        t))
                    nil))
             (otherwise (impossible))))))

    Theorem: booleanp-of-vl-port-starts-ansi-port-list-p

    (defthm booleanp-of-vl-port-starts-ansi-port-list-p
      (b* ((ansi-p (vl-port-starts-ansi-port-list-p port1)))
        (booleanp ansi-p))
      :rule-classes :type-prescription)