• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
        • Warnings
        • Primitives
        • Use-set
        • Syntax
        • Getting-started
        • Utilities
        • Loader
        • Transforms
          • Expression-sizing
          • Occform
          • Oprewrite
          • Expand-functions
          • Delayredux
          • Unparameterization
          • Caseelim
          • Split
          • Selresolve
          • Weirdint-elim
          • Vl-delta
          • Replicate-insts
            • Vl-replicated-instnames
            • Vl-modulelist-replicate
            • Argument-partitioning
            • Vl-replicate-gateinst
            • Vl-replicate-gateinstlist
            • Vl-module-port-widths
            • Vl-replicate-modinst
            • Vl-replicate-arguments
            • Vl-replicate-orig-instnames
              • Vl-replicate-orig-instnames1
              • Vl-assemble-modinsts
              • Vl-module-replicate
              • Vl-replicate-modinstlist
              • Vl-modinst-origname/idx
              • Vl-modinst-origname
              • Vl-gateinst-origname/idx
              • Vl-gateinst-origname
              • Vl-gateinst-origidx
              • Vl-modinst-origidx
              • Vl-design-replicate
              • Vl-some-modinst-array-p
              • Vl-some-gateinst-array-p
            • Rangeresolve
            • Propagate
            • Clean-selects
            • Clean-params
            • Blankargs
            • Inline-mods
            • Expr-simp
            • Trunc
            • Always-top
            • Gatesplit
            • Gate-elim
            • Expression-optimization
            • Elim-supplies
            • Wildelim
            • Drop-blankports
            • Clean-warnings
            • Addinstnames
            • Custom-transform-hooks
            • Annotate
            • Latchcode
            • Elim-unused-vars
            • Problem-modules
          • Lint
          • Mlib
          • Server
          • Kit
          • Printer
          • Esim-vl
          • Well-formedness
        • Sv
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Vl-replicate-orig-instnames

    Vl-replicate-orig-instnames1

    Signature
    (vl-replicate-orig-instnames1 low high instname) → names
    Arguments
    low — Guard (natp low).
    high — Guard (natp high).
    instname — Guard (stringp instname).
    Returns
    names — Verilog-style names in lowest-first order, e.g., ("foo[3]" "foo[4]" "foo[5]").
        Type (string-listp names).

    Definitions and Theorems

    Function: vl-replicate-orig-instnames1

    (defun vl-replicate-orig-instnames1 (low high instname)
      (declare (xargs :guard (and (natp low)
                                  (natp high)
                                  (stringp instname))))
      (declare (xargs :guard (<= low high)))
      (let ((__function__ 'vl-replicate-orig-instnames1))
        (declare (ignorable __function__))
        (b* ((low (lnfix low))
             (high (lnfix high))
             (name (cat instname "[" (natstr low) "]"))
             ((when (mbe :logic (zp (- high low))
                         :exec (eql low high)))
              (list name)))
          (cons name
                (vl-replicate-orig-instnames1 (+ 1 low)
                                              high instname)))))

    Theorem: string-listp-of-vl-replicate-orig-instnames1

    (defthm string-listp-of-vl-replicate-orig-instnames1
      (b* ((names (vl-replicate-orig-instnames1 low high instname)))
        (string-listp names))
      :rule-classes :rewrite)

    Theorem: len-of-vl-replicate-orig-instnames1

    (defthm len-of-vl-replicate-orig-instnames1
      (equal (len (vl-replicate-orig-instnames1 low high instname))
             (+ 1 (nfix (- (nfix high) (nfix low))))))

    Theorem: vl-replicate-orig-instnames1-of-nfix-low

    (defthm vl-replicate-orig-instnames1-of-nfix-low
      (equal (vl-replicate-orig-instnames1 (nfix low)
                                           high instname)
             (vl-replicate-orig-instnames1 low high instname)))

    Theorem: vl-replicate-orig-instnames1-nat-equiv-congruence-on-low

    (defthm vl-replicate-orig-instnames1-nat-equiv-congruence-on-low
     (implies
         (acl2::nat-equiv low low-equiv)
         (equal (vl-replicate-orig-instnames1 low high instname)
                (vl-replicate-orig-instnames1 low-equiv high instname)))
     :rule-classes :congruence)

    Theorem: vl-replicate-orig-instnames1-of-nfix-high

    (defthm vl-replicate-orig-instnames1-of-nfix-high
      (equal (vl-replicate-orig-instnames1 low (nfix high)
                                           instname)
             (vl-replicate-orig-instnames1 low high instname)))

    Theorem: vl-replicate-orig-instnames1-nat-equiv-congruence-on-high

    (defthm vl-replicate-orig-instnames1-nat-equiv-congruence-on-high
     (implies
         (acl2::nat-equiv high high-equiv)
         (equal (vl-replicate-orig-instnames1 low high instname)
                (vl-replicate-orig-instnames1 low high-equiv instname)))
     :rule-classes :congruence)

    Theorem: vl-replicate-orig-instnames1-of-str-fix-instname

    (defthm vl-replicate-orig-instnames1-of-str-fix-instname
      (equal (vl-replicate-orig-instnames1 low high (str-fix instname))
             (vl-replicate-orig-instnames1 low high instname)))

    Theorem: vl-replicate-orig-instnames1-streqv-congruence-on-instname

    (defthm vl-replicate-orig-instnames1-streqv-congruence-on-instname
     (implies
         (streqv instname instname-equiv)
         (equal (vl-replicate-orig-instnames1 low high instname)
                (vl-replicate-orig-instnames1 low high instname-equiv)))
     :rule-classes :congruence)