package ecma-regex
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=490218bd6293e9ac3853d8752a31f49b
sha512=7e2e32c42d5e61a95c2f03bff830e08f260e7bcb40076b2092aab3de2afca3e197dfedaa6fc1b7f2b2b46defd458ebc5edf1d60eb2dea04493ec1c371c63e6d2
doc/NORMATIVE_TEST_MATRIX.html
Normative Test Matrix
This document connects ecma-regex requirements to executable evidence.
It is downstream of:
The hierarchy states which source governs each surface. The conformance statement states what the library claims. This matrix states how those claims are credited by tests, generated evidence, or explicit exclusion policy.
This document is not a generated table dump. Generated machine-readable matrices are reproducibility inputs; this document is the stable interpretation of their current result.
Status Language
Allowed statuses in this document:
covered: executable evidence or generated evidence is wired into the conformance gate.intentional exclusion: the row is outside the OCaml public API and has a recorded reason.contract-only: the behavior is public OCaml contract, not a direct ECMA-262 requirement row.uncredited evidence: executable evidence exists but is not currently used as exact requirement-level credit.gap: a requirement has no sufficient evidence and no accepted exclusion.
covered is only valid when the evidence is connected to a committed test, tool, or generated runtime source path.
Evidence may be connected through either package-safe default tests or explicit local evidence runners. Default dune runtest is self-contained for opam --with-test; generated ledger/corpus evidence that requires cache/ or external/ is run with dune build @runtest @test/evidence.
Current Ledger Result
The current ECMA-262 RegExp coverage ledger reports:
ecma262_snapshot=2026
ledger_rows=2020
direct_requirement_rows=2018
covered_rows=1770
non_applicable_rows=248
release_blocking_open_rows=0
coverage_complete=trueInterpretation:
1770rows are credited by exact tests, adapter tests, generated UCD tests, or other executable conformance evidence.248rows are intentional exclusions with reasons: JavaScript runtime, object/prototype dispatch, constructors, dynamic method lookup, function object behavior, JavaScript callable replacers, or other host protocol behavior outside this OCaml API.2rows are container clauses, not direct requirements.- There is no current requirement row classified as a
gap.
Requirement-To-Evidence Matrix
Requirement family | Governing source | Public surface | Evidence | Status |
|---|---|---|---|---|
RegExp grammar and static syntax validation | ECMA-262 RegExp grammar and static semantics |
|
| covered |
Flag parsing and literal flag text | ECMA-262 RegExp flags and regular-expression literal grammar |
|
| covered |
Matcher core dispatch | ECMA-262 RegExp matcher algorithms |
|
| covered |
Concatenation, alternation, and result priority | ECMA-262 matcher algorithms |
|
| covered |
Assertions, anchors, lookahead, and lookbehind | ECMA-262 assertion compilation and matcher semantics |
|
| covered |
Quantifiers and empty-match behavior | ECMA-262 quantifier semantics and |
|
| covered |
Captures and named captures | ECMA-262 capturing group and named group semantics |
|
| covered |
Backreferences | ECMA-262 backreference grammar and matcher semantics |
|
| covered |
Character classes, ranges, and class escapes | ECMA-262 character-class grammar and matcher semantics |
|
| covered |
UnicodeSets string properties | ECMA-262 UnicodeSets character-class behavior |
|
| covered |
Unicode property escapes and aliases | ECMA-262 Unicode property escape rules, UCD 16.0.0 |
|
| covered |
Unicode ignore-case behavior | ECMA-262 Unicode ignore-case semantics, UCD 16.0.0 case folding |
|
| covered |
Raw ECMAScript String representation | ECMA-262 UTF-16 String model |
|
| covered |
Raw UTF-16 search, exec, captures, and slicing | ECMA-262 UTF-16 indexing and matcher semantics |
|
| covered |
| ECMA-262 global and sticky RegExp state behavior |
|
| covered |
RegExp string iterators | ECMA-262 RegExp String Iterator behavior |
|
| covered |
Search adapter | ECMA-262 search adapter semantics |
|
| covered |
Match adapter | ECMA-262 match adapter semantics |
|
| covered |
MatchAll adapter | ECMA-262 matchAll adapter semantics |
|
| covered |
Split adapter | ECMA-262 RegExp split adapter semantics |
|
| covered |
Replace and replaceAll adapters | ECMA-262 RegExp replacement and replacement-template semantics |
|
| covered |
RegExp escaping | ECMA-262 |
|
| covered |
JSON Schema regex-facing consumer behavior | JSON Schema | Consumer use of |
| covered |
OCaml result shapes and diagnostic representation | Library-defined OCaml contract |
|
| contract-only |
JavaScript object/prototype/constructor protocol | JavaScript host and object model, not the OCaml API | none | Product-surface matrix routes these rows to explicit reasons | intentional exclusion |
Negative syntax corpus extraction | test262 negative RegExp syntax cases |
|
| uncredited evidence |
Evidence Counts By Layer
Current credited layer counts:
exactness_credit_rows=1144
ucd_generated_credit_rows=366
covered_by_search_adapter=16
covered_by_match_adapter=25
covered_by_match_all_adapter=16
covered_by_split_adapter=52
covered_by_replace_adapter=119
covered_by_escape_adapter=32Current generated UCD evidence:
ucd_version=16.0.0
ucd_generated_case_rows=366
ucd_coverage_credit_rows=366
ucd_alcotest_cases=17Current raw UTF-16 inventory:
raw_utf16_rows=35
raw_utf16_covered=32
raw_utf16_open=0
raw_utf16_non_applicable_with_reason=3
raw_utf16_generated_cases=1625Current JSON Schema regex-facing corpus:
corpus_cases=187
observed_pass=187
observed_fail=0
remaining_failure_worklist_rows=0Current negative syntax corpus:
negative_compile_cases=410
executable_evidence_rows=410
requirement_linked_rows=0
coverage_credit_rows=0The negative syntax corpus is executable evidence, but it is not counted as exact requirement-level credit. That is intentional for this matrix: a corpus row becomes requirement credit only after it is mapped to a specific ECMA-262 requirement row or proved to duplicate already credited evidence.
Exclusion Rules
An intentional exclusion row is valid only when all of these are true:
- the behavior belongs to JavaScript host/object protocol rather than RegExp matching semantics exposed by this OCaml API;
- the row remains visible in the product-surface matrix;
- the row has a concrete reason;
- equivalent RegExp behavior, where relevant, is tested through explicit OCaml adapter functions.
The current intentional-exclusion bucket covers JavaScript runtime embedding, constructors, subclassing, prototype mutation, dynamic method lookup, receiver coercion/object wrapping, function object metadata, JavaScript callable replacement functions, plain String prototype branches, and Annex B mutating RegExp.prototype.compile host behavior.
Completion Rule
For this repository, the matrix is complete only when:
- every direct ECMA-262 RegExp requirement row is
coveredor has an acceptedintentional exclusion; - every public OCaml contract row is either covered by tests or marked
contract-onlywith a stable API reason; - every generated Unicode claim is pinned to a Unicode version and has an executable generated gate;
- every consumer-profile claim has a corpus gate;
- every remaining executable corpus artifact that is not credited is marked
uncredited evidence, not silently counted as conformance credit.
The current matrix satisfies those rules with no gap rows.