• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • 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
          • Sys-call+
          • Tshell
            • Tshell-call
            • Tshell-call-unsound
              • Tshell-call-unsound-fn1
            • Tshell-call-fn1
            • Tshell-ensure
            • Tshell-start
            • Tshell-run-background
            • Tshell-call-unsound-fn1
          • Sys-call-status
          • Sys-call*
        • Save-exec
        • Quicklisp
        • Std/io
        • Oslib
        • Bridge
        • Clex
        • Tshell
          • Tshell-call
          • Tshell-call-unsound
            • Tshell-call-unsound-fn1
          • Tshell-call-fn1
          • Tshell-ensure
          • Tshell-start
          • Tshell-run-background
          • Tshell-call-unsound-fn1
        • Unsound-eval
        • Hacker
        • ACL2s-interface
        • Startup-banner
        • Command-line
    • Interfacing-tools
      • Io
      • Defttag
      • Sys-call
        • Sys-call+
        • Tshell
          • Tshell-call
          • Tshell-call-unsound
            • Tshell-call-unsound-fn1
          • Tshell-call-fn1
          • Tshell-ensure
          • Tshell-start
          • Tshell-run-background
          • Tshell-call-unsound-fn1
        • Sys-call-status
        • Sys-call*
      • Save-exec
      • Quicklisp
      • Std/io
      • Oslib
      • Bridge
      • Clex
      • Tshell
        • Tshell-call
        • Tshell-call-unsound
          • Tshell-call-unsound-fn1
        • Tshell-call-fn1
        • Tshell-ensure
        • Tshell-start
        • Tshell-run-background
        • Tshell-call-unsound-fn1
      • Unsound-eval
      • Hacker
      • ACL2s-interface
      • Startup-banner
      • Command-line
    • Hardware-verification
    • Software-verification
    • Math
    • Testing-utilities
  • Tshell
  • Tshell-call

Tshell-call-unsound

Unsound variant of tshell-call which doesn't take state.

Signature
(tshell-call-unsound cmd &key (print 't) (save 't)) 
  → 
(mv exit-status lines)
Arguments
cmd — This is the command to run. It can actually be a full-blown shell script. It should not require any input from the user.
    Guard (stringp cmd).
print — This says whether we should print the lines produced by cmd as they are produced. nil means print nothing, t means print everything, and any other symbol fn means call the raw Lisp function fn to do the printing. Custom output functions are an advanced feature; see tshell-raw.lsp for details.
    Guard (symbolp print).
save — This says whether we should capture the stdout/stderr lines produced by cmd and return them as the lines output. If you aren't going to analyze the program's output, you might want to set this to nil to cut down on memory usage.
    Guard (booleanp save).
Returns
exit-status — The exit code from the command. Typically 0 means success and any non-zero value means failure. This is only sensible if finishedp is t.
    Type (natp exit-status).
lines — The output from the command (from both standard output and standard error.) Note that lines will always just be nil if you're using :save nil.
    Type (string-listp lines).

This is equivalent to the old version of tshell-call, before it was made sound by adding state.

It is unsound because it is not functional; two executions with the same arguments might yield different results.

See tshell-call for usage information.

Definitions and Theorems

Function: tshell-call-unsound-fn

(defun tshell-call-unsound-fn (cmd print save)
 (declare (xargs :guard (and (stringp cmd)
                             (symbolp print)
                             (booleanp save))))
 (let ((__function__ 'tshell-call-unsound))
  (declare (ignorable __function__))
  (progn$
      (cw "Warning: under-the-hood definition of ~s0 not installed?"
          __function__)
      (tshell-call-unsound-fn1 cmd print save))))

Theorem: natp-of-tshell-call-unsound.exit-status

(defthm natp-of-tshell-call-unsound.exit-status
  (b* (((mv ?exit-status ?lines)
        (tshell-call-unsound-fn cmd print save)))
    (natp exit-status))
  :rule-classes :type-prescription)

Theorem: string-listp-of-tshell-call-unsound.lines

(defthm string-listp-of-tshell-call-unsound.lines
  (b* (((mv ?exit-status ?lines)
        (tshell-call-unsound-fn cmd print save)))
    (string-listp lines))
  :rule-classes :rewrite)

Subtopics

Tshell-call-unsound-fn1
Unsound variant of tshell-call-fn1 which doesn't take state.