• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Debugging
    • Projects
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
      • Vwsim
      • Fgl
      • Vl
        • Syntax
        • Loader
        • Warnings
        • Getting-started
        • Utilities
        • Printer
        • Kit
        • Mlib
          • Scopestack
          • Hid-tools
          • Filtering-by-name
          • Vl-interface-mocktype
          • Stripping-functions
          • Genblob
            • Vl-genblob
            • Vl-sort-genelements
            • Vl-genblob->interface
            • Vl-genblob->module
            • Vl-genblob->elems
            • Vl-interface->genblob
            • Vl-genblob->package
              • Vl-module->genblob
              • Vl-genblob->class
              • Vl-package->genblob
              • Vl-class->genblob
              • Vl-genelementlist->defaultdisables
              • Vl-genelementlist->properties
              • Vl-genelementlist->paramdecls
              • Vl-genelementlist->fwdtypedefs
              • Vl-genelementlist->dpiimports
              • Vl-genelementlist->dpiexports
              • Vl-genelementlist->covergroups
              • Vl-genelementlist->cassertions
              • Vl-genelementlist->assertions
              • Vl-genelementlist->vardecls
              • Vl-genelementlist->typedefs
              • Vl-genelementlist->taskdecls
              • Vl-genelementlist->sequences
              • Vl-genelementlist->portdecls
              • Vl-genelementlist->modports
              • Vl-genelementlist->modinsts
              • Vl-genelementlist->letdecls
              • Vl-genelementlist->initials
              • Vl-genelementlist->imports
              • Vl-genelementlist->genvars
              • Vl-genelementlist->generates
              • Vl-genelementlist->gclkdecls
              • Vl-genelementlist->gateinsts
              • Vl-genelementlist->fundecls
              • Vl-genelementlist->elabtasks
              • Vl-genelementlist->clkdecls
              • Vl-genelementlist->assigns
              • Vl-genelementlist->alwayses
              • Vl-genelementlist->finals
              • Vl-genelementlist->classes
              • Vl-genelementlist->binds
              • Vl-genelementlist->aliases
              • Vl-genblock->genblob
              • Vl-scopetype-p
            • Expr-tools
            • Hierarchy
            • Extract-vl-types
            • Range-tools
            • Finding-by-name
            • Stmt-tools
            • Modnamespace
            • Flat-warnings
            • Reordering-by-name
            • Datatype-tools
            • Syscalls
            • Allexprs
            • Lvalues
            • Port-tools
          • Transforms
        • Svl
        • X86isa
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Genblob

    Vl-genblob->package

    Install fields from a vl-genblob into a package.

    Signature
    (vl-genblob->package x orig) → new-mod
    Arguments
    x — Guard (vl-genblob-p x).
    orig — Guard (vl-package-p orig).
    Returns
    new-mod — Type (vl-package-p new-mod).

    See vl-package->genblob. This is the companion operation which takes the fields from the genblob and sticks them back into a package.

    Certain fields of the package, like its warnings, name, and location information, aren't affected. But the real fields like modinsts, assigns, etc., are overwritten with whatever is in the genblob.

    Definitions and Theorems

    Function: vl-genblob->package

    (defun vl-genblob->package (x orig)
      (declare (xargs :guard (and (vl-genblob-p x)
                                  (vl-package-p orig))))
      (let ((__function__ 'vl-genblob->package))
        (declare (ignorable __function__))
        (b* (((vl-genblob x)))
          (change-vl-package orig
                             :fundecls x.fundecls
                             :taskdecls x.taskdecls
                             :typedefs x.typedefs
                             :paramdecls x.paramdecls
                             :vardecls x.vardecls
                             :imports x.imports))))

    Theorem: vl-package-p-of-vl-genblob->package

    (defthm vl-package-p-of-vl-genblob->package
      (b* ((new-mod (vl-genblob->package x orig)))
        (vl-package-p new-mod))
      :rule-classes :rewrite)

    Theorem: vl-genblob->package-of-vl-genblob-fix-x

    (defthm vl-genblob->package-of-vl-genblob-fix-x
      (equal (vl-genblob->package (vl-genblob-fix x)
                                  orig)
             (vl-genblob->package x orig)))

    Theorem: vl-genblob->package-vl-genblob-equiv-congruence-on-x

    (defthm vl-genblob->package-vl-genblob-equiv-congruence-on-x
      (implies (vl-genblob-equiv x x-equiv)
               (equal (vl-genblob->package x orig)
                      (vl-genblob->package x-equiv orig)))
      :rule-classes :congruence)

    Theorem: vl-genblob->package-of-vl-package-fix-orig

    (defthm vl-genblob->package-of-vl-package-fix-orig
      (equal (vl-genblob->package x (vl-package-fix orig))
             (vl-genblob->package x orig)))

    Theorem: vl-genblob->package-vl-package-equiv-congruence-on-orig

    (defthm vl-genblob->package-vl-package-equiv-congruence-on-orig
      (implies (vl-package-equiv orig orig-equiv)
               (equal (vl-genblob->package x orig)
                      (vl-genblob->package x orig-equiv)))
      :rule-classes :congruence)