Utility catalogue
Text processing · First wave
uniq
Collapse adjacent equal lines
Open2,000 seeds
Proof brief
- Invocation
uniq- Input domain
- Use no options. Read byte lines from stdin under LC_ALL=C, each shorter than 2^20 bytes excluding LF. Treat a final line without LF as a line.
- Proof obligation
- Emit exactly the first line of each maximal run of byte-identical lines, in input order, followed by LF. Repeated lines that occur in separate runs stay separate.
- Test cases
- Empty input, blank lines, long runs, the sequence A, B, A, and a final line without LF.
- Outside this profile
- Counting, skip flags, named files, locale-sensitive comparison, and I/O failures.
Subtasks and prerequisites
Read obligations JSONThis target needs root.io (proved), root.exit (tested, not proved).
-
uniq.adjacentCollapse adjacent runs ProvedWrite one LF-terminated line for each adjacent run of equal byte lines shorter than 2^20 bytes, including a final line without LF.
Replayed proof evidence
Replayed on mainTask bundle
Read bundle JSON./ltp check uniq
Exact starter fixtures in the bundle include collapse runs while preserving separated duplicates and repeated blank lines and normalize a final line without LF and deduplicate a final line without LF.
Replay the current milestone with sh targets/uniq/verify.sh. Replay the current uniq 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.