Utility catalogue
Streams · First wave
cat
Copy a byte stream
Open2,000 seeds
Proof brief
- Invocation
cat- Input domain
- Use no arguments and stream arbitrary finite bytes from stdin. A successful write of a nonempty buffer reports positive progress.
- Proof obligation
- On success, stdout equals stdin byte for byte, regardless of how reads or short successful writes partition the stream. Show that a returned write count cannot cause a byte to be dropped or emitted twice.
- Test cases
- Empty input, embedded NULs, one-byte reads, and short writes in the deterministic host model.
- Outside this profile
- Named files, transformations, hostile hosts, and behavior after terminal I/O errors.
Subtasks and prerequisites
Read obligations JSONThis target needs root.io (proved), root.exit (tested, not proved).
-
cat.copyByte-at-a-time copy ProvedThe copy export copies stdin to stdout one byte at a time through root, for every modeled I/O trace.
Replayed proof evidence
Replayed on mainTask bundle
Read bundle JSON./ltp check cat
Exact starter fixtures in the bundle include embedded NUL and non-ASCII byte and empty input.
Replay the current milestone with sh targets/cat/verify.sh. Replay the current cat milestone in the checker image, which sets WASMCERT. See SET UP THE CHECKER in https://lefttoprove.com/join.txt.
GitHub submissions
See the review queueView GitHub pull requests for the current status.