Lh025 — Mixing `#NNN` (entity) and `@NNN` (value) namespaces (Ed.3)

§12.1b header/numbering

P1 — silent data loss

spec-violation syntax

Sources

Description

Edition 3 introduces `@NNN` value-instance identifiers (e.g. `@1=POSITIVE_LENGTH_MEASURE(..)`) alongside `#NNN` entity-instance identifiers. The two integer namespaces are disjoint: `#1` and `@1` are distinct instances. Files that put a `@NNN` value-instance reference where a `#NNN` entity-instance reference is required (or vice versa), or that use the `@`-prefix syntax in plain Edition-2 contexts, break readers that collapse the two namespaces into one map and silently merge unrelated objects.

Reproducer recipe

`#1=PRODUCT(..); @1=POSITIVE_LENGTH_MEASURE(2.5); #2=ITEM_DEFINED_TRANSFORMATION('',$,@1);`

Expected kernel behavior

maintain two separate dispatch tables; reject if an attribute slot expects `#NNN` but the value reference is `@NNN` (or vice versa).

Notes

Synonyms: "mixing #NNN and @NNN in same STEP", "value-instance reference where entity expected", "@1 used as #1", "Ed.3 disjoint namespaces confused", "@NNN at #NNN slot".

Expected validation

occt=empty/empty gmsh=empty ifc=schema_n/a

Byte assertions

Tier-3 assertions

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes (with defect highlighting)
1ISO-10303-21;
2/* Lh025: mixing #NNN entity and @NNN value namespaces (Edition 3) */
3/* ISO 10303-21 Ed.3: #NNN and @NNN are disjoint namespaces; #1 != @1 */
4/* DEFECT: @1 value-instance used in slot expecting #NNN entity-instance */
5/* Readers collapsing both namespaces into one map silently merge unrelated objects */
6/* OCC silently accepts (empty result); catalog requires reject */
7HEADER;
8FILE_DESCRIPTION(('Lh025: mixing #NNN entity and @NNN value namespaces'),'2;1');
9FILE_NAME('Lh025.stp','2026-06-20T00:00:00',(''),(''),'cad-research-suite','','');
10FILE_SCHEMA(('AUTOMOTIVE_DESIGN'));
11ENDSEC;
12DATA;
13#1=CARTESIAN_POINT('origin',(0.,0.,0.));
14#2=CARTESIAN_POINT('corner',(1.,1.,0.));
15#3=DIRECTION('xdir',(1.,0.,0.));
16#4=DIRECTION('zdir',(0.,0.,1.));
17/* DEFECT: @1 is an Ed.3 value-instance identifier — not valid here */
18@1=POSITIVE_LENGTH_MEASURE(2.5);
19/* DEFECT: ITEM_DEFINED_TRANSFORMATION attribute slot expects #NNN entity reference */
20/* but @1 (a value-instance) is supplied instead — namespace confusion */
21#5=ITEM_DEFINED_TRANSFORMATION('transform',$,@1);
22#6=GEOMETRIC_CURVE_SET('namespace-confusion-shape',(#1,#2));
23ENDSEC;
24END-ISO-10303-21;