expressir 2.4.38-aarch64-linux → 2.4.40-aarch64-linux

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/TODO.eengine/01-resolution-diagnostics.md +6 -0
  3. data/TODO.eengine/03-entity-computations.md +6 -0
  4. data/TODO.eengine/04-shtolo-rule-audit.md +6 -0
  5. data/TODO.eengine/05-shtolo-longform-flatten.md +7 -0
  6. data/TODO.eengine/08-official-corpus-gate.md +7 -0
  7. data/TODO.eengine/09-mim-mapping-parser.md +7 -0
  8. data/TODO.max-perf/01-restore-ci-green.md +4 -0
  9. data/TODO.max-perf/02-streaming-parse-path.md +4 -0
  10. data/TODO.max-perf/03-cli-parallel-opt-in.md +4 -0
  11. data/TODO.max-perf/04-benchmark-harness.md +4 -0
  12. data/TODO.max-perf/05-parallel-fidelity-specs.md +4 -0
  13. data/TODO.max-perf/06-builder-cpu-audit.md +4 -0
  14. data/TODO.max-perf/07-upstream-parsanol-roadmap.md +4 -0
  15. data/TODO.max-perf/08-builder-build-perf.md +4 -0
  16. data/TODO.max-perf/09-grammar-cold-start.md +4 -0
  17. data/TODO.max-perf/10-parser-facade-hygiene.md +4 -0
  18. data/TODO.max-perf/11-ci-green-closeout.md +4 -0
  19. data/TODO.max-perf/12-require-boot-profile.md +12 -0
  20. data/TODO.max-perf/13-key-conversion-specs.md +11 -0
  21. data/TODO.max-perf/14-builder-call-handler-audit.md +14 -0
  22. data/TODO.p28/00-overview.md +37 -0
  23. data/TODO.p28/01-uos-writer.md +54 -0
  24. data/TODO.p28/02-uos-reader.md +50 -0
  25. data/TODO.p28/03-default-xsd.md +68 -0
  26. data/TODO.p28/04-document-envelope.md +62 -0
  27. data/TODO.sota/02-evaluator.md +0 -1
  28. data/lib/expressir/p21/dataset_manifest.rb +17 -0
  29. data/lib/expressir/p28/document.rb +138 -0
  30. data/lib/expressir/p28/uos.rb +452 -0
  31. data/lib/expressir/p28/xsd.rb +526 -0
  32. data/lib/expressir/p28.rb +29 -0
  33. data/lib/expressir/version.rb +1 -1
  34. data/lib/expressir.rb +1 -0
  35. metadata +11 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 98e51c608e0a2997a507e9984bec850e224f602fcaea99eace21910f5a630630
4
- data.tar.gz: 9a883bee4058fe2c50e8cfe0e7c1873de7a2cabde86e1e99ae1cf95f6a30276e
3
+ metadata.gz: 7f92fe333307335b3a524ec965b20749b7f86f25950a83104909836e4e6275a6
4
+ data.tar.gz: 290f12011a30a697f52e91718fa9e8f6a53fb0fae83b4e5a3bde50577cb92899
5
5
  SHA512:
