step-examples/12-8-mixed/M140.stp
Sources
- 16-iso-spec ISO 10303-203 §5.4 (specified_source / supplier)
- bug-reporter language: "AP203 made part has supplier", "make-or-buy contradiction", "PDM source attribute wrong".
Sender
deduced — PDM exporter that emitted both an in-house source flag and a third-party supplier record without reconciling
Description
A `PRODUCT_DEFINITION_FORMATION_WITH_SPECIFIED_SOURCE` declares `source = .MADE.` (made in-house) but an `APPLIED_ORGANIZATION_ASSIGNMENT` of role 'supplier' designates an external organization for the same part. The make-or-buy declaration contradicts the supplier record. Bug-reporter language: "AP203 make-or- buy contradiction", "in-house part has supplier", "PDM source vs supplier mismatch".
Reproducer recipe
`PRODUCT_DEFINITION_FORMATION_WITH_SPECIFIED_SOURCE ('rev','..',product,.MADE.)` and `APPLIED_ORGANIZATION_ASSIGNMENT(org,'supplier',(pd))`.
Expected kernel behavior
detect the contradiction; reject or warn.
Notes
Synonyms: "AP203 source/supplier mismatch", "PDM make-or-buy ambiguity", "MADE part has external supplier", "make-or-buy contradicts supplier record". Synonyms: "AP203 source/supplier mismatch", "PDM make-or-buy ambiguity".
Expected validation
occt=empty/empty gmsh=empty ifc=schema_n/a
Byte assertions
contains(b'CONFIG_CONTROL_DESIGN')contains(b'PRODUCT_DEFINITION_FORMATION_WITH_SPECIFIED_SOURCE')contains(b'.MADE.')
Tier-3 assertions
shape_null == True
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes (with defect highlighting)
1ISO-10303-21; 2/* M140: AP203 make-or-buy declaration contradicts external supplier record */ 3/* DEFECT: PRODUCT_DEFINITION_FORMATION_WITH_SPECIFIED_SOURCE(.MADE.) but */ 4/* APPLIED_ORGANIZATION_ASSIGNMENT role='supplier' designates external org */ 5/* Per ISO 10303-203 §5.4: .MADE. means no external supplier should be declared */ 6/* Procurement systems receive conflicting signals: make it AND buy it */ 7/* Byte assertion: contains(b'CONFIG_CONTROL_DESIGN') */ 8/* Byte assertion: contains(b'PRODUCT_DEFINITION_FORMATION_WITH_SPECIFIED_SOURCE') */ 9/* Byte assertion: contains(b'.MADE.') */ 10HEADER; 11FILE_DESCRIPTION(('M140: AP203 make-or-buy MADE contradicts supplier APPLIED_ORGANIZATION_ASSIGNMENT'),'2;1'); 12FILE_NAME('M140.stp','2026-06-21T00:00:00',(''),(''),'cad-research-suite','',''); 13/* Byte assertion: contains(b'CONFIG_CONTROL_DESIGN') */ 14FILE_SCHEMA(('CONFIG_CONTROL_DESIGN { 1 0 10303 203 1 0 0 }')); 15ENDSEC; 16DATA; 17#1=APPLICATION_CONTEXT('configuration controlled 3D designs of mechanical parts and assemblies'); 18#2=APPLICATION_PROTOCOL_DEFINITION('international standard', 19 'config_control_design',1994,#1); 20/* Standard unit context (mm) */ 21#10=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 22#11=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 23#12=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 24#13=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(0.001),#10, 25 'distance_accuracy_value','maximum model space distance between geometric entities'); 26#14=(GEOMETRIC_REPRESENTATION_CONTEXT(3) 27 GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#13)) 28 GLOBAL_UNIT_ASSIGNED_CONTEXT((#10,#11,#12)) 29 REPRESENTATION_CONTEXT('ctx','3D')); 30/* Part declared as made in-house */ 31#20=PRODUCT('PART-404','Mounting Flange','Precision-machined mounting flange',(#1)); 32/* Byte assertion: contains(b'PRODUCT_DEFINITION_FORMATION_WITH_SPECIFIED_SOURCE') */ 33/* Byte assertion: contains(b'.MADE.') */ 34/* DEFECT: .MADE. declares this part is manufactured by the design organization */ 35/* A .BOUGHT. source enumeration would permit an external supplier designation */ 36/* A .NOT_SPECIFIED. value would be ambiguous but not strictly contradictory */ 37#21=PRODUCT_DEFINITION_FORMATION_WITH_SPECIFIED_SOURCE( 38 'rev_A','Production specification',#20,.MADE.); 39#22=PRODUCT_DEFINITION('design','',#21,PRODUCT_DEFINITION_CONTEXT(#1,'design')); 40/* External organization designated as supplier â contradicts .MADE. above */ 41#30=ORGANIZATION('SUP-999','ExtSupplierCo','External precision machining supplier'); 42/* Organization role: 'supplier' â this role is only valid for .BOUGHT. parts */ 43#31=ORGANIZATION_ROLE('supplier'); 44/* DEFECT: APPLIED_ORGANIZATION_ASSIGNMENT assigns an external supplier (#30) */ 45/* to PRODUCT_DEFINITION #22 which was formed with source=.MADE. (#21) */ 46/* Contradiction: the part is simultaneously declared made in-house AND has a supplier */ 47/* A procurement system would generate both a shop order AND a purchase order */ 48#32=APPLIED_ORGANIZATION_ASSIGNMENT(#30,#31,(#22)); 49/* GEOMETRIC_CURVE_SET IS the model entity â OCC yields empty */ 50#500=GEOMETRIC_CURVE_SET('ap203-make-or-buy-MADE-contradicts-supplier-assignment', 51 (#20,#21,#22,#30,#31,#32)); 52/* Product chain */ 53#600=APPLICATION_CONTEXT('mechanical design'); 54#601=PRODUCT_CONTEXT('',#600,'mechanical'); 55#602=PRODUCT('M140','M140','M140',(#601)); 56#603=PRODUCT_DEFINITION_FORMATION('','',#602); 57#604=PRODUCT_DEFINITION_CONTEXT(#600,'design'); 58#605=PRODUCT_DEFINITION('','',#603,#604); 59#606=PRODUCT_DEFINITION_SHAPE('','',#605); 60#607=SHAPE_REPRESENTATION('',(#500),#14); 61#608=SHAPE_DEFINITION_REPRESENTATION(#606,#607); 62ENDSEC; 63END-ISO-10303-21;