Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions sources/unitsml-36812-general/document.adoc
Original file line number Diff line number Diff line change
@@ -1,24 +1,29 @@
= UnitsML — Part 1: General — procedures, terms and conformance language
= UnitsML general
:docnumber: 36812
:edition: 1
:revdate: 2026-10-30
:ref-docnumber: CC 36812:2026(E)
:copyright-year: 2026
:revdate: 2026-11-01
:language: en
:title-intro-en: UnitsML
:title-main-en: Part 1: General — procedures, terms and conformance language
:script: Latn
:title: UnitsML specifications -- General
:doctype: standard
:docstage: 20
:mn-document-class: iso
:mn-output-extensions: xml,html,doc,pdf
:imagesdir: images
:status: draft-standard
:committee: CalConnect
:committee-type: technical
:mn-document-class: ribose
:docfile: document.adoc
:mn-output-extensions: xml,html,doc
:local-cache-only:
:data-uri-image:

include::sections/00-foreword.adoc[]

include::sections/00-introduction.adoc[]

include::sections/01-scope.adoc[]

include::sections/02-norm-refs.adoc[]
include::sections/02-normrefs.adoc[]

include::sections/03-terms.adoc[]

Expand All @@ -38,4 +43,4 @@ include::sections/aa-series-map.adoc[]

include::sections/ab-test-suite.adoc[]

include::sections/99-bibliography.adoc[]
include::sections/98-bibliography.adoc[]
2 changes: 1 addition & 1 deletion sources/unitsml-36812-general/sections/00-foreword.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

This part of the UnitsML specification series establishes the register procedures, the normative vocabulary, the artifact discipline and the release procedures that every other part assumes. It is the root of the series: every other part cites it for requirement language and procedures and carries no duplicate of that content.

The series is developed within the UnitsML program. The program dependency graph and stage gates are tracked in unitsml/unitsml-ruby#95. This edition restructures the series to the ISO document pattern: scope, normative references, terms, conventions, technical clauses with worked examples and expected outcomes, a conformance clause, and informative test-suite annexes.
The series is developed within the UnitsML program. The program dependency graph and stage gates are tracked in unitsml/unitsml-ruby#95. The series is specified in the ribose document flavor: each part states its model normatively (LML where the content is a data model, PARG where it is a grammar), carries worked examples with expected outcomes, and is gated by the register validator and the frozen corpora.
2 changes: 1 addition & 1 deletion sources/unitsml-36812-general/sections/01-scope.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This document specifies:

- the procedures of the UnitsML specification register: document numbering, types, lifecycle and amendment rules;
- the normative vocabulary of the series and the requirement language (MUST/SHOULD/MAY);
- the normative vocabulary of the series and the binding of statements to conformance classes;
- the artifact discipline: checksums, editions, and the binding between normative parts and their conformance corpora;
- the release and distribution procedures for the data register and its downstream packages.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@

The following documents are referred to in the text in such a way that some or all of their content constitutes requirements of this document.

* [[[rfc2119,nofetch(RFC 2119)]]], _Key words for use in RFCs to Indicate Requirement Levels_
* [[[rfc8174,nofetch(RFC 8174)]]], _Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words_
* [[[jcgm200,JCGM 200:2012]]], _International vocabulary of metrology — Basic and general concepts and associated terms (VIM)_
* [[[jcgm100,JCGM 100:2008]]], _Evaluation of measurement data — Guide to the expression of uncertainty in measurement (GUM)_
2 changes: 0 additions & 2 deletions sources/unitsml-36812-general/sections/03-terms.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

For the purposes of this document, the following terms and definitions apply.

ISO and IEC maintain terminology databases for use in standardization at https://www.iso.org/obp and https://www.iec.ch/harmonized-terminology-database.

artifact::
versioned, checksummed, language-independent file produced from a normative source (grammar, register, schema, corpus) and consumed by implementations without modification. Artifact bytes are authoritative; consumers verify checksums before use.

Expand Down
4 changes: 2 additions & 2 deletions sources/unitsml-36812-general/sections/04-conventions.adoc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
== Conventions

The key words MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD, SHOULD NOT, RECOMMENDED, NOT RECOMMENDED, MAY, and OPTIONAL are to be interpreted as described in RFC 2119 and RFC 8174. A requirement binds an implementation only within the conformance class it claims (CalConnect 36819).
Normative statements are declarative: the document states what implementations do and what invariants hold, and an implementation that does otherwise does not conform. A statement binds an implementation only within the conformance class it claims (CalConnect 36819).

[example]
A TypeScript runtime that replays the parse/render and conversion corpora but no evaluator vectors claims class `quantity-conversion`; it MAY not advertise evaluation.
A TypeScript runtime that replays the parse/render and conversion corpora but no evaluator vectors claims class `quantity-conversion`; it does not advertise evaluation.

