step-examples/12-1c-syntax/Ls053.stp
Sources
- Pattern-mined from ricosjp/ruststep parameter.rs::untyped_parameter and issue #56 "tokenize integer as float" (Apache-2.0/MIT — pattern only, no bytes copied)
- ISO 10303-21 §6.4 (INTEGER vs REAL literal grammar)
Description
ISO 10303-21 distinguishes INTEGER and REAL literals; a REAL carries a mandatory decimal point. A count/degree/dimension attribute typed INTEGER in the EXPRESS schema must not receive a REAL literal. The fixture writes the REAL literal `3.0` in the `B_SPLINE_CURVE_WITH_KNOTS` degree slot, where the integer `3` is required. This is the inverse of Ls001 (integer written where a REAL is required). A real-first tokenizer (`untyped_parameter` tries `real` before `integer`) mis-types `3.0` as a REAL parameter and may silently truncate it.
Reproducer recipe
`#5=B_SPLINE_CURVE_WITH_KNOTS('c',3.0,(#1,#2,#3,#4),.UNSPECIFIED.,.F.,.F.,(4,4),(0.,1.),.UNSPECIFIED.);` — degree slot is INTEGER but carries `3.0`.
Expected kernel behavior
Reject or warn on a non-integral value in an INTEGER slot; never silently truncate `3.0` to `3`.
Notes
**See also**: Ls001. **OCC behavior**: silently accepts (no diagnostic, empty result); outside catalog's allowed set ({reject, warn-and-proceed}). Kernel-bug witnessed: receivers enforcing the spec must reject or emit a diagnostic. Synonyms: "REAL where INTEGER expected", "degree given 3.0", "count field carries a decimal point", "fractional value in integer slot", "float literal in STEP integer attribute". Provenance tier: bytes-only. Expected validation is provisional (best-guess) pending oracle rebaseline — the live occt/gmsh oracle is not run here (platform divergence); nightly CI reconciles.
Expected validation
occt=empty/empty gmsh=empty ifc=schema_n/a
Provenance tier
bytes-only — defect not fully embodied in fixture bytes.
Byte assertions
contains(b'B_SPLINE_CURVE_WITH_KNOTS')matches(rb"WITH_KNOTS\('c',3\.0,")
Tier-3 assertions
shape_null == True
Cross-references
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes (with defect highlighting)
1ISO-10303-21; 2/* Ls053: REAL literal in an INTEGER-typed slot; ISO 10303-21 distinguishes INTEGER and REAL literals, and a REAL carries a mandatory decimal point; the B_SPLINE_CURVE_WITH_KNOTS degree attribute is INTEGER in the EXPRESS schema, but the fixture writes the REAL literal 3.0 where the integer 3 is required; this is the inverse of Ls001 (integer written where a REAL is required); a real-first tokenizer mis-types 3.0 as Parameter::Real; expected kernel behavior: reject or warn on a non-integral value in an INTEGER slot; never silently truncate 3.0 to 3; see also Ls001; synonyms: REAL where INTEGER expected, degree given 3.0, count field carries a decimal point, fractional value in integer slot, float literal in STEP integer attribute; the B_SPLINE_CURVE_WITH_KNOTS entity is the defect carrier */ 3HEADER; 4FILE_DESCRIPTION(('Ls053'),'2;1'); 5FILE_NAME('Ls053.stp','2026-06-17T00:00:00',(''),(''),'cad-research-suite','',''); 6FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }')); 7ENDSEC; 8DATA; 9#1=CARTESIAN_POINT('',(0.,0.,0.)); 10#2=CARTESIAN_POINT('',(1.,1.,0.)); 11#3=CARTESIAN_POINT('',(2.,0.,0.)); 12#4=CARTESIAN_POINT('',(3.,1.,0.)); 13/* Defect: the degree slot of B_SPLINE_CURVE_WITH_KNOTS is INTEGER, but 14 the REAL literal 3.0 is written where the integer 3 is required. */ 15#5=B_SPLINE_CURVE_WITH_KNOTS('c',3.0,(#1,#2,#3,#4),.UNSPECIFIED.,.F.,.F.,(4,4),(0.,1.),.UNSPECIFIED.); 16ENDSEC; 17END-ISO-10303-21;