diff --git a/sources/pm-1009/document.adoc b/sources/pm-1009/document.adoc index 180bb2b..8719d3a 100644 --- a/sources/pm-1009/document.adoc +++ b/sources/pm-1009/document.adoc @@ -30,14 +30,6 @@ include::sections/03-terms.adoc[] include::sections/04-conventions.adoc[] -include::sections/01-scope.adoc[] - -include::sections/02-normrefs.adoc[] - -include::sections/03-terms.adoc[] - -include::sections/04-conventions.adoc[] - include::sections/05-quantity-value.adoc[] include::sections/06-unit-expr.adoc[] diff --git a/sources/pm-1009/sections/10-conformance.adoc b/sources/pm-1009/sections/10-conformance.adoc index d51dade..9c1d36b 100644 --- a/sources/pm-1009/sections/10-conformance.adoc +++ b/sources/pm-1009/sections/10-conformance.adoc @@ -11,3 +11,37 @@ An implementation conforms to this document when it constructs, reduces, compare * `3 m` and `2 s` refuse with `DimensionMismatch` carrying both vectors; * the affine traps (difference vs absolute) return the stated answers, and the corpus pins them; * an unregistered symbol refuses with `UnknownUnit` naming the code. + +=== The corpus + +The vectors of this document are the quantity rows of the UnitsML testsuite. A claim names the repository, the commit and the generation below; an implementation replayed against a different commit makes a different claim. + +.Pinned corpus generations +[cols="2,3,1,3", options="headers"] +|=== +|Generation |Repository and commit |Rows |Comparison + +|`corpora/features/evaluator-reference/v1`, families `quantity-register`, `quantity-f40`, `R30-wasm-quantity` +|https://github.com/unitsml/unitsml-testsuite, commit `087e4ee60eb402d6436ae919f50a187faec2abb7` +|35 +|the request is sent verbatim; the expected wire is compared byte for byte as canonical JSON + +|`corpora/features/unitsml-quantities.json` +|same commit +|39 +|value, unit, dimension vector and scale, or the typed error class + +|`corpora/conversions/expected-conversions.json` +|same commit +|25 +|the converted value as an exact rational +|=== + +`scripts/check_feature_corpus.py` and `scripts/evaluator_reference_vectors.py check` of the testsuite verify the seals and re-derive the vectors; both exit 0 at the pinned commit. + +=== Known gaps at the pinned commit + +* The `quantity-register` family is partial: its rows are produced by the native evaluator, and an independent exact check covers 16 of its 32 identifiers. +* No source names the quantity class of `kV·A` (apparent against active power). The corpus states the reduction to the power dimension and the conversion to `kW` by dimension only; it asserts no class. Asserting or refusing a class is an open decision of this document. +* The UnitsML Ruby `Quantity#==` compares the raw value and the dimension vector without converting the scale (`10 kV * 5 A == 50 W` is true; corpus row `kva-equals-50-W-upstream-spec` and the file's `source_semantics_findings`). Clause 5 ("Equality and comparison") requires conversion to a common scale before comparison, so that row records a non-conformance of the implementation, not an acceptance vector. +* No row yet pins the comparison `3 km` against `2500 m`, the reductions of `mm·kN` and `V/Hz`, or a quantity carrying a PM 1002 uncertainty node. diff --git a/sources/pm-1009/sections/92-annex-c.adoc b/sources/pm-1009/sections/92-annex-c.adoc index 802045b..a1270b1 100644 --- a/sources/pm-1009/sections/92-annex-c.adoc +++ b/sources/pm-1009/sections/92-annex-c.adoc @@ -7,3 +7,30 @@ Each row is one corpus vector with its expected outcome frozen; the corpus is th * *Comparison.* same-dimension comparison converts the smaller scale first; cross-dimension comparison refuses with `DimensionMismatch`. * *Conversion.* factor conversions of exact operands are exact; affine conversions apply the offset to the value and never to the difference; both traps carry corpus vectors. * *The uncertainty field.* a quantity with a PM 1002 uncertainty node carries the node unchanged — no normalisation, no recomputation; the unit-dimension equality of the uncertainty is checked and refused otherwise. + +=== Vector index + +Each acceptance vector of clause 10 with the rows that pin it (generations and commit as in clause 10). "Not yet pinned" marks a vector the corpus does not yet carry. + +[cols="3,4", options="headers"] +|=== +|Vector |Rows + +|`kV·A` reduces to the power dimension at the kilo scale +|`unitsml-quantities.json`: `dim-kVxA`, `kva-product`, `conv-kva-to-w`, `conv-kva-to-kw`, `conv-w-to-kva` + +|`3 km` compares to `2500 m` after conversion +|not yet pinned (conversion only: `unitsml-quantities.json` `conv-km-to-m`, `expected-conversions.json` `km-to-m-prefix`) + +|`3 m` and `2 s` refuse with `DimensionMismatch` +|`unitsml-quantities.json`: `refuse-m-to-s`, `refuse-v-plus-s`; `evaluator-reference/v1`: `registered-dimension-mismatch-refusal` + +|the affine traps +|`unitsml-quantities.json`: `conv-degc-to-k`, `conv-k-to-degc`, `difference-degc`, `refuse-degc-to-k2`, `refuse-degc2-to-k2`; `evaluator-reference/v1`: `registered-affine-point`, `registered-affine-difference`, `registered-affine-subtraction`, `registered-affine-compound-refusal`, `registered-difference-minus-point-refusal`; `expected-conversions.json`: the `degc-*` and `k-to-degc-inverse` rows + +|an unregistered symbol refuses with `UnknownUnit` +|`evaluator-reference/v1`: `register-refusal-unknown-unit` + +|the uncertainty field is carried unchanged +|not yet pinned +|=== diff --git a/sources/pm-1010/document.adoc b/sources/pm-1010/document.adoc index 95b1715..0356ae2 100644 --- a/sources/pm-1010/document.adoc +++ b/sources/pm-1010/document.adoc @@ -30,14 +30,6 @@ include::sections/03-terms.adoc[] include::sections/04-conventions.adoc[] -include::sections/01-scope.adoc[] - -include::sections/02-normrefs.adoc[] - -include::sections/03-terms.adoc[] - -include::sections/04-conventions.adoc[] - include::sections/05-language.adoc[] include::sections/06-grammar-parg.adoc[] diff --git a/sources/pm-1010/sections/02-normrefs.adoc b/sources/pm-1010/sections/02-normrefs.adoc index 22327bc..91545bf 100644 --- a/sources/pm-1010/sections/02-normrefs.adoc +++ b/sources/pm-1010/sections/02-normrefs.adoc @@ -6,3 +6,5 @@ * [[[pm1009,nofetch(PM 1009 (quantity type system))]]] of this series — the operand types the operators consume. * [[[parsanol,nofetch(Parsanol)]]] — the PARG grammar language and toolchain compiling this document's grammar. * [[[cc36813,nofetch(CalConnect 36813 (numeric contract))]]] of the UnitsML series — the exact-decimal discipline the literals preserve. + +* [[[pm-expression-corpus,nofetch(Plurimath testsuite supporting generation)]]] — https://github.com/plurimath/plurimath-testsuite/tree/7c13256efd0ddcd88680b242b45cdedeaf3c75d5[commit 7c13256efd0ddcd88680b242b45cdedeaf3c75d5], `generations/roundtrip.yaml` and `stages/roundtrip/generations/000001` (clause 10). diff --git a/sources/pm-1010/sections/07-precedence.adoc b/sources/pm-1010/sections/07-precedence.adoc index f869291..3890691 100644 --- a/sources/pm-1010/sections/07-precedence.adoc +++ b/sources/pm-1010/sections/07-precedence.adoc @@ -1,28 +1,28 @@ - == The precedence chain +== The precedence chain - === The full chain +=== The full chain - The grammar states one precedence chain, extending PM 1004's arithmetic chain upward with the logical levels: +The grammar states one precedence chain, extending PM 1004's arithmetic chain upward with the logical levels: .The precedence chain of the expression language [cols="1,4", options="headers"] |=== |Level |Constructs -|implies -|or -|xor -|and -|comparison (`<=`, `>=`, `<`, `>`, `=`, `≠`) -|additive (`+`, `−`) -|multiplicative (implicit products, `/`, `mod`) -|unary (negation, positive sign) -|power (`^`, right-associative) -|operand (literals, names, calls, groups) +|implies |`implies` +|or |`or` +|xor |`xor` +|and |`and` +|comparison |`<=`, `>=`, `<`, `>`, `=`, `≠` +|additive |`+`, `−` +|multiplicative |implicit products, `/`, `mod` +|unary |negation, positive sign +|power |`^`, right-associative +|operand |literals, names, calls, groups |=== - Each level parses the next as its operand; every level except the power folds left-associatively. The chain is the superset of PM 1004's: an expression PM 1004 accepts parses to the same arithmetic tree here, and the logical levels above it extend, never reorder. +Each level parses the next as its operand; every level except the power folds left-associatively. The chain is the superset of PM 1004's: an expression PM 1004 accepts parses to the same arithmetic tree here, and the logical levels above it extend, never reorder. - [example] - `a <= b and c < d implies ok`. - *Expected outcome.* parsed as `(a <= b) and (c < d)` implies `ok` — the comparison binds tighter than `and`, and `implies` binds loosest, right-associatively. +[example] +`a <= b and c < d implies ok`. +*Expected outcome.* parsed as `(a <= b) and (c < d)` implies `ok` — the comparison binds tighter than `and`, and `implies` binds loosest. diff --git a/sources/pm-1010/sections/09-round-trip.adoc b/sources/pm-1010/sections/09-round-trip.adoc index e8d4133..6c7f2be 100644 --- a/sources/pm-1010/sections/09-round-trip.adoc +++ b/sources/pm-1010/sections/09-round-trip.adoc @@ -11,3 +11,11 @@ Where a notation cannot carry a construct, the render states the loss (the forma [example] `2.10 + x` rendered to the formats and re-parsed. *Expected outcome.* the trailing zero survives the render and the re-parse in every round-tripping format; the corpus asserts the AST equality per format. + +=== Reading the pinned evidence + +The supporting generation and row identifiers are listed in clause 10. +Its per-target `lossless`, loss and refusal fields delimit the demonstrated +round trips. They neither establish all new expression constructs in every +format nor establish preservation after editing in an external document +application. diff --git a/sources/pm-1010/sections/10-conformance.adoc b/sources/pm-1010/sections/10-conformance.adoc index c374faa..d043011 100644 --- a/sources/pm-1010/sections/10-conformance.adoc +++ b/sources/pm-1010/sections/10-conformance.adoc @@ -10,3 +10,61 @@ An implementation conforms to this document when it parses exactly the construct * the precedence chain parses the Annex A examples to the stated trees; * every static diagnostic of the corpus carries the node and the expected types; * the artifact checksums match the published artifacts, per runtime. + +=== Pinned supporting generations + +The supporting corpus is `plurimath/plurimath-testsuite` at commit +`7c13256efd0ddcd88680b242b45cdedeaf3c75d5` (BSD-2-Clause, `LICENSE`). +The immutable round-trip generation is +`stages/roundtrip/generations/000001`, listed in `generations/roundtrip.yaml`: +9 payloads, 46 rows, snapshot digest +`sha256:7ee63e894f86a139899623f2b04f32228893ea3b0f77da55333c2927b630c337`. +Its `provenance.yaml` names the producer, dependency versions and generator: +`plurimath/plurimath` commit `2967dcc47a9f37d5b9a2dd13d94a2ad35d4cc256`, +`scripts/roundtrip_cases.rb`. A generation is not regenerated in place. + +The generation records AsciiMath, UnicodeMath and MathML source cases and +per-target AsciiMath, UnicodeMath, MathML and OMML outcomes. Each outcome +states exact output and losslessness, a stated loss, or a refusal. Replay +uses that outcome rather than assuming every target is lossless. + +.Supporting round-trip rows +[cols="2,3", options="headers"] +|=== +|Payload under `payloads/` |Row identifiers and purpose + +|`asciimath-standard.yaml` +|`asciimath-standard.absolute`: standard uncertainty and verbatim decimals + +|`asciimath-expanded.yaml` +|`asciimath-expanded.k`: expanded uncertainty and coverage factor + +|`asciimath-coverage-interval.yaml` +|`asciimath-coverage-interval.unspecified`: interval representation, with each target's recorded outcome + +|`asciimath-invalid.yaml` +|`asciimath-invalid.zero-k`: refusal, not a successful round trip + +|`unicode-markers.yaml` +|`unicode-markers.standard`: UnicodeMath marker reading + +|`mathml-markers.yaml` +|`mathml-markers.standard`: MathML marker reading +|=== + +=== Coverage boundary + +This generation supplies existing uncertainty-markup round trips. It does +not establish conformance of the complete expression language: it is not a +frozen `expressions.parg` source-to-AST generation for boolean logic, +conditionals, iterators, undefined values or the complete static type pass. +Those constructs still require the grammar artifact and the `.pgtest` +generation of clause 6. No checksum or row identifier for such a generation +is asserted here. Supporting arithmetic and serialized diagnostics are +pinned by PM 1013; they do not replace static-language diagnostics. + +The repository checks are `ruby scripts/validate.rb`, +`ruby scripts/validate-stages.rb` and +`python3 scripts/validate-evaluation-profiles.py`. These validate corpus +structure and seals. An implementation's parse/write/read replay is separate +and must report the generation and the target outcomes it actually checks. diff --git a/sources/pm-1010/sections/91-annex-b.adoc b/sources/pm-1010/sections/91-annex-b.adoc index f05eef4..53022a8 100644 --- a/sources/pm-1010/sections/91-annex-b.adoc +++ b/sources/pm-1010/sections/91-annex-b.adoc @@ -3,3 +3,13 @@ A `.pgtest` case is the triple: the source, the artifact's AST, and the result where the case evaluates. The suites ride the grammar artifact; a runtime replays the triple or refuses. The form is data: the source as written, the AST as the artifact's parse states it, the result as PM 1011's evaluation states it — three fields, each checksummed with the artifact version. A case that refuses carries the diagnostic in the third field; refusals replay exactly like results. + +=== Existing data and the expression-generation gap + +The round-trip rows pinned in clause 10 are YAML, not a substitute PARG +suite. For example, `asciimath-standard.absolute` supplies source +`ustd(1.230, 0.004)` and per-format results; it checks the existing +uncertainty representation. A future expression `.pgtest` generation must +add its actual source, bound Formula tree and evaluation or diagnostic +result, with grammar and binding checksums. It must not relabel a numeric +JSON AST fixture as evidence that expression source parsed correctly. diff --git a/sources/pm-1011/document.adoc b/sources/pm-1011/document.adoc index 868f3a2..8cddc2c 100644 --- a/sources/pm-1011/document.adoc +++ b/sources/pm-1011/document.adoc @@ -30,14 +30,6 @@ include::sections/03-terms.adoc[] include::sections/04-conventions.adoc[] -include::sections/01-scope.adoc[] - -include::sections/02-normrefs.adoc[] - -include::sections/03-terms.adoc[] - -include::sections/04-conventions.adoc[] - include::sections/05-evaluation-extension.adoc[] include::sections/06-propagation.adoc[] diff --git a/sources/pm-1011/sections/06-propagation.adoc b/sources/pm-1011/sections/06-propagation.adoc index 31020a4..8bf1dab 100644 --- a/sources/pm-1011/sections/06-propagation.adoc +++ b/sources/pm-1011/sections/06-propagation.adoc @@ -6,7 +6,7 @@ For an expression f over the input quantities xᵢ, each carrying a standard unc `u_c = √( Σᵢ (∂f/∂xᵢ · uᵢ)² + 2 Σᵢ<ⱼ (∂f/∂xᵢ)(∂f/∂xⱼ) u(xᵢ,xⱼ) )` -— the partials evaluated symbolically over the expression tree or numerically at the bound point, per the stated mode. The independence term is the first sum; the correlation term is stated and carried per clause 6.4. +— the partials evaluated symbolically over the expression tree or numerically at the bound point, per the stated mode. The independence term is the first sum; the correlation term is the second sum. === The inputs diff --git a/sources/pm-1011/sections/11-conformance.adoc b/sources/pm-1011/sections/11-conformance.adoc index f2e0bc6..fdaa7bd 100644 --- a/sources/pm-1011/sections/11-conformance.adoc +++ b/sources/pm-1011/sections/11-conformance.adoc @@ -14,3 +14,63 @@ An implementation conforms to this document at the class its corpus generation p === The acceptance A conformance claim names the classes and the corpus generations. The classes are independent: arithmetic-only conformance is PM 1004's, unchanged; each new class stands on PM 1009 and this document's clauses for that class. + +=== The corpus + +A claim names the repository, the commit and the generations below, per class. The evaluator-reference generation sends each request verbatim and compares the expected wire byte for byte as canonical JSON; a stochastic row replays only with the identical method, generator and seeds, and `precision=approximate` marks a declared approximation, not a looser comparison. + +.Pinned corpus generations (https://github.com/unitsml/unitsml-testsuite, commit `087e4ee60eb402d6436ae919f50a187faec2abb7`) +[cols="1,3,1", options="headers"] +|=== +|Class |Generation and families |Rows + +|arithmetic +|`corpora/features/evaluator-reference/v1`: `numeric-v1`, `numeric-supplemental-v1`, `numeric-validation-v1`, `numeric-bignum-v1`, `numeric-nonfinite-v1`, `numeric-annex-h` +|204 + +|quantity +|35 UnitsML rows from `corpora/features/evaluator-reference/v1`: `quantity-register`, `quantity-f40`, `R30-wasm-quantity`; plus the PM 1009 rows + +|propagation +|`corpora/features/evaluator-reference/v1`: `gum-annex`, `gum-annex-methods`, `gum-f40`, `coverage-validation`; `corpora/features/host-evaluator/v1`: the Annex H producer rows +|111 and 74 + +|second-order +|`corpora/features/evaluator-reference/v1`: `gum-mcm`, `gum-mcm-joint-rational` (the MCM comparison rows, referenced per clause 7) +|13 + +|series +|`corpora/features/host-evaluator/v1`: `series_statistics`, `grouped_statistics`, `annex_h_type_a_covariance` +|9 +|=== + +`scripts/evaluator_reference_vectors.py check` and `scripts/host_evaluator_vectors.py check` of the testsuite verify the seals and re-derive the vectors; both exit 0 at the pinned commit. The acceptance record of each family is `corpora/features/evaluator-reference/v1/acceptance.json`. + +=== The GUM worked examples in the corpus + +[cols="1,4", options="headers"] +|=== +|Example |Rows + +|H.1 +|`gum-annex`: `h1-lpu-analytic` +|H.2 +|`gum-annex-methods`: `h2-derived-vector`, `h2-correlations`, `h2-derived-observations`; `host-evaluator/v1`: `producer-00` to `producer-03` +|H.3 +|`gum-annex-methods`: the `h3-fit-*`, `h3-predict-*`, `h3-correlation-*` and `h3-refusal-*` rows +|H.4 +|`gum-annex-methods`: `h4-derived-covariance`, `h4-ratio-approach`; `host-evaluator/v1`: `producer-04`, `producer-05` +|H.5 +|`host-evaluator/v1`: `producer-06` to `producer-08` +|H.6 +|`gum-annex-methods`: `h6-resolution-and-unknown-dof` +|=== + +=== Known gaps at the pinned commit + +* *H.2.* The independent exact-input arithmetic is checked, but agreement with the last digit the GUM publishes is not established; it needs the original unrounded inputs or the source's rounding convention (`acceptance.json`, `unresolved`). +* *H.1.* The `h1-lpu-analytic` row carries the second-order terms: its standard uncertainty is 33.78 nm, against 32 nm at the first order. The row reproduces the second-order figure; a first-order H.1 row is not yet pinned. +* *H.5* is pinned only by the host-evaluator producer rows; the evaluator-reference generation has no H.5 row. +* The `numeric-annex-h` rows do not record which worked example each reproduces. +* *The serialized class.* The evaluator-reference wires are produced by the Rust evaluator and re-run byte-equal by the Ruby reference for the arithmetic families; cross-runtime parity for TypeScript is not yet pinned. +* The MCM rows were not re-run in the generation; they carry the generator, the seeds and the final state of their source run, per clause 7's boundary. diff --git a/sources/pm-1011/sections/90-annex-a.adoc b/sources/pm-1011/sections/90-annex-a.adoc index dae41be..478f9b3 100644 --- a/sources/pm-1011/sections/90-annex-a.adoc +++ b/sources/pm-1011/sections/90-annex-a.adoc @@ -3,7 +3,7 @@ The mapping of the GUM's worked examples to this document's clauses: * H.1 (the gauge block, the type A and B components, the combined and expanded) — clauses 6 and 6.3, at the first order; -* H.2 (the thermometer, the correlation) — clause 6.4, the correlation term stated; +* H.2 (the thermometer, the correlation) — clause 6.1, the correlation term of the law; * H.4–H.6 — clause 6 with the mixtures of type A and B inputs; * the Amd.1 note to H.1.7 — clause 7, the second-order terms derived and documented per the corpus; * the H.1 comparison against MCM — clause 7, the LPU-adequacy verdict. diff --git a/sources/pm-1012/document.adoc b/sources/pm-1012/document.adoc index 0db44ca..2c822d5 100644 --- a/sources/pm-1012/document.adoc +++ b/sources/pm-1012/document.adoc @@ -30,14 +30,6 @@ include::sections/03-terms.adoc[] include::sections/04-conventions.adoc[] -include::sections/01-scope.adoc[] - -include::sections/02-normrefs.adoc[] - -include::sections/03-terms.adoc[] - -include::sections/04-conventions.adoc[] - include::sections/05-constraints.adoc[] include::sections/06-decision-rules.adoc[] diff --git a/sources/pm-1012/sections/02-normrefs.adoc b/sources/pm-1012/sections/02-normrefs.adoc index 0176f1f..5d98fc5 100644 --- a/sources/pm-1012/sections/02-normrefs.adoc +++ b/sources/pm-1012/sections/02-normrefs.adoc @@ -6,5 +6,5 @@ * [[[pm1004,nofetch(PM 1004 (evaluation))]]] of this series — the accuracy classes and the strict error contract. * [[[pm1009,nofetch(PM 1009 (quantity type system))]]] of this series — the quantities and the coherence. * [[[pm1011,nofetch(PM 1011 (evaluation processing))]]] of this series — the propagated results and the expanded uncertainty. -* [[[ilacg8,nofetch(ILAC-G8)]], ILAC — the guidelines on decision rules and statements of conformity — the guarded acceptance family. +* [[[ilacg8,nofetch(ILAC-G8)]]], ILAC — the guidelines on decision rules and statements of conformity — the guarded acceptance family. * [[[jcgm106,nofetch(JCGM 106)]]] — the decision-rule framing. diff --git a/sources/pm-1012/sections/10-conformance.adoc b/sources/pm-1012/sections/10-conformance.adoc index aaf1c61..fb991ea 100644 --- a/sources/pm-1012/sections/10-conformance.adoc +++ b/sources/pm-1012/sections/10-conformance.adoc @@ -11,3 +11,25 @@ An implementation conforms to this document when it evaluates constraints under * the series creeps — the residuals against the creep limits; * the boundary cases — the exact-edge comparisons per the accuracy classes; * the conditional-zone cases — the band-edge vectors per the stated k. + +=== The corpus + +A claim names the repository, the commit and the generation below. + +.Pinned corpus generation +[cols="2,3,1,3", options="headers"] +|=== +|Generation |Repository and commit |Rows |Comparison + +|`corpora/features/evaluator-reference/v1`, family `gum-conformity` +|https://github.com/unitsml/unitsml-testsuite, commit `087e4ee60eb402d6436ae919f50a187faec2abb7` +|25 +|the request is sent verbatim; the expected wire is compared byte for byte as canonical JSON +|=== + +These rows exercise the decision rules on stated tolerances: the boundary cases (`simple-upper-limit`, `three-zone-inner-upper`, `three-zone-outer-lower`, `three-zone-one-sided-open-lower`), the conditional-zone cases (`guarded-acceptance-inner-upper`, `guarded-acceptance-outside-inner`, `three-zone-past-inner-upper`, `three-zone-past-outer-lower`) and 17 producer rows (`producer-09` to `producer-25`). Each row carries the rule, the decision, the lower and upper residuals and the guard band. They are rule vectors on stated numbers, not regulation limits. + +=== Known gaps at the pinned commit + +* *The R 60 MPE ranges, the R 134 regime laws and the series creeps are not yet pinned.* No row of the UnitsML or Plurimath testsuites carries them; the acceptance vectors of the first three items of clause 10 wait for an authoritative source with its edition, clause and rights. Annexes A and B describe them for when they arrive. +* The evaluator behind the pinned rows takes the guard band from a guard ratio given separately from the coverage factor (rows with coverage factor 2 and guard ratio 1 exist), where clause 6 states the guard band as `k·U`. It also implements the rules `three_zone`, `guarded_rejection` and `iso14253_style`, which clause 6 does not name. Which of the two is normative is an open decision of this document. diff --git a/sources/pm-1012/sections/90-annex-a.adoc b/sources/pm-1012/sections/90-annex-a.adoc index c8686da..69fe19e 100644 --- a/sources/pm-1012/sections/90-annex-a.adoc +++ b/sources/pm-1012/sections/90-annex-a.adoc @@ -1,3 +1,5 @@ == Annex A: the R 60 cases The corpus's R 60 constraint cases — the MPE ranges against the propagated results, one row per case: the limit, the result with its uncertainty, the rule, the verdict, the signed residual. The annex is the reading guide; the corpus is the checkable form. + +NOTE: Not yet pinned. No testsuite generation carries these cases at the commit named in clause 10; see "Known gaps at the pinned commit". diff --git a/sources/pm-1012/sections/91-annex-b.adoc b/sources/pm-1012/sections/91-annex-b.adoc index bf144ea..c241226 100644 --- a/sources/pm-1012/sections/91-annex-b.adoc +++ b/sources/pm-1012/sections/91-annex-b.adoc @@ -1,3 +1,5 @@ == Annex B: the regime laws The R 134 regime-law cases: the guards, the regimes, and the constraints they apply — each row with the applicability record and the verdict. The laws are the corpus's; this annex is their reading order. + +NOTE: Not yet pinned. No testsuite generation carries these cases at the commit named in clause 10; see "Known gaps at the pinned commit". diff --git a/sources/pm-1013/document.adoc b/sources/pm-1013/document.adoc index 28c3f00..0987bed 100644 --- a/sources/pm-1013/document.adoc +++ b/sources/pm-1013/document.adoc @@ -30,14 +30,6 @@ include::sections/03-terms.adoc[] include::sections/04-conventions.adoc[] -include::sections/01-scope.adoc[] - -include::sections/02-normrefs.adoc[] - -include::sections/03-terms.adoc[] - -include::sections/04-conventions.adoc[] - include::sections/05-boundary.adoc[] include::sections/06-artifact-sharing.adoc[] diff --git a/sources/pm-1013/sections/02-normrefs.adoc b/sources/pm-1013/sections/02-normrefs.adoc index 0f00bb6..b7c2828 100644 --- a/sources/pm-1013/sections/02-normrefs.adoc +++ b/sources/pm-1013/sections/02-normrefs.adoc @@ -7,3 +7,6 @@ * [[[pm1012,nofetch(PM 1012 (constraint evaluation))]]] of this series — the verdicts the surface returns. * [[[parsanol,nofetch(Parsanol)]]] — the PARG toolchain; the binding declarations of parsanol#432. * [[[lutamlmodel1033,nofetch(lutaml-model #1033)]]] — the LML cross-language schema realizations. + +* [[[pm-wire-corpus,nofetch(Plurimath serialized evaluation corpus)]]] — https://github.com/plurimath/plurimath-testsuite/tree/b0d5148cba9b2373b18491cf90ba8dfe540b28ab/evaluation[commit b0d5148cba9b2373b18491cf90ba8dfe540b28ab], `evaluation/` profile manifests (clause 9). +* [[[unitsml-reference-corpus,nofetch(UnitsML evaluator reference corpus)]]] — https://github.com/unitsml/unitsml-testsuite/tree/087e4ee60eb402d6436ae919f50a187faec2abb7/corpora/features/evaluator-reference/v1[commit 087e4ee60eb402d6436ae919f50a187faec2abb7], `vectors.json`, `index.json` and `acceptance.json` (clause 9). diff --git a/sources/pm-1013/sections/09-conformance.adoc b/sources/pm-1013/sections/09-conformance.adoc index 5aaa43a..b5c564e 100644 --- a/sources/pm-1013/sections/09-conformance.adoc +++ b/sources/pm-1013/sections/09-conformance.adoc @@ -9,3 +9,125 @@ A binding conforms to this document when it drives the serialized surface per cl * the parity vectors of PM 1011's serialized class, replayed across the runtimes; * the checksum-verification refusal on a pinned-mismatched artifact; * the stamp presence and correctness on every response. + +=== Pinned serialized profiles + +The supporting serialized corpus is `plurimath/plurimath-testsuite` at +commit `b0d5148cba9b2373b18491cf90ba8dfe540b28ab` (BSD-2-Clause, +`LICENSE`). Each profile directory has `manifest.json`: it pins every +payload SHA256, row count, producer revision and the scope of recorded +runtime qualification. The JSON payloads carry stable row identifiers, +requests and canonical `expected_wire` strings. + +This pin must equal the commit of the `submodules/plurimath-testsuite` +submodule in the `plurimath/plurimath` repository; the two pins must be +changed together. The `evaluation/` tree is identical at this commit and at +the earlier pin `7c13256`. + +.Serialized supporting generations +[cols="2,2,3", options="headers"] +|=== +|Directory |Profile |Payloads + +|`evaluation/numeric-v1/` +|`plurimath.evaluate.numeric/1` +|`numeric-v1.json`, `numeric-supplemental-v1.json`, +`numeric-validation-v1.json`, `numeric-bignum-v1.json`, +`numeric-nonfinite-v1.json`, `numeric-annex-v1.json` (204 rows) + +|`evaluation/quantity-v1/` +|`plurimath.evaluate.quantity/1` +|`request-quantity-v1.json`, `quantity-register-v1.json` (62 rows) + +|`evaluation/gum-v1/` +|`plurimath.evaluate.gum/1` +|`gum-wires.json`, `coverage-validation-wires.json` (149 rows) +|=== + +The manifest SHA256 values, in table order, are: + +* numeric: `ea52ac82e1807bbd01a9b78fd9b571f747adffe6c7c59344da0fcbd958f1d4d8`; +* quantity: `3cfed5e9cf6d62ec8182e227b4125e39a3b6aca21d4deff858736d24366613fc`; +* GUM: `11c0705ec78064fcd8a6aaa59c625df44ee4c0ad896c43a70f63f79091c17e96`. + +An implementation replays the request representation supplied by each row +and compares the complete response with `expected_wire` byte for byte. +An expected refusal is an acceptance case too: preserve its diagnostic code +and any carried fields instead of substituting a successful result or +comparing the code alone. The 415 rows include 116 refusal rows; these are +serialized outcomes, not 116 distinct error classes. + +.Selected diagnostic and boundary rows +[cols="2,2,3", options="headers"] +|=== +|Payload |Row |Expected evidence + +|`numeric-v1/numeric-v1.json` +|`missing-variable`, `zero-divisor` +|`MissingVariableError`, `DivisionByZeroError` + +|`numeric-v1/numeric-v1.json` +|`sqrt-deferred`, `sqrt-guarded`, `sqrt-approximate` +|Strict deferral, declared precision and approximate boundary records, respectively + +|`numeric-v1/numeric-validation-v1.json` +|`bad-AST-before-backend-binding`, `backend-binding-after-valid-AST` +|`InvalidRequest`, `InvalidBindingError`, with the frozen validation priority + +|`quantity-v1/request-quantity-v1.json` +|`dimension-mismatch`, `syntax` +|`DimensionMismatchError`; `UnitSyntaxError` with the frozen parser details + +|`gum-v1/coverage-validation-wires.json` +|`actual-too-coarse`, `significant-digits-0` +|`UnsupportedModel`, `InvalidInput`, with the frozen messages +|=== + +Paths in this table are relative to `evaluation/`. These source-profile +error names are not automatically aliases for all diagnostics of PM 1009 +or PM 1011; an adapter claiming those interfaces must state its mapping. + +=== Reference acceptance and limits + +The companion mathematical/reference acceptance generation is +`unitsml/unitsml-testsuite` at commit +`087e4ee60eb402d6436ae919f50a187faec2abb7`, +`corpora/features/evaluator-reference/v1` (Ribose BSD 2-Clause, +`LICENSE.md`). Its 388 rows are keyed by profile and row ID and retain +`request_json`, `expected_wire`, numeric mode, method and seeds where +applicable. The `vectors.json` SHA256 is +`81687233681fa60e337f41c4177dea3cbe8ff9e0e9fc5734c556f8f455e62d9d`; +`index.json` pins source archives and producer revisions; +`acceptance.json` records the acceptance basis per family and unresolved +items. This is a companion reference generation, not 388 additional +independent tests: families overlap the serialized corpus. + +The `quantity-register` family's reference acceptance is partial; it must +not be reported as complete Ruby-reference acceptance. The recorded H.2 +publication-last-digit and named-power-class gaps remain unresolved. +Approximate values still compare with the frozen wire for that declared +profile; a mathematical tolerance is not permission to loosen byte replay. + +The supporting profiles do not cover the entire illustrative request of +clause 7, the full expression grammar, real R 60/R 134 or Primmel limit +exports, every artifact-pair mismatch, or all model realizations. They do +not alone establish full conformance to this document. A claim must name +its profile, generation, runtime and qualification scope. In particular, +the shared-core manifests' native/Ruby/Windows qualifications do not imply +that every GUM row has been replayed through a TypeScript/WASM binding; +that requires its own receipt. The model-realization dependency on +lutaml-model#1033 remains separate from numeric replay. + +=== Checking and reproducing a generation + +Run `python3 scripts/validate-evaluation-profiles.py` in the pinned +Plurimath testsuite to verify manifest inventories, payload seals, case IDs, +response envelopes and canonical wires. Run +`python3 scripts/evaluator_reference_vectors.py check` in the pinned +UnitsML testsuite to verify the companion archives and re-derive its +vectors and acceptance files. Neither command re-executes the evaluator or +proves new cross-runtime or metrological acceptance. Replay and independent +reference checks are separate receipts; the manifests and acceptance file +state which were recorded. To extend coverage, append a generation and +publish its provenance and replay evidence; never rewrite these pinned +payloads.