step-examples/12-1c-syntax/Ls016.stp
Sources
- T020, A016
Description
`(a,,b)` leaves an attribute slot empty. Correct null is `$`, derived is `*`. Empty slot is a generator bug. Parsers that map positional slots without re-checking arity may construct the entity with one fewer attribute, leading to uninitialised fields.
Reproducer recipe
`#1=IFCPERSON($,$,'',,$,$,$,$);` or `#1=CARTESIAN_POINT('',(0.,,1.));`
Expected kernel behavior
Reject with "expected parameter, found ','"; do not silently treat empty slot as `$`.
Notes
**OCC behavior**: silently treats the empty slot as `$` (omitted) and proceeds; kernel mishandling; the catalog above forbids silent slot-equivalence. Synonyms: "double comma in STEP aggregate", "(a,,b) empty slot", "STEP entity attribute slot empty", "empty parameter slot in entity", "consecutive commas in attribute list".
Expected validation
occt=empty/empty gmsh=empty ifc=schema_n/a
Byte assertions
matches(rb',\s*,') or matches(rb'\(\s*,')count(b',,') >= 1
Tier-3 assertions
load == "ok"
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes (with defect highlighting)
1/* Ls016 - Double comma / empty parameter slot 2 ---------------------------------------------------------------------- 3 Catalog section : §12.1c punctuation 4 Sources : T020, A016 5 Originally also catalogued as: Ad016 6 ---------------------------------------------------------------------- 7 Defect 8 (a,,b) leaves an attribute slot empty. Correct null is '$', correct 9 derived is '*'. An empty slot is a generator bug. Parsers that map 10 positional slots without re-checking arity may construct the entity 11 with one fewer attribute, leading to uninitialised fields and later 12 null-deref crashes. 13 Expected behavior 14 Reject with "expected parameter, found ','"; do not silently treat 15 the empty slot as '$'. The error message should report the slot 16 index within the parameter list. 17 ---------------------------------------------------------------------- 18*/ 19ISO-10303-21; 20HEADER; 21FILE_DESCRIPTION(('Ls016 - double comma leaves empty parameter slot'),'2;1'); 22FILE_NAME('Ls016.stp','2026-04-26T00:00:00',('auto-generated'),(''), 23 'auto-generated','',''); 24FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }')); 25ENDSEC; 26DATA; 27/* Defect: empty slot in attribute list (the ',,' between '' and $) */ 28#10=IFCPERSON($,$,'',,$,$,$,$); 29/* Defect: empty slot inside aggregate (the ',,' between 0.0 and 1.0) */ 30#20=CARTESIAN_POINT('',(0.0,,1.0)); 31/* Defect: leading empty slot ('(,...)') */ 32#21=CARTESIAN_POINT('lead',(,1.0,0.0)); 33#30=DIRECTION('x',(1.0,0.0,0.0)); 34ENDSEC; 35END-ISO-10303-21;