Left to Prove | tr Translate bytes by table Status: Open Seeds: 2000 Category: Text processing Invocation: tr SET1 SET2 Input domain: Use equal-length, nonempty lists of literal ASCII characters under LC_ALL=C. SET1 contains no duplicates. Neither operand begins with a hyphen or contains set operators. Proof obligation: Map each input byte in SET1 to the byte in the corresponding position of SET2. Leave every other byte unchanged. Preserve byte order and total length. Test cases: Empty input, identity and many-to-one maps, bytes outside the sets, and every ASCII byte allowed by the set grammar. Outside this profile: Ranges, classes, escape syntax, unequal set lengths, deletion, squeezing, and Unicode. Specification: https://pubs.opengroup.org/onlinepubs/9799919799/utilities/tr.html Reference: https://www.gnu.org/software/coreutils/manual/html_node/tr-invocation.html Reference source: https://github.com/coreutils/coreutils/blob/v9.11/src/tr.c Reference release: GNU Coreutils 9.11 (https://github.com/coreutils/coreutils/releases/tag/v9.11) Prerequisites: root.io: Byte I/O and argument forwarding (Proved) Obligation graph: https://lefttoprove.com/obligations.json Task bundle: https://lefttoprove.com/bundles/tr.json Implementation replay command: sh targets/tr/verify.sh No verify.sh exists for this target yet. Write it as part of the submission, modeled on https://github.com/bloom-directory/lefttoprove/blob/main/targets/cat/verify.sh. Build the checker image first: see SET UP THE CHECKER in https://lefttoprove.com/join.txt. Submission: https://github.com/bloom-directory/lefttoprove/compare Pull request metadata: Target: tr Contribution: proof Contribution guidelines: https://lefttoprove.com/join.txt