• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Debugging
    • Projects
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
      • Fgl
      • Vl
        • Syntax
        • Loader
          • Preprocessor
          • Vl-loadconfig
          • Vl-loadstate
          • Lexer
          • Parser
          • Vl-load-merge-descriptions
          • Vl-find-basename/extension
          • Vl-load-file
          • Vl-loadresult
          • Vl-find-file
          • Scope-of-defines
          • Vl-flush-out-descriptions
          • Vl-description
          • Vl-read-file
          • Vl-includeskips-report-gather
          • Vl-load-main
          • Extended-characters
            • Vl-location
            • Vl-echar-p
            • 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-description
            • Vl-preprocess-debug
            • Vl-descriptions-left-to-load
            • Inject-warnings
            • Vl-read-file-report-gather
            • Vl-write-preprocessor-debug-file
            • Vl-load-descriptions
            • Vl-load-files
            • Translate-off
            • Vl-load-read-file-hook
            • Vl-loadstate-pad
            • Vl-read-file-report
            • Vl-load-summary
            • Vl-collect-modules-from-descriptions
            • Vl-loadstate->warnings
            • Vl-iskips-report
            • Vl-descriptionlist
          • Warnings
          • Getting-started
          • Utilities
          • Printer
          • Kit
          • Mlib
          • Transforms
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Testing-utilities
      • Math
    • 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)