Expand description
read — STEP source to StepModel plus a provenance Report.
Reading runs in three steps. read first calls into
parser to parse the source, and finally into the
generated readers to turn the entities into the typed model. The step
in between lives here:
non-standard input is healed in place where a safe rewrite exists, and
dropped with a DropReason where none does. The Report accounts
for everything that came in — kept, normalized, or dropped and why.
Structs§
- Drop
Reason - A drop reason: kind + a human label (
<TYPE>/<ENT>: '<slot>' references <TYPE>/ a slot-rule name /via-<root>). Aggregated as instance counts per reason. - Report
- Input-to-model provenance. Every input entity plus every synthetic entity
added by normalization is either kept (
validated) or dropped with a reason (drops):validated + sum(drops) == n_in + n_synth.norm= rewrite (fix) notes from the pre-read normalize pass. The source header (including the identified schema) lives on the model:StepModel::header.
Enums§
- Drop
Kind - Why an entity was dropped before it could enter the model.
NonstandardValue= one of the entity’s own attribute values is nonstandard and could not be normalized (a required reference is missing, an integer field holds a fractional value).NonstandardReference= one of its reference slots points at a target the schema does not admit.Unimplemented= the entity type is outside the generated closure (not yet modeled, or an unknown/non-schema name).Cascade= a referrer whose target was dropped/dangling.Unclassified= the generated read could not consume the entity’s own attributes (off-kind scalar, bad enum token, short arity, …) and no policy layer (normalize /drop_pass) classified it — a frontier signal: investigate and absorb via normalize ornonstd_ref.
Functions§
- read
- Read STEP source into the schema-faithful model, returning a provenance
Report.