• 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
        • Mlib
          • Scopestack
          • Filtering-by-name
          • Vl-namefactory
          • Substitution
          • Allexprs
          • Hid-tools
          • Vl-consteval
          • Range-tools
          • Lvalexprs
          • Hierarchy
          • Finding-by-name
          • Expr-tools
          • Expr-slicing
          • Stripping-functions
          • Stmt-tools
          • Modnamespace
          • Vl-parse-expr-from-str
          • Welltyped
          • Reordering-by-name
          • Flat-warnings
          • Genblob
            • Vl-genblob
            • Vl-genblob->module
            • Vl-genblob->elems
            • Vl-module->genblob
            • Vl-sort-genelements
              • Vl-sort-genelements-aux
          • Expr-building
          • Datatype-tools
          • Syscalls
          • Relocate
          • Expr-cleaning
          • Namemangle
          • Caremask
          • Port-tools
          • Lvalues
        • Server
        • Kit
        • Printer
        • Esim-vl
        • Well-formedness
      • Sv
      • Fgl
      • Vwsim
      • Vl
      • X86isa
      • Svl
      • Rtl
    • Software-verification
    • Math
    • Testing-utilities
  • Genblob

Vl-sort-genelements

Sort a vl-genelementlist-p to create a vl-genblob.

Signature
(vl-sort-genelements x) → blob
Arguments
x — Guard (vl-genelementlist-p x).
Returns
blob — Type (vl-genblob-p blob).

Definitions and Theorems

Function: vl-sort-genelements

(defun vl-sort-genelements (x)
 (declare (xargs :guard (vl-genelementlist-p x)))
 (let ((__function__ 'vl-sort-genelements))
  (declare (ignorable __function__))
  (b*
   (((mv portdecls
         assigns aliases vardecls paramdecls
         fundecls taskdecls modinsts gateinsts
         alwayses initials typedefs imports
         fwdtypedefs modports genvars generates)
     (vl-sort-genelements-aux x nil nil nil nil nil nil nil nil
                              nil nil nil nil nil nil nil nil nil)))
   (make-vl-genblob :portdecls portdecls
                    :assigns assigns
                    :aliases aliases
                    :vardecls vardecls
                    :paramdecls paramdecls
                    :fundecls fundecls
                    :taskdecls taskdecls
                    :modinsts modinsts
                    :gateinsts gateinsts
                    :alwayses alwayses
                    :initials initials
                    :typedefs typedefs
                    :imports imports
                    :fwdtypedefs fwdtypedefs
                    :modports modports
                    :genvars genvars
                    :generates generates))))

Theorem: vl-genblob-p-of-vl-sort-genelements

(defthm vl-genblob-p-of-vl-sort-genelements
  (b* ((blob (vl-sort-genelements x)))
    (vl-genblob-p blob))
  :rule-classes :rewrite)

Theorem: vl-sort-genelements-of-vl-genelementlist-fix-x

(defthm vl-sort-genelements-of-vl-genelementlist-fix-x
  (equal (vl-sort-genelements (vl-genelementlist-fix x))
         (vl-sort-genelements x)))

Theorem: vl-sort-genelements-vl-genelementlist-equiv-congruence-on-x

(defthm vl-sort-genelements-vl-genelementlist-equiv-congruence-on-x
  (implies (vl-genelementlist-equiv x x-equiv)
           (equal (vl-sort-genelements x)
                  (vl-sort-genelements x-equiv)))
  :rule-classes :congruence)

Subtopics

Vl-sort-genelements-aux