step-examples/12-8-mixed/M184.stp
Sources
- 16-iso-spec ISO 10303-238 §6.4 executable_relationship acyclicity invariant
- bug-reporter language: "AP238 dependency cycle", "STEP-NC workplan won't schedule", "executable graph has loop".
Description
Two `EXECUTABLE_RELATIONSHIP` entities form a cycle where operation A precedes operation B and operation B precedes operation A. The workplan has no valid topological order; consumers either deadlock during scheduling or pick an arbitrary order that breaks the dependency. Bug-reporter language: "AP238 executable_relationship cycle", "STEP-NC dependency graph cyclic", "workplan deadlock from circular precedes".
Reproducer recipe
two `MACHINING_OPERATION`s `#100` and `#101`; two `EXECUTABLE_RELATIONSHIP`s `(#100→#101)` and `(#101→#100)` declared in the same file.
Expected kernel behavior
detect cycles in the executable-relationship graph; reject as unschedulable.
Notes
Synonyms: "AP238 dependency cycle", "STEP-NC executable graph loop", "workplan A precedes B precedes A", "circular precedes".
Expected validation
occt=empty/empty gmsh=empty ifc=schema_n/a
Byte assertions
contains(b'AP238_STEP_NC_MIM')count_entity_def(b'EXECUTABLE_RELATIONSHIP') >= 2
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/* M184: AP238 executable_relationship forms a cycle (A precedes B, B precedes A) */ 3/* DEFECT: EXECUTABLE_RELATIONSHIP A->B and B->A create a dependency cycle */ 4/* Workplan has no valid topological order â no valid starting operation exists */ 5/* Consumer scheduler either deadlocks or picks arbitrary order breaking dependencies */ 6/* Per ISO 10303-238 §6.4 executable-relationship graph must be acyclic */ 7/* Byte assertion: contains(b'AP238_STEP_NC_MIM') */ 8/* Byte assertion: count_entity_def(b'EXECUTABLE_RELATIONSHIP') >= 2 */ 9HEADER; 10FILE_DESCRIPTION(('M184: AP238 executable_relationship cycle A precedes B precedes A'),'2;1'); 11FILE_NAME('M184.stp','2026-06-21T00:00:00',(''),(''),'cad-research-suite','',''); 12/* Byte assertion: contains(b'AP238_STEP_NC_MIM') */ 13FILE_SCHEMA(('AP238_STEP_NC_MIM { 1 0 10303 238 3 1 1 1 }')); 14ENDSEC; 15DATA; 16/* Standard unit context (mm) */ 17#10=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 18#11=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 19#12=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 20#13=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(0.001),#10, 21 'distance_accuracy_value','maximum model space distance between geometric entities'); 22#14=(GEOMETRIC_REPRESENTATION_CONTEXT(3) 23 GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#13)) 24 GLOBAL_UNIT_ASSIGNED_CONTEXT((#10,#11,#12)) 25 REPRESENTATION_CONTEXT('ctx','3D')); 26/* mm length unit reference for MEASURE_WITH_UNIT */ 27#15=SI_UNIT(.MILLI.,.METRE.); 28/* GEOMETRIC_CURVE_SET IS the model entity â OCC yields empty */ 29#20=GEOMETRIC_CURVE_SET('ap238-executable-relationship-dependency-cycle', 30 (#210,#211,#60)); 31/* WORKPIECE 'drill_workpiece' for both drilling operations */ 32#60=WORKPIECE('drill_workpiece','Workpiece for cyclic dependency test',$,$,$,$,$); 33/* Operation A: drill_op_A â first drilling operation */ 34#200=DRILLING_OPERATION('drill_op_A',$,$,$,$,$,$,$,$,$,$,$,$); 35/* Operation B: drill_op_B â second drilling operation */ 36#201=DRILLING_OPERATION('drill_op_B',$,$,$,$,$,$,$,$,$,$,$,$); 37/* Byte assertion: count_entity_def(b'EXECUTABLE_RELATIONSHIP') >= 2 */ 38/* EXECUTABLE_RELATIONSHIP 'A_precedes_B': A (#200) must execute before B (#201) */ 39#210=EXECUTABLE_RELATIONSHIP('A_precedes_B','A must precede B',#200,#201); 40/* DEFECT: 'B_precedes_A': B (#201) must execute before A (#200) â CYCLE! */ 41#211=EXECUTABLE_RELATIONSHIP('B_precedes_A','B must precede A',#201,#200); 42/* MACHINING_WORKINGSTEP links each op to the shared workpiece */ 43#51=MACHINING_WORKINGSTEP('drill_step_A','Drill step A',#200,#60,$); 44#52=MACHINING_WORKINGSTEP('drill_step_B','Drill step B',#201,#60,$); 45/* WORKPLAN: both steps with circular dependency â no valid schedule */ 46#50=WORKPLAN('cyclic_dependency_program','Cyclic dependency workplan',(),$,(#51,#52)); 47/* Product chain */ 48#100=APPLICATION_CONTEXT('mechanical design'); 49#101=PRODUCT_CONTEXT('',#100,'mechanical'); 50#102=PRODUCT('M184','M184','M184',(#101)); 51#103=PRODUCT_DEFINITION_FORMATION('','',#102); 52#104=PRODUCT_DEFINITION_CONTEXT(#100,'design'); 53#105=PRODUCT_DEFINITION('','',#103,#104); 54#106=PRODUCT_DEFINITION_SHAPE('','',#105); 55#107=SHAPE_REPRESENTATION('',(#20),#14); 56#108=SHAPE_DEFINITION_REPRESENTATION(#106,#107); 57ENDSEC; 58END-ISO-10303-21;