• 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
        • Warnings
        • Getting-started
        • Utilities
        • Printer
        • Kit
        • Mlib
        • Transforms
          • Unparameterization
          • Elaborate
          • Addnames
          • Annotate
            • Increment-elim
            • Make-implicit-wires
            • Basic-bind-elim
            • Argresolve
            • Basicsanity
              • Vl-interfacelist-basicsanity
              • Vl-modport-portlist->names
              • Vl-modulelist-basicsanity
              • Vl-modport-portlist-check-wellformed
              • Vl-modport-port-check-wellformed
                • Vl-interface-check-modinst-is-subinterface
                • Vl-interface-check-modinsts-are-subinterfaces
                • Vl-modport-portcheck
                • Vl-modportlist-portcheck
                • Vl-interface-basicsanity
                • Vl-port-check-style
                • Vl-portlist-check-style
                • Vl-module-basicsanity
                • Vl-portlist-check-wellformed
                • Vl-port-check-wellformed
                • Vl-design-basicsanity
                • Vl-pps-expr-elided
              • Portdecl-sign
              • Enum-names
              • Port-resolve
              • Udp-elim
              • Vl-annotate-design
              • Vl-annotate-module
            • Clean-warnings
            • Eliminitial
            • Custom-transform-hooks
            • Problem-modules
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Basicsanity

    Vl-modport-port-check-wellformed

    Signature
    (vl-modport-port-check-wellformed x ctx warnings internalnames) 
      → 
    (mv warnings internalnames)
    Arguments
    x — Guard (vl-modport-port-p x).
    ctx — Guard (vl-modport-p ctx).
    warnings — Guard (vl-warninglist-p warnings).
    internalnames — Guard (string-listp internalnames).
    Returns
    warnings — Type (vl-warninglist-p warnings).
    internalnames — Type (string-listp internalnames).

    Definitions and Theorems

    Function: vl-modport-port-check-wellformed

    (defun vl-modport-port-check-wellformed
           (x ctx warnings internalnames)
     (declare (xargs :guard (and (vl-modport-port-p x)
                                 (vl-modport-p ctx)
                                 (vl-warninglist-p warnings)
                                 (string-listp internalnames))))
     (let ((__function__ 'vl-modport-port-check-wellformed))
      (declare (ignorable __function__))
      (b*
       ((internalnames (string-list-fix internalnames))
        ((vl-modport-port x)
         (vl-modport-port-fix x))
        ((unless x.expr)
         (mv (ok) internalnames))
        ((unless (vl-portexpr-p x.expr))
         (mv
           (fatal
                :type :vl-bad-port
                :msg "~a0: ill-formed expression for modport port: ~a1."
                :args (list (vl-modport-fix ctx) x))
           internalnames)))
       (mv (ok)
           (append (vl-portexpr->internalnames x.expr)
                   internalnames)))))

    Theorem: vl-warninglist-p-of-vl-modport-port-check-wellformed.warnings

    (defthm
          vl-warninglist-p-of-vl-modport-port-check-wellformed.warnings
      (b* (((mv ?warnings ?internalnames)
            (vl-modport-port-check-wellformed
                 x ctx warnings internalnames)))
        (vl-warninglist-p warnings))
      :rule-classes :rewrite)

    Theorem: string-listp-of-vl-modport-port-check-wellformed.internalnames

    (defthm
         string-listp-of-vl-modport-port-check-wellformed.internalnames
      (b* (((mv ?warnings ?internalnames)
            (vl-modport-port-check-wellformed
                 x ctx warnings internalnames)))
        (string-listp internalnames))
      :rule-classes :rewrite)

    Theorem: vl-modport-port-check-wellformed-of-vl-modport-port-fix-x

    (defthm vl-modport-port-check-wellformed-of-vl-modport-port-fix-x
     (equal
       (vl-modport-port-check-wellformed (vl-modport-port-fix x)
                                         ctx warnings internalnames)
       (vl-modport-port-check-wellformed x ctx warnings internalnames)))

    Theorem: vl-modport-port-check-wellformed-vl-modport-port-equiv-congruence-on-x

    (defthm
     vl-modport-port-check-wellformed-vl-modport-port-equiv-congruence-on-x
     (implies
      (vl-modport-port-equiv x x-equiv)
      (equal
         (vl-modport-port-check-wellformed x ctx warnings internalnames)
         (vl-modport-port-check-wellformed
              x-equiv ctx warnings internalnames)))
     :rule-classes :congruence)

    Theorem: vl-modport-port-check-wellformed-of-vl-modport-fix-ctx

    (defthm vl-modport-port-check-wellformed-of-vl-modport-fix-ctx
     (equal
       (vl-modport-port-check-wellformed x (vl-modport-fix ctx)
                                         warnings internalnames)
       (vl-modport-port-check-wellformed x ctx warnings internalnames)))

    Theorem: vl-modport-port-check-wellformed-vl-modport-equiv-congruence-on-ctx

    (defthm
     vl-modport-port-check-wellformed-vl-modport-equiv-congruence-on-ctx
     (implies
      (vl-modport-equiv ctx ctx-equiv)
      (equal
         (vl-modport-port-check-wellformed x ctx warnings internalnames)
         (vl-modport-port-check-wellformed
              x ctx-equiv warnings internalnames)))
     :rule-classes :congruence)

    Theorem: vl-modport-port-check-wellformed-of-vl-warninglist-fix-warnings

    (defthm
        vl-modport-port-check-wellformed-of-vl-warninglist-fix-warnings
     (equal
       (vl-modport-port-check-wellformed
            x ctx (vl-warninglist-fix warnings)
            internalnames)
       (vl-modport-port-check-wellformed x ctx warnings internalnames)))

    Theorem: vl-modport-port-check-wellformed-vl-warninglist-equiv-congruence-on-warnings

    (defthm
     vl-modport-port-check-wellformed-vl-warninglist-equiv-congruence-on-warnings
     (implies
      (vl-warninglist-equiv warnings warnings-equiv)
      (equal
         (vl-modport-port-check-wellformed x ctx warnings internalnames)
         (vl-modport-port-check-wellformed
              x ctx warnings-equiv internalnames)))
     :rule-classes :congruence)

    Theorem: vl-modport-port-check-wellformed-of-string-list-fix-internalnames

    (defthm
      vl-modport-port-check-wellformed-of-string-list-fix-internalnames
     (equal
      (vl-modport-port-check-wellformed x ctx warnings
                                        (string-list-fix internalnames))
      (vl-modport-port-check-wellformed x ctx warnings internalnames)))

    Theorem: vl-modport-port-check-wellformed-string-list-equiv-congruence-on-internalnames

    (defthm
     vl-modport-port-check-wellformed-string-list-equiv-congruence-on-internalnames
     (implies
      (str::string-list-equiv internalnames internalnames-equiv)
      (equal
         (vl-modport-port-check-wellformed x ctx warnings internalnames)
         (vl-modport-port-check-wellformed
              x ctx warnings internalnames-equiv)))
     :rule-classes :congruence)