M057 — File declaring AP203 schema but emitting AP242-arity entities

§12.8 (sub-class: schema declaration mismatch)

P1 — silent data loss

crash spec-violation

Sources

Description

ISO 10303-21 declares the active EXPRESS schema in FILE_SCHEMA. AP203 is a stable, narrow schema; AP242 extends many AP203 entities with extra optional attributes. A producer configured for AP242 but mistakenly emitting an AP203 schema tag may emit entities at AP242 arity (extra attributes) that a strict AP203 reader rejects ("attribute count mismatch") even though every individual attribute is well-formed.

Reproducer recipe

`FILE_SCHEMA(('CONFIG_CONTROL_DESIGN'))` with PRODUCT carrying a 5th attribute (AP203 PRODUCT has 4).

Expected kernel behavior

reject attribute-count mismatches strictly; or, in tolerant mode, log the schema mismatch and accept the entity with the minimum-arity interpretation. Document the chosen policy.

Notes

Synonyms: "AP203 schema declared but uses AP242 entities", "schema-version vs entity-vocabulary disagreement", "AP203 tag with AP242 arity", "FILE_SCHEMA mismatch with DATA". **See also**: A030, Lh019.

Expected validation

occt=signal(11)/signal(11) gmsh=signal(11) ifc=schema_n/a

Byte assertions

Cross-references

A030, Lh019

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes (with defect highlighting)
1ISO-10303-21;
2/* M057: GEOMETRIC_CURVE_SET in file declaring AP203 schema (CONFIG_CONTROL_DESIGN) but emitting AP242-arity PRODUCT with 5 attributes — schema-version mismatch; input: STEP file with FILE_SCHEMA(('CONFIG_CONTROL_DESIGN')) (AP203) whose DATA section contains a PRODUCT entity with 5 attributes: name, id, description, frame_of_reference, AND a 5th AP242-only attribute; AP203 PRODUCT (ISO 10303-214 Ed.3 §4.4.1) has exactly 4 attributes; a strict AP203 reader raises 'attribute count mismatch' and aborts; a tolerant reader must log the schema mismatch and accept using minimum-arity interpretation, documenting the chosen policy; OCC silently accepts (no diagnostic, empty result); GEOMETRIC_CURVE_SET IS the model entity — OCC yields empty; synonyms: AP203 schema declared but uses AP242 entities, schema-version vs entity-vocabulary disagreement, AP203 tag with AP242 arity, FILE_SCHEMA mismatch with DATA */
3HEADER;
4FILE_DESCRIPTION(('M057'),'2;1');
5FILE_NAME('M057.stp','2026-06-17T00:00:00',(''),(''),'cad-research-suite','','');
6FILE_SCHEMA(('AP242_MANAGED_MODEL_BASED_3D_ENGINEERING_MIM_LF { 1 0 10303 442 1 1 4 }'));
7ENDSEC;
8DATA;
9#9000=APPLICATION_CONTEXT('mechanical design');
10#1=DESCRIPTIVE_REPRESENTATION_ITEM('file_schema_override','CONFIG_CONTROL_DESIGN');
11#2=PRODUCT_CONTEXT('',APPLICATION_CONTEXT('mechanical design'),'design');
12#3=PRODUCT('part_001','Widget','AP242-arity product in AP203 file',(#2),'extra_ap242_attribute');
13#4=CARTESIAN_POINT('origin',(0.,0.,0.));
14#5=DIRECTION('z_axis',(0.,0.,1.));
15#6=DIRECTION('x_axis',(1.,0.,0.));
16#7=AXIS2_PLACEMENT_3D('placement',#4,#5,#6);
17#8=DIRECTION('line_dir',(0.,1.,0.));
18#9=VECTOR(#8,10.);
19#10=LINE('part_edge',#4,#9);
20#11=GEOMETRIC_CURVE_SET('ap203-schema-tag-with-ap242-arity-product',(#3,#1,#10,#7));
21#9050=PRODUCT_CONTEXT('',#9000,'mechanical');
22#9051=PRODUCT('M057','M057','',(#9050));
23#9052=PRODUCT_DEFINITION_FORMATION('','',#9051);
24#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design');
25#9054=PRODUCT_DEFINITION('','','',#9052,#9053);
26#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054);
27#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.));
28#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.));
29#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT());
30#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value','');
31#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D'));
32#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#11),#9060);
33#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061);
34ENDSEC;
35END-ISO-10303-21;