• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
      • Fgl
      • Vwsim
      • Vl
        • Syntax
        • Loader
        • Warnings
        • Getting-started
        • Utilities
        • Printer
        • Kit
        • Mlib
          • Scopestack
          • Hid-tools
          • Filtering-by-name
          • Vl-interface-mocktype
          • Stripping-functions
          • Genblob
          • Expr-tools
          • Extract-vl-types
          • Hierarchy
          • Range-tools
          • Finding-by-name
          • Stmt-tools
          • Modnamespace
            • Vl-module->modnamespace
              • Vl-module->modnamespace-nrev
            • Flat-warnings
            • Reordering-by-name
            • Datatype-tools
            • Syscalls
            • Allexprs
            • Lvalues
            • Port-tools
          • Transforms
        • 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)