6
- metadata.gz: e2854238ac8559973c77dc348d415ecb64a869123a3026a51d54f8db8fb79f64dd332ba1554b4405d01302fae4c395385c07c60d633d2557db22340c49ecd194
7
- data.tar.gz: 2c97bf3a0b958cc61abf31b5cab2b76c4bbfc4c1532917caf5484d47793c73c44d0eb96009417bee084309eba68449b52eb03e241768475979cb9d87f8cbbc2d
6
+ metadata.gz: 4c5ea85401c0762ebf0806db759bd2a28bc57ecc15c1f18bdf3b6e62fd7f03c6ce1dd6d9136b4ae69080c0c05613b6764b94d3d3f640aaeda0e7e9605767305a
7
+ data.tar.gz: 934f81b27306b7cc6637bdef4e0a841f8276b875a51b0a331a85a437fb2f27b6d807d59ae484ef765af726b2728139b7492019d420d7f40d18d63db7ea60a195
@@ -28,3 +28,9 @@ with the tiering half of 07.
28
28
  - Transitive USE chains still resolve (06's shipped behavior).
29
29
  - Cycle-guarded resolution terminates.
30
30
  - The checker flags an unresolved USE FROM resource as an error.
31
+
32
+ ## Status: done
33
+
34
+ - Transitive USE, the cycle guard and the USE/REFERENCE visibility
35
+ tiers are on main, gated by
36
+ `spec/expressir/express/parser_interface_visibility_parity_spec.rb`.
@@ -20,3 +20,9 @@ walks supertype chains ad hoc. Needed by Annex G.2.6 select synthesis
20
20
 
21
21
  - chain + multiple inheritance + redeclaration fixtures; the
22
22
  materialization matches a hand-computed table.
23
+
24
+ ## Status: done
25
+
26
+ - Inherited-attribute and closure materialization lives in
27
+ `Expressir::Express::Shtolo` (interface closure, supertype
28
+ inheritance), exercised by the Annex G audit specs.
@@ -30,3 +30,9 @@ Fixture note: `EXTENSIBLE_ENUMERATION` as a single composite keyword
30
30
  is not in the grammar and not in the corpus — the corpus writes
31
31
  `EXTENSIBLE ENUMERATION` (302×) / `EXTENSIBLE SELECT` (546×), both
32
32
  supported.
33
+
34
+ ## Status: done
35
+
36
+ - `spec/fixtures/shtolo/annex-g-rules.md` records the audited
37
+ statuses for every Annex G rule, each with a live worked example in
38
+ `spec/expressir/express/shtolo_annex_g_rule_audit_spec.rb`.
@@ -10,3 +10,10 @@ lowercases — the standard wins on divergence), add/remove-declaration
10
10
  and cleanup-interface lisps.
11
11
 
12
12
  Builds on 01 (visibility), 03 (closures), 04 (rule audit).
13
+
14
+ ## Status: done
15
+
16
+ - `Expressir::Express::Shtolo#flatten` emits the single longform
17
+ schema: interface closure copied as local declarations, ORIGINAL
18
+ names kept with references rewritten, G.NM.1 clash munging computed
19
+ over the whole closure first.
@@ -5,3 +5,10 @@ specs, with CI tiers: (a) every push — eeng bug corpus (bug39/40),
5
5
  SHTOLO rule fixtures, Part 21 grammar fixtures; (b) nightly/manual —
6
6
  SRL/SMRL full corpus differentials (pretty/flat/xml) when the eengine
7
7
  oracle is on PATH.
8
+
9
+ ## Status: done
10
+
11
+ - Official corpus gates run in CI: eeng bug corpus (bug39/bug40) as
12
+ `spec/expressir/express/formatter_eeng_parity_spec.rb` on every
13
+ push, plus the conformance/validate_schemas workflows for the
14
+ official schema corpora.
@@ -7,3 +7,10 @@ paths into a typed model: entity chains `A -> B -> C`, qualifiers
7
7
  `schemas/modules/*/mapping.yaml` (`<<express:SCHEMA.ITEM,ITEM>>` link
8
8
  markup), upstream module.xml `reference_path` bodies, the Part 1x
9
9
  mapping-annex grammar; the module corpus is the oracle.
10
+
11
+ ## Status: done
12
+
13
+ - `Expressir::Mapping::RefPath` parses and validates MIM reference
14
+ paths against real schemas (ELF 5006 §§5/8, including the §5
15
+ supertype/tree markers), with corpus differential specs; instance
16
+ level walking shipped in TODO.instance/04.
@@ -34,3 +34,7 @@ yeptris has since released 0.6.4.1 and 0.6.5.1.
34
34
  ## Acceptance
35
35
 
36
36
  rake workflow green on main across the full platform matrix.
37
+
38
+ ## Status: done
39
+
40
+ - rake is green on main across the full platform matrix (verified 2026-10-22, all legs pass).
@@ -29,3 +29,7 @@ picture (the fastest intended path is the broken one).
29
29
  Either `use_streaming: true` produces an equal model with a green spec, or
30
30
  the breakage is precisely documented upstream and the path is explicitly
31
31
  marked unsupported.
32
+
33
+ ## Status: done
34
+
35
+ - Executed as the documented-blocked alternative: the streaming builder is blocked on parsanol's stable parse_with_builder (parsanol-ruby#59), recorded in TODO.max-perf/14; the path stays marked unsupported until then.
@@ -25,3 +25,7 @@ duplicating the same orchestration (MECE violation).
25
25
 
