• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • 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
            • Vl-reorder-portdecls
            • Vl-reorder-vardecls
            • Vl-reorder-fundecls
            • Vl-reorder-modules
          • Flat-warnings
          • Genblob
          • 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
  • Mlib

Reordering-by-name

Functions for reordering lists of parsed objects by their names.

We implement functions for rearranging design elements into a different order.

In most ways, these functions are similar to the functions for filtering-by-name. However, the name filtering functions preserve the order of the input list, whereas these functions explicitly reorder the elements to match the order of the names.

This can be useful in various places, e.g., dependency ordering for modules or functions, reordering for port declarations in UDPs, etc.

These functions are reasonably efficient, i.e., if the list to reorder is long, we build a temporary fast alist to speed up the lookups. This optimization is logically invisible via mbe.

Subtopics

Vl-reorder-portdecls
Collect a subset of a vl-portdecllist-p by their names, according to a given name ordering.
Vl-reorder-vardecls
Collect a subset of a vl-vardecllist-p by their names, according to a given name ordering.
Vl-reorder-fundecls
Collect a subset of a vl-fundecllist-p by their names, according to a given name ordering.
Vl-reorder-modules
Collect a subset of a vl-modulelist-p by their names, according to a given name ordering.