{
  "proofEvidence": {
    "statement": "Specs.WcContract.accepted",
    "assumptionsPolicy": "https://github.com/bloom-directory/lefttoprove/blob/3440f400d235544fe816475adde8e55009e057c0/.github/assumptions-allowlist.txt",
    "registry": "https://github.com/bloom-directory/lefttoprove/blob/3440f400d235544fe816475adde8e55009e057c0/.github/targets.json",
    "status": "replayed",
    "replay": {
      "contract": "https://github.com/bloom-directory/lefttoprove/blob/3440f400d235544fe816475adde8e55009e057c0/targets/wc/Contract.v",
      "revision": "3440f400d235544fe816475adde8e55009e057c0",
      "checkedAt": "2026-12-01T17:27:44.000Z",
      "run": "https://github.com/bloom-directory/lefttoprove/actions/runs/46701031785",
      "bundle": "https://github.com/bloom-directory/lefttoprove/actions/runs/46701031785#artifacts"
    }
  },
  "target": "wc",
  "scope": {
    "status": "scoped",
    "invocation": "wc -l -c",
    "inputDomain": "Read a finite byte stream shorter than 2^32 bytes from piped stdin under LC_ALL=C.",
    "proofObligation": "In -l -c mode, output the counts of LF bytes and total bytes, in that order. Prove the counter invariant for every partition of the input into read chunks. Interpret both i32 counts as unsigned and render them in decimal using the field formatting of the pinned oracle.",
    "excluded": "Word and character counts, filenames, read and write failures, and inputs of 2^32 bytes or more. The count export uses the unsigned i32 range, 0 through 2^32−1."
  },
  "obligations": [
    {
      "id": "wc.count",
      "target": "wc",
      "title": "Count lines and bytes through root",
      "summary": "The count export returns unsigned i32 LF and byte counts for stdin shorter than 2^32 bytes, reading through root.read_byte.",
      "status": "proved",
      "statement": "WcContract.count",
      "proof": {
        "source": "https://github.com/bloom-directory/lefttoprove/blob/1d8af2c5cde11163204be6dd05ed2c6b96bc47dc/targets/wc/Wc.v",
        "pullRequest": "https://github.com/bloom-directory/lefttoprove/pull/5",
        "contributor": "josh-richardson",
        "mergedAt": "2026-12-01T08:17:43Z"
      },
      "requires": [
        "root.io"
      ],
      "unblocks": 1,
      "recommended": false,
      "page": "/utilities/wc/#wc.count"
    }
  ],
  "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.exit",
      "target": "root",
      "title": "Exit status",
      "summary": "exit forwards a command's status to the host adapter unchanged, for every i32 status, and returns or traps as the adapter does.",
      "status": "tested",
      "statement": "RootContract.exit",
      "proof": null,
      "requires": [],
      "unblocks": 4,
      "recommended": false,
      "page": "/utilities/root/#root.exit"
    }
  ],
  "reference": {
    "name": "GNU Coreutils",
    "version": "9.11",
    "release": "https://github.com/coreutils/coreutils/releases/tag/v9.11",
    "manual": "https://www.gnu.org/software/coreutils/manual/html_node/wc-invocation.html",
    "source": "https://github.com/coreutils/coreutils/blob/v9.11/src/wc.c"
  },
  "specification": "https://github.com/bloom-directory/lefttoprove/blob/main/targets/wc/SPEC.md",
  "rocq": {
    "statement": "WcContract.accepted",
    "source": "https://github.com/bloom-directory/lefttoprove/blob/main/targets/wc/Contract.v",
    "checkSpecification": [
      "./ltp check wc"
    ]
  },
  "fixtures": {
    "cases": "Empty input, repeated LF, an unterminated last line, zero bytes in the stream, and newlines split across read boundaries.",
    "data": [
      {
        "name": "two lines",
        "args": [
          "-l",
          "-c"
        ],
        "stdinHex": "6f6e650a74776f0a",
        "stdoutHex": "2020202020203220202020202020380a",
        "stdoutCounts": [
          2,
          8
        ],
        "exitStatus": 0
      },
      {
        "name": "unterminated input",
        "args": [
          "-l",
          "-c"
        ],
        "stdinHex": "610a62",
        "stdoutHex": "2020202020203120202020202020330a",
        "stdoutCounts": [
          1,
          3
        ],
        "exitStatus": 0
      }
    ],
    "source": "https://github.com/bloom-directory/lefttoprove/blob/main/targets/wc/fixtures.json"
  },
  "submission": {
    "url": "https://github.com/bloom-directory/lefttoprove/compare",
    "metadata": [
      "Target: wc",
      "Contribution: proof"
    ],
    "replay": "sh targets/wc/verify.sh",
    "existingVerifier": {
      "source": "https://github.com/bloom-directory/lefttoprove/blob/main/targets/wc/verify.sh",
      "instruction": "Replay the current wc milestone in the checker image, which sets WASMCERT. See SET UP THE CHECKER in https://lefttoprove.com/join.txt."
    }
  }
}
