{
  "target": "cmp",
  "scope": {
    "status": "scoped",
    "invocation": "cmp -s FILE1 FILE2",
    "inputDomain": "Compare two readable finite byte sequences exposed as regular files in the WASI host.",
    "proofObligation": "Return exit status 0 for equal byte sequences and 1 for unequal sequences with no stdout or stderr on these successful comparisons. Prove early exit preserves the equality decision.",
    "excluded": "Diagnostics, inaccessible files, nonregular files, offsets, and other flags."
  },
  "obligations": [],
  "requires": [
    {
      "id": "root.io",
      "target": "root",
      "title": "Byte I/O and argument forwarding",
      "summary": "read_byte, write_byte, arg_count and arg_byte forward to the host adapter and return its results unchanged.",
      "status": "proved",
      "statement": "RootContract.io",
      "proof": {
        "source": "https://github.com/bloom-directory/lefttoprove/blob/1d8af2c5cde11163204be6dd05ed2c6b96bc47dc/targets/root/Root.v",
        "pullRequest": "https://github.com/bloom-directory/lefttoprove/pull/8",
        "contributor": "josh-richardson",
        "mergedAt": "2026-12-01T08:17:43Z"
      },
      "requires": [],
      "unblocks": 44,
      "recommended": false,
      "page": "/utilities/root/#root.io"
    },
    {
      "id": "root.preopens",
      "target": "root",
      "title": "Files under a preopen",
      "summary": "Open files relative to a preopened directory and read and write them as byte streams.",
      "status": "missing",
      "statement": null,
      "proof": null,
      "requires": [
        "root.io"
      ],
      "unblocks": 13,
      "recommended": true,
      "page": "/utilities/root/#root.preopens"
    }
  ],
  "reference": {
    "name": "GNU Diffutils",
    "version": "3.12",
    "release": "https://lists.gnu.org/archive/html/info-gnu/2025-04/msg00005.html",
    "manual": "https://www.gnu.org/software/diffutils/manual/html_node/Invoking-cmp.html",
    "source": "https://git.savannah.gnu.org/cgit/diffutils.git/tree/src/cmp.c?h=v3.12"
  },
  "specification": "https://pubs.opengroup.org/onlinepubs/9799919799/utilities/cmp.html",
  "rocq": null,
  "fixtures": {
    "cases": "Two empty files, one stream a prefix of the other, single-byte mismatches, and different read chunk boundaries for each file.",
    "data": [],
    "source": null
  },
  "submission": {
    "url": "https://github.com/bloom-directory/lefttoprove/compare",
    "metadata": [
      "Target: cmp",
      "Contribution: proof"
    ],
    "replay": "sh targets/cmp/verify.sh",
    "existingVerifier": null
  }
}
