• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • ACL2
    • Macro-libraries
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
        • Warnings
        • Primitives
        • Use-set
        • Syntax
        • Getting-started
        • Utilities
        • Loader
        • Transforms
        • Lint
          • Vl-lintconfig-p
          • Lucid
            • Vl-lucidstate
            • Vl-lucidstate-init
            • Vl-lucid-dissect-pair
              • Vl-hidslice-mark
              • Vl-lucid-dissect-var-main
              • Vl-lucid-multidrive-detect
              • Vl-lucid-filter-merges
              • Vl-hidsolo-mark
              • Vl-maybe-delayoreventcontrol-lucidcheck
              • Vl-maybe-packeddimension-lucidcheck
              • Vl-delayoreventcontrol-lucidcheck
              • Vl-repeateventcontrol-lucidcheck
              • Vl-packeddimensionlist-lucidcheck
              • Vl-namedparamvaluelist-lucidcheck
              • Vl-hidtrace-mark-interfaces
              • Vl-hidstep-mark-interfaces
              • Vl-maybe-paramvalue-lucidcheck
              • Vl-paramvaluelist-lucidcheck
              • Vl-packeddimension-lucidcheck
              • Vl-namedparamvalue-lucidcheck
              • Vl-maybe-gatedelay-lucidcheck
              • Vl-rhsatom-lucidcheck
              • Vl-plainarglist-lucidcheck
              • Vl-namedarglist-lucidcheck
              • Vl-lucidstate-mark
              • Vl-lucid-mark-simple
              • Vl-eventcontrol-lucidcheck
              • Vl-enumitemlist-lucidcheck
              • Vl-enumbasetype-lucidcheck
              • Vl-enumbasekind-lucidcheck
              • Vl-delaycontrol-lucidcheck
              • Vl-plainarg-lucidcheck
              • Vl-paramvalue-lucidcheck
              • Vl-paramargs-lucidcheck
              • Vl-maybe-rhsexpr-lucidcheck
              • Vl-maybe-range-lucidcheck
              • Vl-gatedelay-lucidcheck
              • Vl-evatomlist-lucidcheck
              • Vl-arguments-lucidcheck
              • Vl-rangelist-lucidcheck
              • Vl-namedarg-lucidcheck
              • Vl-enumitem-lucidcheck
              • Vl-custom-suppress-multidrive-p
              • Vl-evatom-lucidcheck
              • Vl-range-lucidcheck
              • Vl-pps-lucidstate
              • Vl-lucid-valid-bits-for-datatype
              • Vl-lucidocclist-drop-bad-modinsts
              • Vl-paramdecl-lucidcheck
              • Vl-lucid-dissect-database
              • Vl-interfaceportlist-lucidcheck
              • Vl-interfaceport-lucidcheck
              • Vl-taskdecllist-lucidcheck
              • Vl-taskdecl-lucidcheck
              • Vl-portdecllist-lucidcheck
              • Vl-paramdecllist-lucidcheck
              • Vl-interfacelist-lucidcheck
              • Vl-gateinstlist-lucidcheck
              • Vl-fundecl-lucidcheck
              • Vl-design-lucidcheck-main
              • Vl-vardecllist-lucidcheck
              • Vl-vardecl-lucidcheck
              • Vl-typedeflist-lucidcheck
              • Vl-portdecl-lucidcheck
              • Vl-packagelist-lucidcheck
              • Vl-package-lucidcheck
              • Vl-modulelist-lucidcheck
              • Vl-modinstlist-lucidcheck
              • Vl-modinst-lucidcheck
              • Vl-interface-lucidcheck
              • Vl-initiallist-lucidcheck
              • Vl-gateinst-lucidcheck
              • Vl-fundecllist-lucidcheck
              • Vl-assignlist-lucidcheck
              • Vl-alwayslist-lucidcheck
              • Vl-typedef-lucidcheck
              • Vl-initial-lucidcheck
              • Vl-design-lucid
              • Vl-assign-lucidcheck
              • Vl-module-lucidcheck
              • Vl-always-lucidcheck
              • Vl-lucidocclist-drop-foreign-writes
              • Vl-lucid-valid-bits-for-decl
              • Vl-custom-suppress-multidrive-p-default
              • Vl-lucidmergealist-count
              • Vl-lucid-scopestack-subscope-p
              • Vl-lucid-collect-solo-occs
              • Vl-lucid-collect-resolved-slices
              • Vl-lucid-pp-multibits
              • Vl-lucid-ctx
              • Vl-lucidocclist-drop-initials
              • Vl-lucidocclist-drop-generates
              • Vl-lucid-slices-append-bits
              • Vl-lucid-first-solo-occ
              • Vl-lucid-do-merges1
              • Vl-lucid-do-merges
              • Vl-lucidocclist-remove-tails
              • Vl-lucid-some-solo-occp
              • Vl-lucid-resolved-slices->bits
              • Vl-lucid-resolved-slice->bits
              • Vl-scopestack-top-level-name
              • Vl-normalize-scopestack
              • Vl-lucid-resolved-slice-p
              • Vl-lucid-all-slices-resolved-p
              • Vl-lucid-range->bits
              • Vl-lucid-plainarglist-nicely-resolved-p
              • Vl-lucid-multidrive-summary
              • Vl-pp-lucid-multidrive-summary
              • Vl-lucid-dissect
              • Vl-lucid-all-slices-p
              • Vl-lucidocclist-some-transistory-p
              • Vl-lucidocc-transistory-p
              • Vl-lucid-plainarg-nicely-resolved-p
              • Vl-inside-true-generate-p
              • Vl-lucid-z-gateinst-p
              • Vl-lucid-modinst-nicely-resolved-p
              • Vl-inside-interface-p
              • Vl-inside-blockscope-p
              • Vl-lucid-z-expr-p
              • Vl-lucid-z-assign-p
              • Vl-lucidmergealist
              • Vl-lucid-summarize-bits
              • Vl-pp-merged-index-list
              • Vl-pp-merged-index
              • Vl-lucid-pp-bits
              • Vl-fast-range-p
            • Skip-detection
            • Vl-lintresult-p
            • Lint-warning-suppression
            • Condcheck
            • Selfassigns
            • Leftright-check
            • Dupeinst-check
            • Oddexpr-check
            • Remove-toohard
            • Qmarksize-check
            • Portcheck
            • Duplicate-detect
            • Vl-print-certain-warnings
            • Duperhs-check
            • *vl-lint-help*
            • Lint-stmt-rewrite
            • Drop-missing-submodules
            • Check-case
            • Drop-user-submodules
            • Check-namespace
            • Vl-lint
          • Mlib
          • Server
          • Kit
          • Printer
          • Esim-vl
          • Well-formedness
        • Sv
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Lucid

    Vl-lucid-dissect-pair

    Signature
    (vl-lucid-dissect-pair key val reportcard st) → reportcard
    Arguments
    key — Guard (vl-lucidkey-p key).
    val — Guard (vl-lucidval-p val).
    reportcard — Guard (vl-reportcard-p reportcard).
    st — Guard (vl-lucidstate-p st).
    Returns
    reportcard — Type (vl-reportcard-p reportcard).

    Definitions and Theorems

    Function: vl-lucid-dissect-pair

    (defun vl-lucid-dissect-pair (key val reportcard st)
     (declare (xargs :guard (and (vl-lucidkey-p key)
                                 (vl-lucidval-p val)
                                 (vl-reportcard-p reportcard)
                                 (vl-lucidstate-p st))))
     (let ((__function__ 'vl-lucid-dissect-pair))
      (declare (ignorable __function__))
      (b*
       ((reportcard (vl-reportcard-fix reportcard))
        ((vl-lucidstate st))
        ((vl-lucidkey key))
        ((vl-lucidval val))
        (topname (or (vl-scopestack-top-level-name key.scopestack)
                     :design))
        ((when val.errors)
         (b*
          ((w
            (make-vl-warning
             :type :vl-lucid-error
             :msg
             "Error computing use/set information for ~s0.  Debugging details: ~x1."
             :args (list (with-local-ps (vl-pp-lucidkey key))
                         val.errors)
             :fatalp nil
             :fn __function__)))
          (vl-extend-reportcard topname w reportcard))))
       (case
        (tag key.item)
        (:vl-fundecl
         (b*
          (((when (vl-lucid-some-solo-occp val.used))
            reportcard)
           (w
            (make-vl-warning
             :type :vl-lucid-unused
             :msg "Function ~w0 is never used. (~s1)"
             :args
             (list
                 (vl-fundecl->name key.item)
                 (with-local-ps (vl-pp-scopestack-path key.scopestack)))
             :fn __function__
             :fatalp nil)))
          (vl-extend-reportcard topname w reportcard)))
        (:vl-taskdecl
         (b*
          (((when (vl-lucid-some-solo-occp val.used))
            reportcard)
           (w
            (make-vl-warning
             :type :vl-lucid-unused
             :msg "Task ~w0 is never used. (~s1)"
             :args
             (list
                 (vl-taskdecl->name key.item)
                 (with-local-ps (vl-pp-scopestack-path key.scopestack)))
             :fn __function__
             :fatalp nil)))
          (vl-extend-reportcard topname w reportcard)))
        (:vl-typedef
         (b*
          (((when (vl-lucid-some-solo-occp val.used))
            reportcard)
           (w
            (make-vl-warning
             :type :vl-lucid-unused
             :msg "Type ~w0 is never used. (~s1)"
             :args
             (list
                 (vl-typedef->name key.item)
                 (with-local-ps (vl-pp-scopestack-path key.scopestack)))
             :fn __function__
             :fatalp nil)))
          (vl-extend-reportcard topname w reportcard)))
        (:vl-vardecl
         (b*
          ((warnings
            (vl-lucid-dissect-var-main key.scopestack key.item
                                       val.used val.set st.generatesp)))
          (vl-extend-reportcard-list topname warnings reportcard)))
        (:vl-paramdecl
         (b*
          (((unless st.paramsp) reportcard)
           (warnings
            (vl-lucid-dissect-var-main key.scopestack key.item
                                       val.used val.set st.generatesp)))
          (vl-extend-reportcard-list topname warnings reportcard)))
        (:vl-interfaceport
         (b*
          (((when (or val.used val.set))
            reportcard)
           (w
            (make-vl-warning
             :type :vl-lucid-spurious
             :msg "Interface port ~w0 is never mentioned. (~s1)"
             :args
             (list
                 (vl-interfaceport->name key.item)
                 (with-local-ps (vl-pp-scopestack-path key.scopestack)))
             :fn __function__
             :fatalp nil)))
          (vl-extend-reportcard topname w reportcard)))
        (:vl-modinst
         (b*
          (((vl-modinst key.item))
           (mod (vl-scopestack-find-definition
                     key.item.modname key.scopestack))
           ((unless (eq (tag mod) :vl-interface))
            reportcard)
           ((when (or val.used val.set))
            reportcard)
           (w
            (make-vl-warning
             :type :vl-lucid-spurious
             :msg "Interface ~w0 is never mentioned. (~s1)"
             :args
             (list
                 key.item.instname
                 (with-local-ps (vl-pp-scopestack-path key.scopestack)))
             :fn __function__
             :fatalp nil)))
          (vl-extend-reportcard topname w reportcard)))
        (otherwise reportcard)))))

    Theorem: vl-reportcard-p-of-vl-lucid-dissect-pair

    (defthm vl-reportcard-p-of-vl-lucid-dissect-pair
      (b* ((reportcard (vl-lucid-dissect-pair key val reportcard st)))
        (vl-reportcard-p reportcard))
      :rule-classes :rewrite)

    Theorem: vl-lucid-dissect-pair-of-vl-lucidkey-fix-key

    (defthm vl-lucid-dissect-pair-of-vl-lucidkey-fix-key
      (equal (vl-lucid-dissect-pair (vl-lucidkey-fix key)
                                    val reportcard st)
             (vl-lucid-dissect-pair key val reportcard st)))

    Theorem: vl-lucid-dissect-pair-vl-lucidkey-equiv-congruence-on-key

    (defthm vl-lucid-dissect-pair-vl-lucidkey-equiv-congruence-on-key
      (implies
           (vl-lucidkey-equiv key key-equiv)
           (equal (vl-lucid-dissect-pair key val reportcard st)
                  (vl-lucid-dissect-pair key-equiv val reportcard st)))
      :rule-classes :congruence)

    Theorem: vl-lucid-dissect-pair-of-vl-lucidval-fix-val

    (defthm vl-lucid-dissect-pair-of-vl-lucidval-fix-val
      (equal (vl-lucid-dissect-pair key (vl-lucidval-fix val)
                                    reportcard st)
             (vl-lucid-dissect-pair key val reportcard st)))

    Theorem: vl-lucid-dissect-pair-vl-lucidval-equiv-congruence-on-val

    (defthm vl-lucid-dissect-pair-vl-lucidval-equiv-congruence-on-val
      (implies
           (vl-lucidval-equiv val val-equiv)
           (equal (vl-lucid-dissect-pair key val reportcard st)
                  (vl-lucid-dissect-pair key val-equiv reportcard st)))
      :rule-classes :congruence)

    Theorem: vl-lucid-dissect-pair-of-vl-reportcard-fix-reportcard

    (defthm vl-lucid-dissect-pair-of-vl-reportcard-fix-reportcard
      (equal
           (vl-lucid-dissect-pair key val (vl-reportcard-fix reportcard)
                                  st)
           (vl-lucid-dissect-pair key val reportcard st)))

    Theorem: vl-lucid-dissect-pair-vl-reportcard-equiv-congruence-on-reportcard

    (defthm
     vl-lucid-dissect-pair-vl-reportcard-equiv-congruence-on-reportcard
     (implies
          (vl-reportcard-equiv reportcard reportcard-equiv)
          (equal (vl-lucid-dissect-pair key val reportcard st)
                 (vl-lucid-dissect-pair key val reportcard-equiv st)))
     :rule-classes :congruence)

    Theorem: vl-lucid-dissect-pair-of-vl-lucidstate-fix-st

    (defthm vl-lucid-dissect-pair-of-vl-lucidstate-fix-st
      (equal
           (vl-lucid-dissect-pair key
                                  val reportcard (vl-lucidstate-fix st))
           (vl-lucid-dissect-pair key val reportcard st)))

    Theorem: vl-lucid-dissect-pair-vl-lucidstate-equiv-congruence-on-st

    (defthm vl-lucid-dissect-pair-vl-lucidstate-equiv-congruence-on-st
      (implies
           (vl-lucidstate-equiv st st-equiv)
           (equal (vl-lucid-dissect-pair key val reportcard st)
                  (vl-lucid-dissect-pair key val reportcard st-equiv)))
      :rule-classes :congruence)