Expand description
Semantics-preserving normalization of a Schema (Layer 4).
Rebuilds the shape arena from the schema roots, hash-consing
structurally-identical nodes (CSE) and applying the sound Boolean/count
simplifications tracked in docs/04-normalization.md. Because the rebuild
interns only what the roots reach, the result is also compacted (no orphan
slots). Recursive SCCs (found via crate::strata) are rebuilt preserving
sharing but not collapsed, so cycles survive.
All rewrites are per-node truth-functional, hence sound under the gfp
validation semantics; the W3C harness cross-checks validate(normalize(S)) ≡ validate(S) on every core test.
Structs§
Functions§
- normalize
- Normalize a schema: CSE + compaction + Boolean/count simplification.
- normalize_
with_ mapping - Normalize a schema and retain explicit raw-to-normalized statement provenance.