26
26
  One multi-file loading pipeline; CLI bulk loads parse in parallel by
27
27
  default; library default remains sequential.
28
+
29
+ ## Status: done
30
+
31
+ - Multi-file loading is one pipeline with the pool path in `Expressir::Express::ParallelFiles` (lib/expressir/express/parallel_files.rb), gated by spec/expressir/express/parallel_files_spec.rb.
@@ -26,3 +26,7 @@ validation:
26
26
 
27
27
  A short benchmark run prints genuine Ruby-vs-Native numbers, terminates on
28
28
  pathological files, and labels passes truthfully.
29
+
30
+ ## Status: done
31
+
32
+ - benchmark/srl_benchmark.rb is tracked, rubocop-clean and CI-linted; CPU-time methodology recorded after the mislabeled-pass fix.
@@ -20,3 +20,7 @@ the real contract. The progress-block regression merged in #349 (double
20
20
 
21
21
  All fidelity specs green; `to_hash` of a parallel repository equals the
22
22
  sequential one for a multi-fixture corpus.
23
+
24
+ ## Status: done
25
+
26
+ - spec/expressir/express/parallel_files_spec.rb pins pool/sequential parity incl. the from_files nil-pad regression.
@@ -39,3 +39,7 @@ AST-hash → lutaml-model instantiation.
39
39
 
40
40
  A numbers table attributing Ruby-side parse CPU to phases, plus either a
41
41
  measured improvement or a precise, evidence-backed next target.
42
+
43
+ ## Status: done
44
+
45
+ - Recorded through the stage and handler audits (TODO.max-perf/08 and /14).
@@ -25,3 +25,7 @@ them. Mapping to parsanol (all upstream work; expressir only consumes):
25
25
  ## Acceptance
26
26
 
27
27
  Upstream issue filed; expressir-side dependencies on each technique noted.
28
+
29
+ ## Status: done
30
+
31
+ - Upstreamed: parsanol-ruby#59, leptris/yeptris#318, lutaml-model#798; parsanol 1.3.28's backtracking fix adopted.
@@ -43,3 +43,7 @@ builder.call (upstream territory).
43
43
  Numbers table for the three stages; either a measured improvement merged or
44
44
  the cost definitively attributed to lutaml-model instantiation (which moves
45
45
  the next step upstream to lutaml-model).
46
+
47
+ ## Status: done
48
+
49
+ - Cost definitively attributed to lutaml-model instantiation (file records the attribution).
@@ -23,3 +23,7 @@ would save ~50ms per process at the cost of temp-file staleness machinery.
23
23
 
24
24
  Cold-start number recorded; cache implemented with specs if the number
25
25
  justifies it, otherwise documented as negligible.
26
+
27
+ ## Status: done
28
+
29
+ - Cold-start number recorded in-file; cache documented as not justified.
@@ -21,3 +21,7 @@ references the latter directly) — a DRY violation with a dead constant.
21
21
 
22
22
  Facade exposes only the public contract; single source for the worker-cap
23
23
  constant.
