• 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
          • Preprocessor
          • Vl-loadconfig
          • Lexer
          • Vl-loadstate
          • Parser
          • Vl-load-merge-descriptions
          • Scope-of-defines
          • Vl-load-file
          • Vl-flush-out-descriptions
          • Vl-description
          • Vl-loadresult
          • Vl-read-file
          • Vl-find-basename/extension
          • Vl-find-file
          • Vl-read-files
          • Extended-characters
            • Vl-echar-p
            • Vl-location
            • Vl-echarlist->chars
            • Vl-echarlist-from-chars
            • Vl-echarlist-from-str
            • Vl-echarlist-unsigned-value
            • Vl-change-echarlist-locations
            • Vl-echar-digit-value
            • Vl-echarlist->string
            • Vl-load
            • Vl-load-main
            • Vl-load-description
            • Vl-descriptions-left-to-load
            • Inject-warnings
            • Vl-load-descriptions
            • Vl-load-files
            • Vl-load-summary
            • Vl-collect-modules-from-descriptions
            • Vl-descriptionlist
          • Transforms
          • Lint
          • Mlib
          • Server
          • Kit
          • Printer
          • Esim-vl
          • Well-formedness
        • Sv
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Extended-characters

    Vl-echarlist->string

    Transform a vl-echarlist-p to a string.

    Signature
    (vl-echarlist->string x) → *
    Arguments
    x — Guard (vl-echarlist-p x).

    Logically, this function just runs vl-echarlist->chars and coerces the result to a string; we typically leave it enabled.

    Under the hood, in Common Lisp, we install a faster definition that avoids creating an intermediate list and instead just builds a string directly. This notably saves a lot of memory when we build vl-filemap-ps.

    Definitions and Theorems

    Function: vl-echarlist->string

    (defun vl-echarlist->string (x)
      (declare (xargs :guard (vl-echarlist-p x)))
      (let ((__function__ 'vl-echarlist->string))
        (declare (ignorable __function__))
        (implode (vl-echarlist->chars x))))

    Theorem: vl-echarlist->string-of-vl-echarlist-fix-x

    (defthm vl-echarlist->string-of-vl-echarlist-fix-x
      (equal (vl-echarlist->string (vl-echarlist-fix x))
             (vl-echarlist->string x)))

    Theorem: vl-echarlist->string-vl-echarlist-equiv-congruence-on-x

    (defthm vl-echarlist->string-vl-echarlist-equiv-congruence-on-x
      (implies (vl-echarlist-equiv x x-equiv)
               (equal (vl-echarlist->string x)
                      (vl-echarlist->string x-equiv)))
      :rule-classes :congruence)