• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • ACL2
    • Macro-libraries
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
      • X86isa
        • Program-execution
          • Dynamic-instrumentation
          • Initialize-x86-state
          • Binary-file-load-fn
          • Read-channel-into-memory
          • Setting-up-page-tables
          • Read-channel-into-byte-list
          • Init-zero-page
          • Linux-load
          • Read-file-into-memory
          • Read-file-into-byte-list
          • Init-sys-view
          • Load-elf-sections
          • Chars-to-c-str
          • String-to-c-str
            • Pack-u64
            • Pack-u32
            • Concrete-simulation-examples
            • Gdt-entry
          • Sdm-instruction-set-summary
          • Tlb
          • Running-linux
          • Introduction
          • Asmtest
          • X86isa-build-instructions
          • Publications
          • Contributors
          • Machine
          • Implemented-opcodes
          • To-do
          • Proof-utilities
          • Peripherals
          • Model-validation
          • Modelcalls
          • Concrete-simulation-examples
          • Utils
          • Debugging-code-proofs
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Program-execution

    String-to-c-str

    Signature
    (string-to-c-str str) → c-str
    Arguments
    str — Guard (stringp str).
    Returns
    c-str — Type (byte-listp c-str).

    Definitions and Theorems

    Function: string-to-c-str

    (defun string-to-c-str (str)
      (declare (xargs :guard (stringp str)))
      (let ((__function__ 'string-to-c-str))
        (declare (ignorable __function__))
        (b* ((lst (coerce str 'list)))
          (chars-to-c-str lst))))

    Theorem: byte-listp-of-string-to-c-str

    (defthm byte-listp-of-string-to-c-str
      (b* ((c-str (string-to-c-str str)))
        (byte-listp c-str))
      :rule-classes :rewrite)