{
  "asan_ubsan_boundary": {
    "abi_version_verified": 402,
    "asan_ubsan_findings": 0,
    "assertions_checked": 21232,
    "compiler": "Apple clang version 21.0.0 (clang-2100.4.1.1)",
    "flags": [
      "-std=c++17",
      "-ffp-contract=off",
      "-Wall",
      "-Wextra",
      "-Werror",
      "-fsanitize=address,undefined",
      "-fno-sanitize-recover=undefined",
      "-O1",
      "-g"
    ],
    "harness": "tests/formal/asan_boundary_harness.c",
    "harness_sha256": "32943739c95015731d81b38df52a8bf89f59a5feb2b4c8b478c61bd278a8064b",
    "negative_controls": [
      {
        "caught": true,
        "expected": "non-zero exit with R3-15 failure diagnostic",
        "id": "NC-ASAN-1-r3-15-reachability-removed",
        "mutation": "Removes R3-15 full-tree reachability guard (if (visited != tree.num_nodes) return -2;) on a temporary copy of native/vericull_core.cpp",
        "observed_exit_code": 1
      },
      {
        "caught": true,
        "expected": "non-zero exit with vericull_selftest_bounds failure diagnostic",
        "id": "NC-ASAN-2-claim-hint-text-escalation",
        "mutation": "Relaxes claim_hint_lang upper bound from VERICULL_LANG_VERILOG to VERICULL_LANG_TEXT on a temporary copy of native/vericull_core.cpp",
        "observed_exit_code": 1
      }
    ],
    "negative_controls_caught": 2,
    "negative_controls_total": 2,
    "seeded_vectors": 2048,
    "source_compiled_unmodified": "native/vericull_core.cpp",
    "source_sha256": "75cfaab080c8de25bb447bc583a9f93c5bb29cb24d953fb5142f61ceeb2412bd",
    "status": "PASS"
  },
  "cbmc": {
    "flags": [
      "--json-ui",
      "-D_FORTIFY_SOURCE=0",
      "--bounds-check",
      "--pointer-check",
      "--signed-overflow-check",
      "--div-by-zero-check",
      "--unwind",
      "10",
      "--unwinding-assertions"
    ],
    "harness": "tests/formal/harness_abi_and_bounds.c",
    "harness_sha256": "d4b1cfddab6bd60665e583da8378da1945690e09e5095619f59b4d4f3bd196ff",
    "header_included_unmodified": "include/vericull_core.h",
    "header_sha256": "140b7c680461a63c8d0774f5eee73d871541a5f74851700ddfb958005f274ad1",
    "negative_controls": [
      {
        "caught": true,
        "cprover_status": "failure",
        "expected_exit_code": 10,
        "expected_target_property_ids": [
          "check_has_bytes_all_uint32.assertion.1",
          "check_has_bytes_all_uint32.assertion.2",
          "check_has_bytes_all_uint32.assertion.3"
        ],
        "failed_property_ids": [
          "check_has_bytes_all_uint32.assertion.1",
          "check_has_bytes_all_uint32.assertion.2",
          "check_has_bytes_all_uint32.assertion.3"
        ],
        "failed_unwind_count": 0,
        "id": "NC-CBMC-1-has-bytes-wrap",
        "mutation": "Replaces overflow-free has_bytes with wrapping (pos + n) <= len",
        "observed_exit_code": 10,
        "target_assertion_exact_match": true
      },
      {
        "caught": true,
        "cprover_status": "failure",
        "expected_exit_code": 10,
        "expected_target_property_ids": [
          "check_effective_lang_isolation.assertion.2",
          "check_effective_lang_isolation.assertion.3"
        ],
        "failed_property_ids": [
          "check_effective_lang_isolation.assertion.2",
          "check_effective_lang_isolation.assertion.3"
        ],
        "failed_unwind_count": 0,
        "id": "NC-CBMC-2-claim-hint-text",
        "mutation": "Relaxes claim_hint_lang upper bound from VERICULL_LANG_VERILOG (6) to VERICULL_LANG_TEXT (7)",
        "observed_exit_code": 10,
        "target_assertion_exact_match": true
      },
      {
        "caught": true,
        "cprover_status": "failure",
        "expected_exit_code": 10,
        "expected_target_property_ids": [
          "check_static_invariant_polarity.assertion.3",
          "check_static_invariant_polarity.assertion.4"
        ],
        "failed_property_ids": [
          "check_static_invariant_polarity.assertion.3",
          "check_static_invariant_polarity.assertion.4"
        ],
        "failed_unwind_count": 0,
        "id": "NC-CBMC-3-polarity-drop-neg-width",
        "mutation": "Drops (e - s >= cl->needle_len) width check in static_invariant_polarity_ok",
        "observed_exit_code": 10,
        "target_assertion_exact_match": true
      },
      {
        "caught": true,
        "cprover_status": "failure",
        "expected_exit_code": 10,
        "expected_target_property_ids": [
          "check_js_line_terminator_len.assertion.2",
          "check_js_line_terminator_len.assertion.5",
          "vc_js_line_terminator_len.pointer_dereference.11",
          "vc_js_line_terminator_len.pointer_dereference.12",
          "vc_js_line_terminator_len.pointer_dereference.13",
          "vc_js_line_terminator_len.pointer_dereference.14",
          "vc_js_line_terminator_len.pointer_dereference.15",
          "vc_js_line_terminator_len.pointer_dereference.16",
          "vc_js_line_terminator_len.pointer_dereference.17",
          "vc_js_line_terminator_len.pointer_dereference.18",
          "vc_js_line_terminator_len.pointer_dereference.19",
          "vc_js_line_terminator_len.pointer_dereference.20",
          "vc_js_line_terminator_len.pointer_dereference.21",
          "vc_js_line_terminator_len.pointer_dereference.22",
          "vc_js_line_terminator_len.pointer_dereference.23",
          "vc_js_line_terminator_len.pointer_dereference.24"
        ],
        "failed_property_ids": [
          "check_js_line_terminator_len.assertion.2",
          "check_js_line_terminator_len.assertion.5",
          "vc_js_line_terminator_len.pointer_dereference.11",
          "vc_js_line_terminator_len.pointer_dereference.12",
          "vc_js_line_terminator_len.pointer_dereference.13",
          "vc_js_line_terminator_len.pointer_dereference.14",
          "vc_js_line_terminator_len.pointer_dereference.15",
          "vc_js_line_terminator_len.pointer_dereference.16",
          "vc_js_line_terminator_len.pointer_dereference.17",
          "vc_js_line_terminator_len.pointer_dereference.18",
          "vc_js_line_terminator_len.pointer_dereference.19",
          "vc_js_line_terminator_len.pointer_dereference.20",
          "vc_js_line_terminator_len.pointer_dereference.21",
          "vc_js_line_terminator_len.pointer_dereference.22",
          "vc_js_line_terminator_len.pointer_dereference.23",
          "vc_js_line_terminator_len.pointer_dereference.24"
        ],
        "failed_unwind_count": 0,
        "id": "NC-CBMC-4-js-lineterm-oob",
        "mutation": "Drops has_bytes(limit, k, 3u) guard before buf[k+1..k+2] in js_line_terminator_len",
        "observed_exit_code": 10,
        "target_assertion_exact_match": true
      }
    ],
    "negative_controls_caught": 4,
    "negative_controls_total": 4,
    "properties_checked": 159,
    "properties_failed": 0,
    "proven_invariants": [
      "C11 ABI 401/402 constants, exact struct size/offsets of VericullLexStats, VericullClaim, VericullReport and VericullReport402, haystack cap <= INT32_MAX, lookahead headroom, binary32 token_count + 2 exactness",
      "has_bytes(len, pos, n) exact equivalence to 64-bit unsigned pos + n <= len for all 2^96 uint32 triples",
      "effective_lang(trusted_mode, claim_hint) isolation: VERICULL_LANG_TEXT (7) reachable iff trusted_mode == 7",
      "js_line_terminator_len(buf, limit, k) memory-safe LF/CR/U+2028/U+2029 lookahead over all symbolic 8-byte buffers with k + ret <= limit",
      "skip_line_splices(buf, hlen, pos) bounded C phase-2 backslash-LF/CRLF splice skipping with monotone bounds pos <= end_pos <= hlen and postcondition termination",
      "static_invariant_polarity_ok (bounded proof over num_claims == 2 and hlen <= VERICULL_MAX_HAYSTACK_LEN) requires both positive and wide negative claims with no unsigned span underflow"
    ],
    "status": "PASS",
    "tool": "6.11.0 (cbmc-6.11.0)",
    "unwind_properties_checked": 1,
    "unwind_properties_failed": 0
  },
  "generated_on": "2026-11-23",
  "native_source_files": {
    "include/vericull_core.h": "140b7c680461a63c8d0774f5eee73d871541a5f74851700ddfb958005f274ad1",
    "native/vericull_core.cpp": "75cfaab080c8de25bb447bc583a9f93c5bb29cb24d953fb5142f61ceeb2412bd"
  },
  "native_source_sha256": "62d78d138c315e15297136f475d9cb75d71f3d2ba713fe1e3680ffcd0a8c0d01",
  "native_source_sha256_formula": "SHA-256(include/vericull_core.h + \"\\n\" + native/vericull_core.cpp)",
  "schema": "vericull.formal-verification.v1",
  "scope_and_limitations": [
    "CBMC 6.11.0 (--json-ui --unwind 10 --unwinding-assertions) verifies unmodified include/vericull_core.h directly plus C11 transcriptions of 6 live functions (has_bytes, claim_hint_lang, effective_lang, js_line_terminator_len, skip_line_splices, static_invariant_polarity_ok) verified via bidirectional normalized function-body equality against native/vericull_core.cpp. Bounded proofs cover 8-byte symbolic buffers for js_line_terminator_len and skip_line_splices and num_claims == 2 for static_invariant_polarity_ok. Every targeted fault-injection control fails the exact expected assertion/pointer-dereference property IDs with 0 .unwind. failures. Apple libc++ STL templates (<vector>, <cmath>) and C++17 lambda exception guards in native/vericull_core.cpp remain outside CBMC's C++ parser (LIM-05).",
    "Z3 5.3.3 (-T:60 -memory:2048, killpg) proves 7 universal mathematical, bitvector, DAG-termination, and ABI-402 verdict-dominance theorems with 7 paired falsified-axiom controls. VC_R04_wilson_quorum_guards proves the exact rational Wilson model separately from production ABI binary32 wilson_ci95_f32 (110/199,994 nearest-boundary disagreements for n in 4..100000, LIM-07). N8_microdollar_exact_int64 proves int64 range and order isomorphism over normalized (int_part, frac_part) pairs.",
    "Clang ASan+UBSan compiles and executes completely unmodified native/vericull_core.cpp linked against unmodified tests/formal/asan_boundary_harness.c over 2,048 deterministic seeded boundary vectors (21,232 assertions) plus 2 live temp-copy fault-injection controls (R3-15 reachability removal and claim_hint_lang TEXT bypass). Bounded dynamic sanitization demonstrates zero crashes or UB on those inputs and is not an unbounded soundness proof of the full C++17 lexer or Aho-Corasick automaton."
  ],
  "source_transcription_sync": {
    "functions": [
      {
        "c_harness_function": "vc_has_bytes",
        "cpp_function": "has_bytes",
        "normalized_body_sha256": "4ba5ac9c0029dc2acacb8a2ce82f0c7b43bf330ca60dd1b7eef68212c60fa4e6"
      },
      {
        "c_harness_function": "vc_claim_hint_lang",
        "cpp_function": "claim_hint_lang",
        "normalized_body_sha256": "72d6ae6aaa236f127242cfde80ad7d164f1ef26abce9c61ad94f8f1a9457a1b3"
      },
      {
        "c_harness_function": "vc_effective_lang",
        "cpp_function": "effective_lang",
        "normalized_body_sha256": "a2a807616b6d57225e44c537ba4f48414380b4b89f0f8268476e4f30bcee6f16"
      },
      {
        "c_harness_function": "vc_js_line_terminator_len",
        "cpp_function": "js_line_terminator_len",
        "normalized_body_sha256": "b06f7032a60dc74bdd2e6691da88c19a4a264fb95ac0b58f872f31f20a0e8e56"
      },
      {
        "c_harness_function": "vc_skip_line_splices",
        "cpp_function": "skip_line_splices",
        "normalized_body_sha256": "4b3e2d2f8b917e99be60167762b7e8719dffcc25847c6c194eb95c12fd7b3fd8"
      },
      {
        "c_harness_function": "vc_static_invariant_polarity_ok",
        "cpp_function": "static_invariant_polarity_ok",
        "normalized_body_sha256": "3de425376237c0cea0ed45a010c29c7ffca842990e1a8c6dfda278b739d1990e"
      }
    ],
    "method": "bidirectional_normalized_function_body_comparison",
    "verified": true
  },
  "summary": {
    "asan_ubsan_assertions": 21232,
    "asan_ubsan_vectors": 2048,
    "cbmc_properties_checked": 159,
    "cbmc_properties_failed": 0,
    "cbmc_unwind_properties_failed": 0,
    "negative_controls_caught": 13,
    "negative_controls_total": 13,
    "status": "PASS",
    "wilson_binary32_vs_rational_disagreements": 110,
    "z3_theorems_proven": 7
  },
  "wilson_binary32_vs_rational_boundary": {
    "contract_note": "Production ABI 401/402 enforces deterministic IEEE-754 binary32 arithmetic (wilson_ci95_f32 / stage_quorum) identical across C++17, Python and JavaScript. Z3 VC_R04_wilson_quorum_guards proves the exact rational mathematical model separately; the two contracts differ on the recorded boundary pairs due to binary32 rounding.",
    "disagreement_pairs_k_n": [
      [
        2925,
        5702
      ],
      [
        3802,
        7435
      ],
      [
        4645,
        9103
      ],
      [
        5412,
        10622
      ],
      [
        6761,
        13296
      ],
      [
        7244,
        14254
      ],
      [
        8260,
        16270
      ],
      [
        9553,
        18837
      ],
      [
        10418,
        20555
      ],
      [
        10940,
        21592
      ],
      [
        11244,
        22196
      ],
      [
        12908,
        25503
      ],
      [
        15039,
        29740
      ],
      [
        15846,
        31345
      ],
      [
        15937,
        31526
      ],
      [
        16028,
        31707
      ],
      [
        16488,
        32622
      ],
      [
        17143,
        33925
      ],
      [
        18004,
        35638
      ],
      [
        18198,
        36024
      ],
      [
        19385,
        38386
      ],
      [
        20921,
        41443
      ],
      [
        21552,
        42699
      ],
      [
        21871,
        43334
      ],
      [
        22192,
        43973
      ],
      [
        23280,
        46139
      ],
      [
        23501,
        46579
      ],
      [
        24394,
        48357
      ],
      [
        24847,
        49259
      ],
      [
        25189,
        49940
      ],
      [
        26465,
        52481
      ],
      [
        26700,
        52949
      ],
      [
        26818,
        53184
      ],
      [
        27055,
        53656
      ],
      [
        28255,
        56046
      ],
      [
        28376,
        56287
      ],
      [
        28620,
        56773
      ],
      [
        28742,
        57016
      ],
      [
        28987,
        57504
      ],
      [
        29110,
        57749
      ],
      [
        29357,
        58241
      ],
      [
        29481,
        58488
      ],
      [
        29605,
        58735
      ],
      [
        29729,
        58982
      ],
      [
        31241,
        61994
      ],
      [
        32399,
        64301
      ],
      [
        32529,
        64560
      ],
      [
        33446,
        66387
      ],
      [
        33578,
        66650
      ],
      [
        33711,
        66915
      ],
      [
        34376,
        68240
      ],
      [
        34510,
        68507
      ],
      [
        34644,
        68774
      ],
      [
        34779,
        69043
      ],
      [
        34914,
        69312
      ],
      [
        35049,
        69581
      ],
      [
        35184,
        69850
      ],
      [
        35455,
        70390
      ],
      [
        35591,
        70661
      ],
      [
        35864,
        71205
      ],
      [
        36275,
        72024
      ],
      [
        36689,
        72849
      ],
      [
        37104,
        73676
      ],
      [
        37383,
        74232
      ],
      [
        38084,
        75629
      ],
      [
        38507,
        76472
      ],
      [
        38649,
        76755
      ],
      [
        38791,
        77038
      ],
      [
        39936,
        79320
      ],
      [
        40225,
        79896
      ],
      [
        40370,
        80185
      ],
      [
        40806,
        81054
      ],
      [
        41244,
        81927
      ],
      [
        41391,
        82220
      ],
      [
        43322,
        86069
      ],
      [
        43472,
        86368
      ],
      [
        44076,
        87572
      ],
      [
        44077,
        87574
      ],
      [
        44228,
        87875
      ],
      [
        44379,
        88176
      ],
      [
        44684,
        88784
      ],
      [
        44837,
        89089
      ],
      [
        45143,
        89699
      ],
      [
        45296,
        90004
      ],
      [
        45450,
        90311
      ],
      [
        45451,
        90313
      ],
      [
        45604,
        90618
      ],
      [
        45758,
        90925
      ],
      [
        45759,
        90927
      ],
      [
        46067,
        91541
      ],
      [
        46222,
        91850
      ],
      [
        46377,
        92159
      ],
      [
        46378,
        92161
      ],
      [
        46689,
        92781
      ],
      [
        47001,
        93403
      ],
      [
        47002,
        93405
      ],
      [
        47158,
        93716
      ],
      [
        47629,
        94655
      ],
      [
        47630,
        94657
      ],
      [
        47787,
        94970
      ],
      [
        47944,
        95283
      ],
      [
        48103,
        95600
      ],
      [
        48420,
        96232
      ],
      [
        48578,
        96547
      ],
      [
        48579,
        96549
      ],
      [
        48897,
        97183
      ],
      [
        49057,
        97502
      ],
      [
        49217,
        97821
      ],
      [
        49698,
        98780
      ],
      [
        50020,
        99422
      ]
    ],
    "disagreement_pairs_sha256": "88ecd8548a2ccf439da3a4e1e15f91009c51b09bd9bf2f87471e77a944a8ef0d",
    "disagreements_count": 110,
    "n_range": [
      4,
      100000
    ],
    "nearest_boundary_pairs_checked": 199994
  },
  "z3": {
    "negative_controls": [
      {
        "caught": true,
        "expected": "sat",
        "id": "NC_Z3_1_has_bytes_wrap",
        "observed": "sat"
      },
      {
        "caught": true,
        "expected": "sat",
        "id": "NC_Z3_2_action_gap_at_030",
        "observed": "sat"
      },
      {
        "caught": true,
        "expected": "sat",
        "id": "NC_Z3_3_wilson_drop_k_le_n_guard",
        "observed": "sat"
      },
      {
        "caught": true,
        "expected": "sat",
        "id": "NC_Z3_4_microdollar_13_digits_overflows_int64",
        "observed": "sat"
      },
      {
        "caught": true,
        "expected": "sat",
        "id": "NC_Z3_5_lang_isolation_broken",
        "observed": "sat"
      },
      {
        "caught": true,
        "expected": "sat",
        "id": "NC_Z3_6_tree_cycle_nontermination",
        "observed": "sat"
      },
      {
        "caught": true,
        "expected": "sat",
        "id": "NC_Z3_7_ambiguity_bypass_to_impact",
        "observed": "sat"
      }
    ],
    "negative_controls_caught": 7,
    "negative_controls_total": 7,
    "smt2_file": "tests/formal/z3_invariants.smt2",
    "smt2_sha256": "91fd5d51364d40af8374db7a2730a475f0246dedb8de953bd2fb8a3797d60588",
    "status": "PASS",
    "theorems": [
      {
        "expected": "unsat",
        "id": "N3_has_bytes_no_wrap",
        "observed": "unsat",
        "proven": true
      },
      {
        "expected": "unsat",
        "id": "VC_R02_action_partition",
        "observed": "unsat",
        "proven": true
      },
      {
        "expected": "unsat",
        "id": "VC_R04_wilson_quorum_guards",
        "observed": "unsat",
        "proven": true
      },
      {
        "expected": "unsat",
        "id": "N8_microdollar_exact_int64",
        "observed": "unsat",
        "proven": true
      },
      {
        "expected": "unsat",
        "id": "N5_lang_isolation",
        "observed": "unsat",
        "proven": true
      },
      {
        "expected": "unsat",
        "id": "VC_R02_tree_acyclic_depth_bound",
        "observed": "unsat",
        "proven": true
      },
      {
        "expected": "unsat",
        "id": "ABI402_verdict_dominance_and_ambiguity_hold",
        "observed": "unsat",
        "proven": true
      }
    ],
    "theorems_proven": 7,
    "tool": "Z3 version 5.3.3 - 64 bit"
  }
}
