step-examples/12-11-adversarial/Ad049.stp
Sources
- 07-stepcode-ifcopenshell.md T021, T022, T023, T044, T045
- 16-iso-spec.md N015, N016, N017, N018
Description
Per spec, REAL must have `.`; exponent is uppercase `E`; integers may not have leading `.`. Generators emit `1`, `.5`, `1e+18`, `1.0D5`, `+1.0`, `1_000.0`, `1,5` (locale comma), `0x10` (hex). Stepcode silently coerces INTEGER→REAL via `istringstream`, hiding unit-corruption bugs.
Reproducer recipe
`#1=IFCDIRECTION((1,0,0));`, `#1=IFCDIRECTION((1.0D5,0.,0.));`, `#1=IFCREAL(1_000.0);`.
Expected kernel behavior
Strict spec lex rejects with diagnostic; tolerant mode warns and accepts (coerces). Must not silently accept malformed reals.
Notes
**See also**: Ls001.
Expected validation
occt=empty/empty gmsh=empty ifc=schema_n/a
Byte assertions
contains(b'1_000.0') or contains(b'1.5e+02') or contains(b'1.0D5') or matches(rb'\(\s*1\s*,\s*0\s*,')matches(rb'1\.5e\+02|1\.0D5|1_000\.0|\(1,0,0\)')
Tier-3 assertions
load == "ok"
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/* Ad049: malformed REAL literals: '1.0D5' (Fortran D-exponent), '1_000.0' (underscore separator), '1.5e+02' (lowercase e), '(1,0,0)' (INTEGER coordinates without decimal point); Stepcode silently coerces INTEGERâREAL hiding unit-corruption bugs; GEOMETRIC_CURVE_SET IS model entity â OCC yields empty */ 3HEADER; 4FILE_DESCRIPTION(('Ad049'),'2;1'); 5FILE_NAME('Ad049.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.0,0.0)); 10#2=GEOMETRIC_CURVE_SET('',(#1)); 11#3=DIRECTION('integer_coords',(1,0,0)); 12#4=DIRECTION('fortran_d_exp',(1.0D5,0.,0.)); 13#5=DIRECTION('underscore_sep',(1_000.0,0.0,0.0)); 14#6=DIRECTION('lowercase_e_exp',(1.5e+02,0.0,0.0)); 15#7=CARTESIAN_POINT('int_point',(0,0,0)); 16ENDSEC; 17END-ISO-10303-21;