Single-source normativity: a normative rule is stated in exactly one part of the series; other parts cite it. Restating a rule from another part is an editorial defect corrected on sight.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
== Conformance language

MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD, SHOULD NOT, RECOMMENDED, NOT RECOMMENDED, MAY, OPTIONAL per RFC 2119/8174.
Statements are declarative; requirement strength comes from precision and from the corpus vectors that test them.

[example]
*Interpretation.* "Conversions with `exact="true"` MUST be computed in exact rational arithmetic" (CalConnect 36816: an implementation returning 0.1 as a binary float for a declared-exact tenth is non-conforming, and the violation is detectable by byte comparison of the serialized decimal string.
*Interpretation.* "Conversions with `exact="true"` are computed in exact rational arithmetic" (CalConnect 36816: an implementation returning 0.1 as a binary float for a declared-exact tenth is non-conforming, and the violation is detectable by byte comparison of the serialized decimal string.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
== Artifact discipline

Every artifact carries a checksum; consumers MUST verify it before load. Every artifact records its edition (source revision and generation date). Grammars, the register dataset, model schemas and corpora are artifacts; per-language engines are not. A change to artifact content regenerates the artifact and its conformance corpus in the same change.
Every artifact carries a checksum; consumers verify it before load. Every artifact records its edition (source revision and generation date). Grammars, the register dataset, model schemas and corpora are artifacts; per-language engines are not. A change to artifact content regenerates the artifact and its conformance corpus in the same change.

[example]
*Expected outcome.* The asciiunits artifact ships `artifacts/unitsml.json` with a checksum file. A consumer loading the artifact with a stale checksum aborts with a typed load error — not a warning — because grammar and behavior are bound to the bytes.
6 changes: 3 additions & 3 deletions sources/unitsml-36812-general/sections/ab-test-suite.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
== Annex B (informative): additional test-suite examples

[example]
*Release-chain integrity.* After the worked release of Clause 8, a consumer pinning `[email protected]` MUST observe: 178 currencies; `getById("cur:EUR")` → Euro (ISO numeric 978); the joule's `quantity_references` containing exactly one `primary: true` entry, `NISTq17` (energy); and 6 quantities carrying `equivalence_class: "energy"`.
*Release-chain integrity.* After the worked release of Clause 8, a consumer pinning `[email protected]` observes: 178 currencies; `getById("cur:EUR")` → Euro (ISO numeric 978); the joule's `quantity_references` containing exactly one `primary: true` entry, `NISTq17` (energy); and 6 quantities carrying `equivalence_class: "energy"`.

[example]
*Checksum failure.* Modifying one byte of `artifacts/unitsml.json` without regenerating `checksums` MUST abort the load with the typed checksum error in every runtime.
*Checksum failure.* Modifying one byte of `artifacts/unitsml.json` without regenerating `checksums` aborts the load with the typed checksum error in every runtime.

[example]
*Amendment trace.* A reader of Published CalConnect 36814 following an amendment MUST find the Amendment entry referenced from the part's revision history; an unamended content change between releases is a register defect.
*Amendment trace.* A reader of Published CalConnect 36814 following an amendment finds the Amendment entry referenced from the part's revision history; an unamended content change between releases is a register defect.
25 changes: 15 additions & 10 deletions sources/unitsml-36813-numeric/document.adoc
Original file line number Diff line number Diff line change
@@ -1,24 +1,29 @@
= UnitsML — Part 2: Numeric and serialization contract
= UnitsML numeric contract
:docnumber: 36813
:edition: 1
:revdate: 2026-10-30
:ref-docnumber: CC 36813:2026(E)
:copyright-year: 2026
:revdate: 2026-11-01
:language: en
:title-intro-en: UnitsML
:title-main-en: Part 2: Numeric and serialization contract
:script: Latn
:title: UnitsML specifications -- Numeric Contract
:doctype: standard
:docstage: 20
:mn-document-class: iso
:mn-output-extensions: xml,html,doc,pdf
:imagesdir: images
:status: draft-standard
:committee: CalConnect
:committee-type: technical
:mn-document-class: ribose
:docfile: document.adoc
:mn-output-extensions: xml,html,doc
:local-cache-only:
:data-uri-image:

include::sections/00-foreword.adoc[]

include::sections/00-introduction.adoc[]

include::sections/01-scope.adoc[]

include::sections/02-norm-refs.adoc[]
include::sections/02-normrefs.adoc[]

include::sections/03-terms.adoc[]

Expand All @@ -38,4 +43,4 @@ include::sections/10-conformance.adoc[]

include::sections/ab-test-suite.adoc[]

include::sections/99-bibliography.adoc[]
include::sections/98-bibliography.adoc[]
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
== Exact rational arithmetic

Conversions declared `exact="true"` (CalConnect 36816, scale and difference arithmetic (CalConnect 36815, Type A statistics, and all rational operations of propagation MUST be computed in exact rational arithmetic. An implementation MUST NOT round an intermediate exact value.
Conversions declared `exact="true"` (CalConnect 36816, scale and difference arithmetic (CalConnect 36815, Type A statistics, and all rational operations of propagation are computed in exact rational arithmetic; an implementation never rounds an intermediate exact value.

Irrational results — square roots of non-square rationals, Student-t quantiles — MUST be computed by the declared algorithm of Clause 7 or refused. An implementation MUST NOT produce them through a floating-point shortcut.
Irrational results — square roots of non-square rationals, Student-t quantiles — are computed by the declared algorithm of Clause 7 or refused — never through a floating-point shortcut.

[example]
*Expected outcome.* Converting 32 °F to kelvin: the factor 5/9 and the offset arithmetic run in rationals; the serialized result is exactly `"273.15"`. A float path would emit platform-dependent digits at the tail.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
== Decimal-string representation

Numbers crossing a serialization boundary MUST be decimal strings. IEEE-754 values MUST NOT appear in any artifact, corpus or API result of this series. Decimal strings preserve:
Numbers crossing a serialization boundary are decimal strings. IEEE-754 values never appear in any artifact, corpus or API result of this series. Decimal strings preserve:

- the author's text verbatim in record positions — rounding is the author's act (JCGM 100:2008, 7.2.2);
- the exact rational value elsewhere: integer strings for integral rationals, `p/q` rationals where the register uses them, and fixed-decimal strings with declared guard digits for non-exact results.

[example]
*Verbatim preservation.* The author writes `2.10`; the record, every render and every vector carry `"2.10"`. `"2.1"` is a different author text and MUST NOT replace it.
*Verbatim preservation.* The author writes `2.10`; the record, every render and every vector carry `"2.10"`. `"2.1"` is a different author text and never replaces it.

[example]
*Register rationals.* The register carries the litre as `factor: '0.001'` and degree Fahrenheit as `factor: 5/9`, `offset: 229835/900` — exact by construction. Conforming conversions reproduce these strings on round-trip.
2 changes: 1 addition & 1 deletion sources/unitsml-36813-numeric/sections/07-t-quantile.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
== The t-quantile algorithm

Coverage factors from the Student-t distribution at probability p with ν degrees of freedom MUST be computed by Newton iteration on the regularized incomplete beta function at fixed precision, with a published monotone error bound. The algorithm identity and version MUST be stamped in every result and vector metadata (`numeric_algorithm`).
Coverage factors from the Student-t distribution at probability p with ν degrees of freedom are computed by Newton iteration on the regularized incomplete beta function at fixed precision, with a published monotone error bound. The algorithm identity and version are stamped in every result and vector metadata (`numeric_algorithm`).

[example]
*Expected outcome.* For p = 0.95, ν = 16: k = 2.119905…, published to the vector's declared decimals with `numeric_algorithm: "unitsml-t-newton-1"`. A conforming TypeScript runtime emits the same bytes as the Ruby reference for the same stamp. Substituting a table-based or library quantile without restamping is non-conforming.
2 changes: 1 addition & 1 deletion sources/unitsml-36813-numeric/sections/08-rounding.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

- Record nodes: no rounding by the implementation; author text is preserved verbatim.
- Vectors: published at the fixed decimal places declared per vector.
- Presentation: rounding is a presentation decision and MUST NOT feed back into stored values.
- Presentation: rounding is a presentation decision and never feeds back into stored values.

[example]
*Interpretation.* An evaluator computing u_c = 34.1839… nm for a vector declaring three decimals publishes `"34.184"`; the stored record meanwhile keeps whatever text the author wrote. Neither the author text nor the vector is altered by the presentation layer's choice to display `34 µm`.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
== Serialization contract

JSON output of conformance replays and evaluator APIs MUST be: UTF-8; fixed key order (lexicographic, defined once per schema); decimal strings for all numerics; stamped with `engine_version`, `grammar_version`, `vector_set_version`, `numeric_algorithm`. Two conforming implementations given the same input MUST emit byte-identical output.
JSON output of conformance replays and evaluator APIs are: UTF-8; fixed key order (lexicographic, defined once per schema); decimal strings for all numerics; stamped with `engine_version`, `grammar_version`, `vector_set_version`, `numeric_algorithm`. Two conforming implementations given the same input emit byte-identical output.

[example]
*Byte-identity.* Given the same conversion input, the Ruby and TypeScript runtimes emit identical JSON including key order and the trailing digits of `"127/25000"`-class rationals. Any byte difference is vector drift and blocks the release (CalConnect 36819).
4 changes: 2 additions & 2 deletions sources/unitsml-36813-numeric/sections/ab-test-suite.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
== Annex (informative): additional test-suite examples

[example]
*Exact flag discipline.* `exact="false"` percent-per-degree (`0.5729577951308232087679815481`): the result carries the declared digits, the vector declares `tolerance_d`, and the output MUST NOT contain an `exact` marker.
*Exact flag discipline.* `exact="false"` percent-per-degree (`0.5729577951308232087679815481`): the result carries the declared digits, the vector declares `tolerance_d`, and the output contains no `exact` marker.

[example]
*No float leakage.* Grep gate: no serialized corpus artifact contains a decimal exponent form (`e-17`) originating from a binary double; guard-digit strings only.

[example]
*Stamp integrity.* Two vectors with differing `numeric_algorithm` stamps MUST NOT be byte-compared against each other; the harness rejects the cross-stamp comparison.
*Stamp integrity.* Two vectors with differing `numeric_algorithm` stamps are never byte-compared against each other; the harness rejects the cross-stamp comparison.
25 changes: 15 additions & 10 deletions sources/unitsml-36814-unitsdb/document.adoc
Original file line number Diff line number Diff line change
@@ -1,24 +1,29 @@
= UnitsML — Part 3: UnitsDB — the register: data model and content rules
= UnitsML UnitsDB register
:docnumber: 36814
:edition: 1
:revdate: 2026-10-30
:ref-docnumber: CC 36814:2026(E)
:copyright-year: 2026
:revdate: 2026-11-01
:language: en
:title-intro-en: UnitsML
:title-main-en: Part 3: UnitsDB — the register: data model and content rules
:script: Latn
:title: UnitsML specifications -- Unitsdb Register
:doctype: standard
:docstage: 20
:mn-document-class: iso
:mn-output-extensions: xml,html,doc,pdf
:imagesdir: images
:status: draft-standard
:committee: CalConnect
:committee-type: technical
:mn-document-class: ribose
:docfile: document.adoc
:mn-output-extensions: xml,html,doc
:local-cache-only:
:data-uri-image:

include::sections/00-foreword.adoc[]

include::sections/00-introduction.adoc[]

include::sections/01-scope.adoc[]

include::sections/02-norm-refs.adoc[]
include::sections/02-normrefs.adoc[]

include::sections/03-terms.adoc[]

Expand All @@ -40,4 +45,4 @@ include::sections/aa-validation.adoc[]

include::sections/ab-test-suite.adoc[]

include::sections/99-bibliography.adoc[]
include::sections/98-bibliography.adoc[]
2 changes: 1 addition & 1 deletion sources/unitsml-36814-unitsdb/sections/05-collections.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
== Collections and identifiers

The register comprises `units.yaml`, `prefixes.yaml`, `dimensions.yaml`, `quantities.yaml`, `scales.yaml`, `unit_systems.yaml`, `currencies.yaml`. All collections in one release carry the SAME `schema_version`, quoted. Loaders treat units, prefixes, dimensions, quantities and unit systems as REQUIRED and currencies as OPTIONAL-IF-ABSENT; any collection that is present MUST match the uniform version.
The register comprises `units.yaml`, `prefixes.yaml`, `dimensions.yaml`, `quantities.yaml`, `scales.yaml`, `unit_systems.yaml`, `currencies.yaml`. All collections in one release carry the SAME `schema_version`, quoted. Loaders treat units, prefixes, dimensions, quantities and unit systems as required and currencies as optional-if-absent; any collection that is present matches the uniform version.

[example]
*Expected outcome.* A loader presented with units at 2.2.0 and currencies at 2.1.0 rejects the register with a version-mismatch error naming both files. A loader presented with no currencies file at all loads the five required collections and exposes an empty currency collection.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
== Schema versioning policy

The schema version moves only by maintainer decision. Additive optional fields move the minor component; removals or semantic changes move the major component. A schema version MUST be supported by the register loader before a data release can adopt it (unitsdb-ruby ≥ 2.2.12 supports 2.2.0).
The schema version moves only by maintainer decision. Additive optional fields move the minor component; removals or semantic changes move the major component. A schema version is supported by the register loader before a data release can adopt it (unitsdb-ruby ≥ 2.2.12 supports 2.2.0).

[example]
*Expected outcome.* Schema 2.2.0 added exactly two optional fields — `primary` on unit quantity references and `equivalence_class` on quantities — and every collection moved 2.1.0 → 2.2.0 in one release, with the loader support released first (unitsdb-ruby 2.2.12).
Loading
Loading