step-examples/12-1b-header/Lh051.stp
Sources
- Pattern-mined from ricosjp/ruststep token.rs::entity_instance_name (Apache-2.0/MIT — pattern only, no bytes copied)
- ISO 10303-21 §6.4.4.3 NOTE 2 (leading zeros not significant)
Description
ISO 10303-21 §6.4.4.3 NOTE 2 states that leading zeros in an entity-instance name are not significant — `#1` and `#01` denote the SAME instance. The fixture defines `#1` as a CARTESIAN_POINT and `#01` as a DIRECTION, which normalize to the same name and silently alias; `#2` references `#01`, resolving to whichever definition won. Independent parsers that normalize the name to an integer (ruststep parses `#001` into a `u64`) collapse the two, while byte-diff and lax readers miss the collision. Distinct from Lh022 (byte-identical duplicate `#N`): this is duplication after leading-zero normalization, which byte-diff tooling cannot see.
Reproducer recipe
`#1=CARTESIAN_POINT('p1',(0.,0.,0.)); #01=DIRECTION('d1',(1.,0.,0.)); #2=VECTOR('v',#01,1.);` — `#01` aliases `#1`.
Expected kernel behavior
reject with `E_DUPLICATE_INSTANCE_ID` after leading-zero normalization; never silently overwrite one definition with the other.
Notes
**See also**: Lh022, Lh024. **OCC behavior**: silently accepts duplicate instance IDs (typically last-write-wins) without diagnostic; kernel mishandling; the catalog forbids silent overwrite. Synonyms: "leading-zero instance ID aliasing", "#1 and #01 same instance", "#001 normalizes to #1", "duplicate after leading-zero normalization", "STEP instance name leading zeros not significant". Provenance tier: bytes-only. Expected validation is provisional (best-guess) pending oracle rebaseline — the live occt/gmsh oracle is not run here (platform divergence); nightly CI reconciles.
Expected validation
occt=empty/empty gmsh=empty ifc=schema_n/a
Provenance tier
bytes-only — defect not fully embodied in fixture bytes.
Byte assertions
contains(b'#1=CARTESIAN_POINT')contains(b'#01=DIRECTION')
Tier-3 assertions
load == "ok"
Cross-references
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes (with defect highlighting)
1ISO-10303-21; 2/* Lh051: leading-zero instance-name aliasing collision; ISO 10303-21 6.4.4.3 NOTE 2: leading zeros in an entity-instance name are not significant, so #1 and #01 denote the SAME instance; the file defines #1 as a CARTESIAN_POINT and #01 as a DIRECTION, which normalize to the same name 1 and silently alias; #2 references #01, resolving to whichever definition won; independent parsers that normalize the name to an integer collapse the two while byte-diff and lax readers miss the collision; distinct from Lh022 (byte-identical duplicate); this is duplication after leading-zero normalization; expected kernel behavior: reject with E_DUPLICATE_INSTANCE_ID after leading-zero normalization; never silently overwrite */ 3HEADER; 4FILE_DESCRIPTION(('Lh051'),'2;1'); 5FILE_NAME('Lh051.stp','2026-06-17T00:00:00',(''),(''),'cad-research-suite','',''); 6FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }')); 7ENDSEC; 8DATA; 9/* ISO 10303-21 6.4.4.3 NOTE 2: leading zeros in an instance name are 10 NOT significant; #1 and #01 denote the SAME instance. */ 11#1=CARTESIAN_POINT('p1',(0.,0.,0.)); 12/* Defect: #01 normalizes to name 1 and silently aliases #1 above. */ 13#01=DIRECTION('d1',(1.,0.,0.)); 14/* #2 references #01, which after normalization is the same name as #1. */ 15#2=VECTOR('v',#01,1.); 16ENDSEC; 17END-ISO-10303-21;