24
+
25
+ ## Status: done
26
+
27
+ - Facade narrowed and worker-cap single-sourced; suite green (in-file record).
@@ -23,3 +23,7 @@ upstream (leptris/yeptris#318); the guard must keep it unloaded.
23
23
  ## Acceptance
24
24
 
25
25
  rake green on main; TODO 01's checkbox ticked.
26
+
27
+ ## Status: done
28
+
29
+ - Landed via #357 (17aa264 re-landed as 0576a08 after the #356 stale-base detour); rake green on main.
@@ -23,3 +23,15 @@ thor — some needed only by CLI commands, not by library consumers.
23
23
 
24
24
  Per-gem boot profile recorded; measured reduction if safely deferrable,
25
25
  otherwise documented why not.
26
+
27
+ ## Outcome (from the 2026-09-18 close-out, commit 17aa264)
28
+
29
+ - [x] Profiled: per-gem load times via a require-timing probe in a fresh
30
+ - [x] Evaluated deferrals: nothing safely deferrable (results below)
31
+ - [x] Full suite green (no deferred loads introduced)
32
+ - [x] Per-gem boot profile (fresh process, 2 runs): liquid 172-207ms, lutaml/model 327-559ms (includes moxml chain), thor 19-40ms, expressir own lib ~1ms (autoloads already optimal)
33
+ - [x] Documented as not safely deferrable: liquid backs Lutaml::Model::Liquefiable used by expressir models in metanorma rendering; lutaml-model's boot is upstream (its lazy-loading is tracked there). expressir's own load adds ~1ms — nothing to defer.
34
+
35
+ ## Status: done
36
+
37
+ - Per-gem boot profile recorded (17aa264 record transplanted below); nothing safely deferrable.
@@ -24,3 +24,14 @@ needs pinning so future edits cannot silently break it.
24
24
  ## Acceptance
25
25
 
26
26
  Dedicated spec file green; the optimization's behavior is pinned.
27
+
28
+ ## Outcome (from the 2026-09-18 close-out, commit 17aa264)
29
+
30
+ - [x] Unit specs for the converter (renamed `AstKeyConverter.convert`):
31
+ - [x] Marker invisibility: marked hashes remain == to unmarked copies and
32
+ - [x] All contract specs written against the extracted public Expressir::Express::AstKeyConverter (key conversion was promoted from a private Builder helper to its own class — MECE: converting AST keys is not building models)
33
+ - [x] Depth conversion, identity preservation, idempotence, marker set on both paths, frozen-hash safety, marker invisibility (== and Marshal), snake_case behavior — spec/expressir/express/ast_key_converter_spec.rb
34
+
35
+ ## Status: done
36
+
37
+ - spec/expressir/express/ast_key_converter_spec.rb pins the extracted AstKeyConverter contract on main.
@@ -26,3 +26,17 @@ waste in the hottest handlers (e.g., redundant intermediate arrays, repeated
26
26
 
27
27
  Handler-level numbers table; either a merged improvement or the cost
28
28
  definitively attributed to lutaml-model constructors (upstream follow-up).
29
+
30
+ ## Outcome (from the 2026-09-18 close-out, commit 17aa264)
31
+
32
+ - [x] Instrumented per handler via a self-time build wrapper (child CPU
33
+ - [x] Inspected the top handlers' source (expression_builder.rb et al.)
34
+ - [x] No evident expressir-side waste to fix (see verdict below); the
35
+ - [x] Full suite green
36
+ - [x] Handler-level instrumentation via a self-time build wrapper (child-time subtracted): 20,270 nodes, 1.58s self CPU over 3 schemas
37
+ - [x] Top handlers: expression 25.8% (3,184 calls), syntax 15.4%, entity_ref 7.7%, simple_expression 6.0%, entity_decl 5.1% — long tail of leaf handlers below 4% each
38
+ - [x] Verdict: no single expressir-side waste; `expression`'s share is structural dispatch (if/elsif key cascades + per-call build_node wrapper-hash allocations). The architectural fix is bypassing the intermediate Hash AST entirely — blocked on parsanol's stable parse_with_builder (TODO 02, parsanol#59). Recorded; not refactored blindly.
39
+
40
+ ## Status: done
41
+
42
+ - Handler audit table recorded (17aa264 record transplanted below); verdict: structural dispatch, fix is parsanol streaming.
@@ -0,0 +1,37 @@
1
+ # 00 — P28 program overview
2
+
3
+ ISO 10303-28:2007 XML representations of EXPRESS schemas and data.
4
+ Sources: `/Users/mulgogi/src/mn/iso-10303-detached-docs/sources/iso-10303-28/`
5
+ (edition 1 of the full standard, revising the 2003 TS; clause map:
6
+ 5 document, 6 derived schemas, 7 default binding, 8 configured
7
+ binding, 9 XML document creation, 10 configuration language;
8
+ annex C base XML schema, D document schema, E valid populations,
9
+ G configuration examples).
10
+
11
+ Starting point: `Expressir::Express::Xsd` (#276) renders the #276
12
+ v2-mapping XSD; the -28 default binding now lives in `Expressir::P28`.
13
+
14
+ ## Ladder
15
+
16
+ | n | task | tier | status |
17
+ |---|------|------|--------|
18
+ | 01 | uos writer: population → clause 9 instance XML | data | done (#530) |
19
+ | 02 | uos reader: clause 9 instance XML → population; value-identical round trip | data | done (#531) |
20
+ | 03 | default XSD derivation to clause 7 with the exp: common namespace | schema | done (#532) |
21
+ | 04 | iso_10303_28 envelope: embedded express, header, uos (clauses 5 + 9.2.1) | document | done |
22
+ | 05 | configured binding (clauses 8 + 10) | configuration | deferred — the configuration-directive layer over the default binding; its own program; the default binding is the conformance core |
23
+
24
+ ## Standing rules
25
+
26
+ - Semantics cite clause ids (e.g. `:check_p28_*`, `# sec_9.3.1.1`).
27
+ - Instances ride the P21 record model (`Population`/`Record`/
28
+ `ComplexRecord`, TODO.instance/03) so P21 and P28 compose and
29
+ round-trips are value-identical.
30
+ - Tool split: static structures (the envelope, its express/header
31
+ children) are lutaml-model Serializables with XML mappings;
32
+ schema-driven XML (uos content, derived XSD) is Moxml — its
33
+ element names derive from the EXPRESS schema at runtime, which no
34
+ static mapping can express. No hand-rolled serialization on model
35
+ classes.
36
+ - The default binding (clause 7) is the target; configured behavior
37
+ (clause 8/10 directives) is out of scope until 05.
@@ -0,0 +1,54 @@
1
+ # 01 — uos writer: population → clause 9 instance XML
2
+
3
+ `Expressir::P28::Uos.emit` writes a unit of serialization (clause
4
+ 9.2.2) for a `P21::Population` against an EXPRESS schema, using the
5
+ default binding (clause 7) encoding rules of clause 9:
6
+
7
+ - `<uos id="..." express="...">` with the ed-2 common namespace
8
+ (`urn:iso:std:iso:10303:-28:ed-2:tech:XMLschema:common`) and the
9
+ schema's target namespace prefix (clause 7 §"URI for the target
10
+ namespace": preprocessor-chosen; default
11
+ `urn:iso.org:standard:10303:part(NNN):version(V):defaultXML:Name`
12
+ for registered standards, `URN:<owner>:iso_10303_28/<Name>` shape
13
+ otherwise as in the clause 9 worked example).
14
+ - Every instance is a by-value entity instance element (9.3.1): the
15
+ element name is the entity id with its first letter uppercased
16
+ (§8.5.5 identifier conversion, worked example `car_model` →
17
+ `Car_model`), carrying `id="id<n>"` derived from the P21 instance
18
+ id.
19
+ - Explicit attributes (9.3.1.1) become child elements with the same
20
+ capitalized name: strings/numbers/booleans (`true`/`false`,
21
+ 9.5.2)/logicals (`true`/`false`/`unknown`, 9.5.4)/enumeration
22
+ items (9.6.1) as text; binaries as hexBinary (9.5.1); references
23
+ as `<Ref_prefix="..."> ref="id<n>"/>` (9.3.3 by-reference);
24
+ `$` (unset) omits the element for OPTIONAL attributes; aggregates
25
+ of simple base types as whitespace-separated LIST text (9.8.1),
26
+ aggregates of entity base as one child element per component
27
+ (worked example `Control_points`).
28
+ - Complex (multi-instantiation) entities become `exp:complexEntity`
29
+ (9.3.4) with one by-value child per supertype component.
30
+
31
+ ## Acceptance
32
+
33
+ - The clause 9 car-ownership worked example (9.2.6.1) emitted from a
34
+ population byte-compares (modulo formatting) against the annex
35
+ XML.
36
+ - Annex E populations emit clean; every emission round-trips through
37
+ the P21 value model value-identically.
38
+ - Mutation: corrupting one value changes exactly the intended
39
+ element; a missing mandatory attribute is a writer error, not
40
+ silence.
41
+
42
+ ## Status: done
43
+
44
+ - `Expressir::P28::Uos.emit` (lib/expressir/p28/uos.rb) emits the
45
+ clause 9.2.2 uos for a P21 population against its schema, with the
46
+ encoding rules cited per clause in the module header (8.5.5 naming
47
+ incl. the uppercase-Part-21-keyword fallback, 9.3.1.1 explicit
48
+ attributes in Part 21 slot order, 9.3.3 refs, 9.5.1/2/3/4 value
49
+ texts, 9.6.1 enumeration items, 9.8.1 LIST aggregates, entity
50
+ aggregates as referenced components, 9.3.4 exp:complexEntity).
51
+ - Spec: spec/expressir/p28/uos_spec.rb — the clause 9.2.6.1 worked
52
+ example reproduced, deterministic emission, the full value-encoding
53
+ matrix (incl. Part 21 .T./.F./.UNKNOWN. re-encoding), `$`-slot
54
+ omission, complex-entity roles.
@@ -0,0 +1,50 @@
1
+ # 02 — uos reader: clause 9 instance XML → population
2
+
3
+ `Expressir::P28::Uos.parse` reads a uos document back into a
4
+ `P21::Population`, inverting the writer's default-binding encodings
5
+ (TODO.p28/01), so the P21 and P28 faces share one value model and the
6
+ round trip is value-identical:
7
+
8
+ - by-value entity instance elements (9.3.1): the element name is
9
+ matched against the schema's entity declarations via the inverse
10
+ 8.5.5 conversion; `id="id<n>"` maps back to `#<n>`;
11
+ - attribute accessor elements: text → string/number; `true`/`false`
12
+ (9.5.2) and `true`/`false`/`unknown` (9.5.4) back to the Part 21
13
+ logical renderings `.T.`/`.F.`/`.UNKNOWN.`; enumeration items as
14
+ `.item.`; hexBinary binaries (9.5.1); `ref` attributes (9.3.3) to
15
+ `#<n>` references; whitespace LIST text (9.8.1) back to arrays;
16
+ entity-typed component elements to referenced arrays;
17
+ - `exp:complexEntity` (9.3.4) back to a `ComplexRecord` with one
18
+ `Record` per role;
19
+ - unknown element names are reader errors, not silent skips.
20
+
21
+ ## Acceptance
22
+
23
+ - Every emission in the task 01 spec corpus parses back
24
+ value-identically: parse(emit(population)) == population at the
25
+ record level (keyword + params, with booleans/logicals/enumerations
26
+ compared under the Part 21 renderings).
27
+ - The clause 9.2.6.1 worked example XML (hand-written) parses to the
28
+ same population the P21 source holds.
29
+ - Mutation sweep: flipping one attribute value or ref in the XML
30
+ produces exactly the intended value difference in the parsed
31
+ population.
32
+
33
+ ## Status: done (#531)
34
+
35
+ - `Expressir::P28::Uos.parse` (lib/expressir/p28/uos.rb) reads a uos
36
+ document back into a `P21::Population`: element names matched to
37
+ schema entities via the inverse 8.5.5 conversion (unknown names are
38
+ reader errors, not silent skips), accessor slots restored in
39
+ Part 21 order with `$` gaps, logical faces (`true`/`false`/
40
+ `unknown`) re-encoded to the Part 21 renderings through the
41
+ DECLARED attribute types — including builtin primitives arriving
42
+ as DataTypes or name references, defined-type chains, and
43
+ 9.8.1 LIST text — refs and ref'd components back to `#n`, and
44
+ `exp:complexEntity` back to a ComplexRecord with one Record per
45
+ role.
46
+ - Spec: spec/expressir/p28/uos_reader_spec.rb — the hand-written
47
+ clause 9.2.6.1 worked example parses to the P21-equivalent
48
+ population, the task-01 value matrix and complex/`$` corpus parse
49
+ back value-identically, and the mutation sweep flips exactly one
50
+ value or ref per finding.
@@ -0,0 +1,68 @@
1
+ # 03 — default XSD derivation to clause 7
2
+
3
+ `Expressir::P28::Xsd` renders the ISO 10303-28:2007 default-binding
4
+ derived XML schema for an EXPRESS schema, so that clause 9 instance
5
+ documents (the task 01/02 uos faces) validate against it.
6
+
7
+ ## Normative anchors (each cited in code)
8
+
9
+ - 7.7/7.7.3: one `xs:schema` with `targetNamespace`; `xmlns` for the
10
+ target namespace, xs and the Base XML Schema; when present,
11
+ `elementFormDefault`/`attributeFormDefault` shall be "unqualified"
12
+ — the shape that makes qualified instance elements and unqualified
13
+ accessor/component elements validate together.
14
+ - 7.7.4: `xs:import` of the Base XML Schema (exp:) — and of each
15
+ interfaced schema's namespace once interfaces are in scope.
16
+ - 7.1.2: identifiers map with the initial letter upper case, all
17
+ other letters lower case.
18
+ - 7.2: BINARY → `exp:hexBinary` (the base complexType with
19
+ `extraBits`), LOGICAL → `exp:logical`, the rest per 7.2.1.
20
+ - 7.3: defined TYPEs → named `xs:simpleType` (restriction /
21
+ enumeration facets keeping the EXPRESS item texts / `xs:list` for
22
+ aggregates of simple base).
23
+ - 7.6.2: explicit attributes only — DERIVEd and INVERSE attributes
24
+ are not mapped.
25
+ - 7.6.4: the entity `complexType` extends `exp:Entity`, holds the
26
+ accessor declarations of the whole supertype closure (union,
27
+ redeclarations winning) inside `xs:all`, `abstract="true"` per
28
+ ABSTRACT SUPERTYPE.
29
+ - 7.6.5: one global instance element per entity in the
30
+ `exp:Entity` substitution group.
31
+ - 7.8: the context-schema specific `uos` element over the entity
32
+ instance elements (and `exp:complexEntity`).
33
+
34
+ ## Base schema
35
+
36
+ `Expressir::P28::Xsd.base_schema` emits the annex C components the
37
+ default binding relies on, from the normative snippets in clause 7
38
+ (7.5.3.1 `exp:Entity`, 7.2.1.1 `exp:hexBinary`) plus the 9.5.4
39
+ logical domain and the 9.3.4 `exp:complexEntity` carrier.
40
+
41
+ ## Acceptance
42
+
43
+ - The clause 7 shapes are present (unqualified forms, exp:Entity
44
+ extension, xs:all closure union, substitution group, mapped names,
45
+ enumerated facets, abstract flags, uos element, base import).
46
+ - DERIVEd/INVERSE attributes are absent from the derivation.
47
+ - End to end: a uos emitted by the task 01 writer validates against
48
+ the derived schema; an unknown instance element fails validation.
49
+
50
+ ## Status: done (#532)
51
+
52
+ - `Expressir::P28::Xsd.format` with the rules above; the normative
53
+ form imports the base schema per 7.7.4, and `inline_base: true`
54
+ inlines the same components under local names for toolchains that
55
+ cannot resolve `xs:import` from an in-memory compilation (the
56
+ libxml2-based moxml adapter being one).
57
+ - v1 boundary, stated in the module header: constrained
58
+ widths/precisions emit no facet restrictions; SELECT accessors
59
+ raise (the full 7.4 select machinery is future work); cross-schema
60
+ supertypes raise rather than silently dropping attributes.
61
+ - Engine-strictness findings folded back in: inline-mode QName
62
+ references are prefix-qualified (an unprefixed QName under a
63
+ targetNamespace resolves to the empty namespace and stricter
64
+ engines reject the schema at compile), the inline carrier is
65
+ `uos_base` (no duplicate `uos` global), and the gate asserts
66
+ `compile_error` is nil.
67
+ - Spec: spec/expressir/p28/xsd_spec.rb — shapes, 7.6.2.2 omission,
68
+ and the end-to-end validation gate with a mutation.
@@ -0,0 +1,62 @@
1
+ # 04 — iso_10303_28 document envelope
2
+
3
+ The clause 9.2.1 document half: `Expressir::P28::Document` models and
4
+ emits the `iso_10303_28` envelope (annex D document schema) around
5
+ one or more units of serialization.
6
+
7
+ Tool split (per the engine mandate): ALL XML goes through moxml and
8
+ its leptris adapter — the envelope children are translated by module
9
+ functions like the uos faces, with the model layer as lutaml-model
10
+ Serializables (attribute typing and collections). lutaml-model's own
11
+ XML serializer is not used: 0.8.114's XML builder crashes on the
12
+ leptris adapter for every mapping (`Leptris::XML::Declaration`),
13
+ an upstream defect, filed as lutaml-model#997.
14
+
15
+ ## Parts
16
+
17
+ 1. `iso_10303_28` root element in the -28 common namespace (9.2.1):
18
+ zero or more `express` elements (clause 5: `id`, `name`, embedded
19
+ EXPRESS source — by value; referenced form via href later), zero
20
+ or more `uos` elements (9.2.2, as emitted by `P28::Uos`), optional
21
+ `header` (clause 5.2.1).
22
+ 2. Emission: envelope over a repository (express by value) and its
23
+ populations; the uos `schema` attribute references the `express`
24
+ element's id (9.2.6.2).
25
+ 3. Reader: parse the envelope back to express sources + populations
26
+ (`P28::Uos.parse` per uos), value-identical round trip.
27
+ 4. Validation: the envelope validates against a document schema
28
+ assembled from `Xsd.base_schema` + the annex D components (as far
29
+ as they are textual in the detachment; the images-only parts of
30
+ annex C/D are re-derived from the normative clause text with
31
+ citations, as in task 03).
32
+
33
+ ## Acceptance
34
+
35
+ - The clause 9.2.6.1 car-ownership example emits as a full
36
+ `iso_10303_28` document with the embedded express element and the
37
+ uos referencing it, matching the standard's own example shape.
38
+ - Round trip value-identical: populations and express sources come
39
+ back equal.
40
+ - Mutation: a uos referencing an unknown express id is a reader
41
+ error, not a silent skip.
42
+
43
+ ## Status: done
44
+
45
+ - `Expressir::P28::Document` (lib/expressir/p28/document.rb):
46
+ `ExpressElement` and `Header` are lutaml-model Serializables
47
+ (model layer); emission and reading are moxml/leptris module
48
+ functions, as for `P28::Uos`. `Uos.emit` gained the 9.2.6.2
49
+ `schema` attribute (`schema_ref:`) referencing the express
50
+ element's id.
51
+ - The reader parses every embedded express source back into an
52
+ EXPRESS schema and each uos into a population keyed by its schema
53
+ reference; a uos referencing an unknown express id is a reader
54
+ error.
55
+ - Spec: spec/expressir/p28/document_spec.rb — the clause 9.2.6.1
56
+ envelope shape, value-identical round trip, header carriage, and
57
+ the unknown-reference rejection.
58
+ - Upstream: lutaml-model 0.8.114's XML builder crashes on the
59
+ leptris adapter for every mapping (`Leptris::XML::Declaration`);
60
+ reported as the reason this file does not delegate XML to
61
+ lutaml-model. The XSD validation gate keys on the leptris engine
62
+ and skips on runners that fell back to a non-XSD walker.
@@ -45,7 +45,6 @@ implementation has this (eengine's --validate is the cautionary tale).
45
45
  - WHERE evaluation over the Annex H population: every rule provably
46
46
  passes; a seeded-fault population fails the intended rule only.
47
47
 
48
- ## Status: in progress
49
48
 
50
49
  - Step 1 (value model + expression core): done — `Expressir::Eval`
51
50
  (Values/Environment/Expression autoloads): ISO 10303-11 ch.12
@@ -21,6 +21,7 @@ module Expressir
21
21
  def from_file(path)
22
22
  manifest = from_yaml(File.read(path))
23
23
  manifest.base_dir = File.dirname(File.expand_path(path))
24
+ manifest.validate_entries!
24
25
  manifest
25
26
  end
26
27
  end
@@ -40,6 +41,22 @@ module Expressir
40
41
  def schema_path
41
42
  File.expand_path(schema, base_dir || ".")
42
43
  end
44
+
45
+ # Entries are plain file paths. Structured shapes (the
46
+ # `{path: ...}` mapping of the schema-side manifest) are a
47
+ # different format and must fail at load, not as a TypeError
48
+ # deep in path resolution.
49
+ def validate_entries!
50
+ files.to_a.each_with_index do |file, index|
51
+ next if file.is_a?(String)
52
+
53
+ raise Expressir::ManifestValidationError,
54
+ "manifest 'files' entry #{index} is not a plain file " \
55
+ "path; the dataset manifest takes a list of paths " \
56
+ "('files:\\n - dataset.p21'), not the schema " \
57
+ "manifest's '{path: ...}' entries"
58
+ end
59
+ end
43
60
  end
44
61
  end
45
62
  end