• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
      • Fgl
      • Vwsim
      • Vl
        • Syntax
          • Vl-module
          • Vl-vardecl
          • Vl-fundecl
          • Vl-interface
          • Vl-design
          • Vl-assign
          • Vl-modinst
          • Vl-gateinst
          • Vl-taskdecl
          • Vl-portdecl
          • Vl-commentmap
          • Vl-dpiimport
          • Vl-ansi-portdecl
          • Vl-package
          • Vl-paramdecl
          • Vl-dpiexport
          • Vl-class
          • Vl-sort-blockitems-aux
          • Vl-plainarglist->exprs
          • Vl-taskdecllist->names
          • Expressions-and-datatypes
          • Vl-fundecllist->names
          • Vl-udp
          • Vl-port
          • Vl-genelement
          • Vl-clkdecl
          • Vl-parse-temps
          • Vl-bind
          • Vl-namedarg
          • Vl-exprdist
          • Vl-clkassign
          • Vl-range
          • Vl-propport
          • Vl-typedef
          • Vl-gatedelay
          • Vl-dimension
          • Vl-sequence
          • Vl-clkskew
          • Vl-program
          • Vl-gatestrength
          • Vl-property
          • Vl-config
          • Vl-always
          • Vl-import
          • Vl-repeateventcontrol
          • Vl-timeliteral
          • Vl-initial
          • Vl-eventcontrol
          • Vl-final
          • Vl-udpsymbol-p
          • Vl-maybe-clkskew
          • Vl-function-specialization
          • Vl-alias
          • Vl-maybe-nettypename
          • Vl-maybe-gatedelay
          • Vl-letdecl
          • Vl-direction-p
          • Vl-modelement
          • Vl-maybe-timeprecisiondecl
          • Vl-maybe-scopeid
          • Vl-maybe-gatestrength
          • Vl-maybe-direction
          • Vl-maybe-delayoreventcontrol
          • Vl-gclkdecl
          • Vl-fwdtypedef
          • Vl-maybe-udpsymbol-p
          • Vl-maybe-timeunitdecl
          • Vl-maybe-timeliteral
          • Vl-maybe-parse-temps
          • Vl-maybe-cstrength
          • Vl-arguments
          • Vl-maybe-module
          • Vl-maybe-design
          • Vl-covergroup
            • Vl-covergroup-fix
              • Vl-covergroup-equiv
              • Make-vl-covergroup
              • Vl-covergroup-p
              • Vl-covergroup->name
              • Vl-covergroup->loc
              • Vl-covergroup->atts
              • Change-vl-covergroup
            • Vl-udpline
            • Vl-timeunitdecl
            • Vl-genvar
            • Vl-defaultdisable
            • Vl-context1
            • Vl-timeprecisiondecl
            • Vl-sort-blockitems
            • Vl-elabtask
            • Vl-udpedge
            • Vl-delaycontrol
            • Vl-context
            • Vl-ctxelement
            • Vl-ctxelement->loc
            • Vl-modelement->loc
            • Statements
            • Vl-blockitem
            • Vl-vardecllist
            • Vl-interface->ifports
            • Vl-syntaxversion
            • Vl-nettypename-p
            • Vl-module->ifports
            • Vl-lifetime-p
            • Vl-paramdecllist
            • Vl-modelementlist->genelements
            • Vl-importlist
            • Vl-typedeflist
            • Vl-gatetype-p
            • Vl-cstrength-p
            • Vl-port->name
            • Vl-genelement->loc
            • Vl-delayoreventcontrol
            • Vl-udpentry-p
            • Vl-portdecllist
            • Vl-elabtask->loc
            • Property-expressions
            • Vl-taskdecllist
            • Vl-port->loc
            • Vl-fundecllist
            • Vl-sequencelist
            • Vl-propertylist
            • Vl-portlist
            • Vl-dpiimportlist
            • Vl-dpiexportlist
            • Vl-classlist
            • Vl-arguments->args
            • Vl-alwaystype-p
            • Vl-modinstlist
            • Vl-importpart-p
            • Vl-importpart-fix
            • Vl-bindlist
            • Vl-initiallist
            • Vl-genvarlist
            • Vl-gclkdecllist
            • Vl-function-specialization-map
            • Vl-finallist
            • Vl-elabtasklist
            • Vl-defaultdisablelist
            • Vl-clkdecllist
            • Vl-cassertionlist
            • Vl-blockstmt-p
            • Vl-assignlist
            • Vl-assertionlist
            • Vl-alwayslist
            • Vl-aliaslist
            • Vl-udptable
            • Vl-udplist
            • Vl-udpentrylist
            • Vl-propportlist
            • Vl-programlist
            • Vl-packagelist
            • Vl-namedarglist
            • Vl-modulelist
            • Vl-modportlist
            • Vl-modport-portlist
            • Vl-letdecllist
            • Vl-interfacelist
            • Vl-gateinstlist
            • Vl-fwdtypedeflist
            • Vl-covergrouplist
            • Vl-configlist
            • Vl-clkassignlist
            • Vl-blockitemlist
            • Vl-ansi-portdecllist
            • Vl-regularportlist
            • Vl-paramdecllist-list
            • Vl-modelementlist
            • Vl-interfaceportlist
            • Vl-casekey-p
            • Sv::maybe-4veclist
          • Loader
          • Warnings
          • Getting-started
          • Utilities
          • Printer
          • Kit
          • Mlib
          • Transforms
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Vl-covergroup

    Vl-covergroup-fix

    Fixing function for vl-covergroup structures.

    Signature
    (vl-covergroup-fix x) → new-x
    Arguments
    x — Guard (vl-covergroup-p x).
    Returns
    new-x — Type (vl-covergroup-p new-x).

    Definitions and Theorems

    Function: vl-covergroup-fix$inline

    (defun vl-covergroup-fix$inline (x)
     (declare (xargs :guard (vl-covergroup-p x)))
     (let ((__function__ 'vl-covergroup-fix))
      (declare (ignorable __function__))
      (mbe
       :logic
       (b*
        ((name (str-fix (std::prod-car (cdr x))))
         (loc (vl-location-fix (std::prod-car (std::prod-cdr (cdr x)))))
         (atts (vl-atts-fix (std::prod-cdr (std::prod-cdr (cdr x))))))
        (cons :vl-covergroup
              (std::prod-cons name (std::prod-cons loc atts))))
       :exec x)))

    Theorem: vl-covergroup-p-of-vl-covergroup-fix

    (defthm vl-covergroup-p-of-vl-covergroup-fix
      (b* ((new-x (vl-covergroup-fix$inline x)))
        (vl-covergroup-p new-x))
      :rule-classes :rewrite)

    Theorem: vl-covergroup-fix-when-vl-covergroup-p

    (defthm vl-covergroup-fix-when-vl-covergroup-p
      (implies (vl-covergroup-p x)
               (equal (vl-covergroup-fix x) x)))

    Function: vl-covergroup-equiv$inline

    (defun vl-covergroup-equiv$inline (acl2::x acl2::y)
      (declare (xargs :guard (and (vl-covergroup-p acl2::x)
                                  (vl-covergroup-p acl2::y))))
      (equal (vl-covergroup-fix acl2::x)
             (vl-covergroup-fix acl2::y)))

    Theorem: vl-covergroup-equiv-is-an-equivalence

    (defthm vl-covergroup-equiv-is-an-equivalence
      (and (booleanp (vl-covergroup-equiv x y))
           (vl-covergroup-equiv x x)
           (implies (vl-covergroup-equiv x y)
                    (vl-covergroup-equiv y x))
           (implies (and (vl-covergroup-equiv x y)
                         (vl-covergroup-equiv y z))
                    (vl-covergroup-equiv x z)))
      :rule-classes (:equivalence))

    Theorem: vl-covergroup-equiv-implies-equal-vl-covergroup-fix-1

    (defthm vl-covergroup-equiv-implies-equal-vl-covergroup-fix-1
      (implies (vl-covergroup-equiv acl2::x x-equiv)
               (equal (vl-covergroup-fix acl2::x)
                      (vl-covergroup-fix x-equiv)))
      :rule-classes (:congruence))

    Theorem: vl-covergroup-fix-under-vl-covergroup-equiv

    (defthm vl-covergroup-fix-under-vl-covergroup-equiv
      (vl-covergroup-equiv (vl-covergroup-fix acl2::x)
                           acl2::x)
      :rule-classes (:rewrite :rewrite-quoted-constant))

    Theorem: equal-of-vl-covergroup-fix-1-forward-to-vl-covergroup-equiv

    (defthm equal-of-vl-covergroup-fix-1-forward-to-vl-covergroup-equiv
      (implies (equal (vl-covergroup-fix acl2::x)
                      acl2::y)
               (vl-covergroup-equiv acl2::x acl2::y))
      :rule-classes :forward-chaining)

    Theorem: equal-of-vl-covergroup-fix-2-forward-to-vl-covergroup-equiv

    (defthm equal-of-vl-covergroup-fix-2-forward-to-vl-covergroup-equiv
      (implies (equal acl2::x (vl-covergroup-fix acl2::y))
               (vl-covergroup-equiv acl2::x acl2::y))
      :rule-classes :forward-chaining)

    Theorem: vl-covergroup-equiv-of-vl-covergroup-fix-1-forward

    (defthm vl-covergroup-equiv-of-vl-covergroup-fix-1-forward
      (implies (vl-covergroup-equiv (vl-covergroup-fix acl2::x)
                                    acl2::y)
               (vl-covergroup-equiv acl2::x acl2::y))
      :rule-classes :forward-chaining)

    Theorem: vl-covergroup-equiv-of-vl-covergroup-fix-2-forward

    (defthm vl-covergroup-equiv-of-vl-covergroup-fix-2-forward
      (implies (vl-covergroup-equiv acl2::x (vl-covergroup-fix acl2::y))
               (vl-covergroup-equiv acl2::x acl2::y))
      :rule-classes :forward-chaining)