• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • Macro-libraries
    • ACL2
      • Theories
      • Rule-classes
      • Proof-builder
      • Recursion-and-induction
      • Hons-and-memoization
      • Events
      • Parallelism
      • History
      • Programming
      • Operational-semantics
      • Real
      • Start-here
      • Debugging
      • Miscellaneous
      • Output-controls
      • Macros
      • Interfacing-tools
        • Io
        • Defttag
        • Sys-call
        • Save-exec
        • Quicklisp
        • Std/io
        • Oslib
        • Bridge
        • Clex
          • Example-lexer
          • Sin
            • Strin-p
            • Sin$c
              • Line-and-column-tracking
              • Sin$c-okp
              • Sin$c-init
                • Strin-init
                • Sin$c-nthcdr
                • Sin$c-cdr
                • Sin$c-firstn
                • Sin$c-count-charset
                • Sin$c-nth
                • Sin$c-matches-p
                • Sin$c-imatches-p
                • Sin$c-find
                • Sin$c-len
                • Sin$c-endp
                • Sin$c-car
                • Sin$corr
                • Sin$c-get-line
                • Sin$c-get-file
                • Sin$c-get-col
            • Matching-functions
            • Def-sin-progress
          • Tshell
          • Unsound-eval
          • Hacker
          • ACL2s-interface
          • Startup-banner
          • Command-line
      • Interfacing-tools
        • Io
        • Defttag
        • Sys-call
        • Save-exec
        • Quicklisp
        • Std/io
        • Oslib
        • Bridge
        • Clex
          • Example-lexer
          • Sin
            • Strin-p
            • Sin$c
              • Line-and-column-tracking
              • Sin$c-okp
              • Sin$c-init
                • Strin-init
                • Sin$c-nthcdr
                • Sin$c-cdr
                • Sin$c-firstn
                • Sin$c-count-charset
                • Sin$c-nth
                • Sin$c-matches-p
                • Sin$c-imatches-p
                • Sin$c-find
                • Sin$c-len
                • Sin$c-endp
                • Sin$c-car
                • Sin$corr
                • Sin$c-get-line
                • Sin$c-get-file
                • Sin$c-get-col
            • Matching-functions
            • Def-sin-progress
          • Tshell
          • Unsound-eval
          • Hacker
          • ACL2s-interface
          • Startup-banner
          • Command-line
        • Hardware-verification
        • Software-verification
        • Math
        • Testing-utilities
      • Sin$c-init

      Strin-init

      Reset a strin-p to contain a new string from a new file.

      Signature
      (strin-init contents filename x) → strin
      Arguments
      contents — The new contents to load into chars.
          Guard (stringp contents).
      filename — The new filename to use.
          Guard (stringp filename).
      x — Completely irrelevant.
          Guard (strin-p x).
      Returns
      strin — The newly reset strin-p.

      This strange operation exists only because we need a logical version of sin$c-init to use in our abstraction. We just leave it enabled.

      Definitions and Theorems

      Function: strin-init

      (defun strin-init (contents filename x)
        (declare (xargs :guard (and (stringp contents)
                                    (stringp filename)
                                    (strin-p x))))
        (declare (ignore x))
        (let ((__function__ 'strin-init))
          (declare (ignorable __function__))
          (make-strin :chars (coerce contents 'list)
                      :file filename
                      :line 1
                      :col 0)))