Ls001 — REAL literal missing mandatory decimal point

§12.1c numeric-literal grammar

syntax

Sources

Description

ISO 10303-21 grammar requires every REAL to carry a decimal point (`1.`, `1.0`, `0.5`). Generators that print integer values into REAL slots emit `1` where `1.` is required (e.g. `IFCDIRECTION((1,0,0))`). stepcode warns and salvages via `istringstream >> double`; strict readers reject. Implementors Issue 003 records the original disagreement: integers must not be followed by a dot, REALs must be.

Reproducer recipe

`#1=DIRECTION('',(1,0,0));` instead of `(1.,0.,0.)`.

Expected kernel behavior

Strict reject by default; lenient mode auto-promote INTEGER → REAL with a warning. Never silently coerce.

Notes

A primary cause of integer-vs-real type-coercion bugs. **See also**: Ad049, Ls002, Ls003, Ls004, Ls005, Ls006, Ls009. **OCC behavior**: silently coerces the integer to a REAL with no diagnostic; kernel mishandling; the catalog above forbids silent coercion. Synonyms: "REAL with no decimal point", "integer where REAL required", "1 written instead of 1.", "DIRECTION coords missing dots", "STEP REAL missing trailing period". Provenance tier: bytes-only (Q5 full-corpus 2026-07-01).

Expected validation

occt=empty/empty gmsh=empty ifc=schema_n/a

Provenance tier

bytes-only — defect not fully embodied in fixture bytes.

Byte assertions

Tier-3 assertions

Cross-references

Ad049, Ls002, Ls003, Ls004, Ls005, Ls006, Ls009

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes (with defect highlighting)
1ISO-10303-21;
2/* Ls001: REAL literal missing mandatory decimal point; ISO 10303-21 §6.4 grammar requires every REAL to carry a decimal point: 1. or 1.0 or 0.5; generators that print integer values into REAL slots emit 1 where 1. is required; defect: DIRECTION('',(1,0,0)) — integers in all three coordinate slots, no decimal point on any value; stepcode warns and salvages via istringstream >> double; strict readers must reject with decimal-point-required diagnostic; lenient mode may auto-promote INTEGER to REAL with a warning, never silently; implementors Issue 003 records the original disagreement: integers must not be followed by a dot, REALs must be; a primary cause of integer-vs-real type-coercion bugs; bug-reporter synonyms: REAL with no decimal point, integer where REAL required, 1 written instead of 1., DIRECTION coords missing dots, STEP REAL missing trailing period; GEOMETRIC_CURVE_SET IS NOT used — DIRECTION entity is the defect carrier */
3HEADER;
4FILE_DESCRIPTION(('Ls001'),'2;1');
5FILE_NAME('Ls001.stp','2026-06-17T00:00:00',(''),(''),'cad-research-suite','','');
6FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }'));
7ENDSEC;
8DATA;
9/* Defect: integer values in REAL slots — no decimal point. */
10/* ISO 10303-21 §6.4: every REAL must carry a decimal point. */
11#1=DIRECTION('',(1,0,0));
12#2=CARTESIAN_POINT('origin',(0.,0.,0.));
13#3=VECTOR('v',#1,1.);
14#4=LINE('l',#2,#3);
15ENDSEC;
16END-ISO-10303-21;