• 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-find-moduleitem
            • Vl-make-moditem-alist
            • Vl-module->modnamespace
              • Vl-module->modnamespace-nrev
              • Vl-moditem
              • Vl-fast-find-moduleitem
              • Vl-moditem-alist
              • Vl-moditemlist
            • Vl-parse-expr-from-str
            • Welltyped
            • Reordering-by-name
            • 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
    • Vl-module->modnamespace

    Vl-module->modnamespace-nrev

    Tail-recursive implementation of vl-module->modnamespace.

    Signature
    (vl-module->modnamespace-nrev x nrev) → nrev
    Arguments
    x — Guard (vl-module-p x).

    This is sort of an inherently inefficient operation, since we are to perform a cons for every object in the module. But we can at least do everything tail recursively, etc.

    Definitions and Theorems

    Function: vl-module->modnamespace-nrev

    (defun vl-module->modnamespace-nrev (x nrev)
      (declare (xargs :stobjs (nrev)))
      (declare (xargs :guard (vl-module-p x)))
      (let ((__function__ 'vl-module->modnamespace-nrev))
        (declare (ignorable __function__))
        (b* (((vl-module x) x)
             (nrev (vl-vardecllist->names-nrev x.vardecls nrev))
             (nrev (vl-paramdecllist->names-nrev x.paramdecls nrev))
             (nrev (vl-fundecllist->names-nrev x.fundecls nrev))
             (nrev (vl-taskdecllist->names-nrev x.taskdecls nrev))
             (nrev (vl-modinstlist->instnames-nrev x.modinsts nrev))
             (nrev (vl-gateinstlist->names-nrev x.gateinsts nrev)))
          nrev)))

    Theorem: vl-module->modnamespace-nrev-of-vl-module-fix-x

    (defthm vl-module->modnamespace-nrev-of-vl-module-fix-x
      (equal (vl-module->modnamespace-nrev (vl-module-fix x)
                                           nrev)
             (vl-module->modnamespace-nrev x nrev)))

    Theorem: vl-module->modnamespace-nrev-vl-module-equiv-congruence-on-x

    (defthm vl-module->modnamespace-nrev-vl-module-equiv-congruence-on-x
      (implies (vl-module-equiv x x-equiv)
               (equal (vl-module->modnamespace-nrev x nrev)
                      (vl-module->modnamespace-nrev x-equiv nrev)))
      :rule-classes :congruence)