PureXML/Sources/Schema
Mihaela Mihaljevic 6f8222a840 feat(schema): compositional UPA determinism, delete positionCap
The Unique Particle Attribution check no longer inlines group references or caps.
A new CompositionalDeterminism engine computes first/followlast over particle
identities and summarizes each xs:group once, so a multiply-referenced nested
group whose inlined Glushkov automaton would be 2^K positions is checked in
O(nodes * particles^2) time. ContentModelDeterminism now delegates to it and the
inlining position automaton plus positionCap are deleted, closing the last named
interactive-safety resource-bound blocker (production-readiness stopper #4) and
the silent under-rejection the cap caused (stopper #3).

The compositional engine was proven verdict-equivalent to the prior inlining
automaton by a differential over the entire XSTS corpus (zero divergences) before
replacing it. The followlast detail was essential: a first attempt that emitted a
repeating end-item's loop-back and the suffix-first as separate decision sets
under-detected 13 XSTS content models; the differential caught every one.

Verification: XSTS gate unchanged (invalid-schemas-accepted 15, valid-schemas-
rejected 0, instance buckets held); SchemaDeterminismGroupBlowupTests compiles a
2^20-position model without hanging and rejects an ambiguous one the old cap would
have skipped (WASI uses a smaller depth, native time limits gated off WASI); full
suite, style, namespacing, and WASM all pass. The per-particle model and QName-only
overlap are preserved, so the false-positive direction stays at zero.
2026-06-22 22:19:44 +02:00
..
BuiltinType.swift
ComplexType.swift
ComplexValidator.swift fix(schema): optional xs:all group requires its members when present 2026-06-22 18:29:09 +02:00
ComplexValidatorAttributes.swift fix(schema): resolve defaulted/fixed IDREF attributes against IDs 2026-06-22 18:56:36 +02:00
ComplexValidatorContentModel.swift fix(schema): optional xs:all group requires its members when present 2026-06-22 18:29:09 +02:00
ComplexValidatorDerivation.swift
ComplexValidatorHelpers.swift
ComplexValidatorIDs.swift
ComplexValidatorStreaming.swift fix(schema): optional xs:all group requires its members when present 2026-06-22 18:29:09 +02:00
ComplexValidatorXSIType.swift
ContentMatcher.swift
ContentModelDeterminism.swift feat(schema): compositional UPA determinism, delete positionCap 2026-06-22 22:19:44 +02:00
ContentModelDeterminismCompositional.swift feat(schema): compositional UPA determinism, delete positionCap 2026-06-22 22:19:44 +02:00
ContentModelEffectiveModel.swift
ContentNFABuilder.swift
DateTimeParser.swift
DateTimeValue.swift
DecimalValue.swift
DerivationMethod.swift
DurationValue.swift
IdentityConstraint.swift
IdentityFieldType.swift
IdentityFieldValue.swift
IdentityValidator.swift
IdentityValidatorDefaults.swift
IDTracker.swift
Lexical.swift
OccurrenceRange.swift
ParticleNormalization.swift
ParticleRestriction.swift fix(schema): a content-bearing derived group cannot restrict a base element 2026-06-22 19:40:57 +02:00
ParticleRestrictionElement.swift
ParticleRestrictionHelpers.swift
Primitive.swift
RelaxNGCompactHelpers.swift
RelaxNGCompactLexer.swift
RelaxNGCompactParser.swift
RelaxNGContentType.swift
RelaxNGDerivative.swift
RelaxNGDiagnostics.swift
RelaxNGFacets.swift
RelaxNGGrammarCheck.swift
RelaxNGGrammarCheckSections.swift
RelaxNGNameClasses.swift
RelaxNGNode.swift
RelaxNGParser.swift
RelaxNGParserIncludes.swift
RelaxNGPattern.swift
RelaxNGRestrictionChecker.swift
RelaxNGRestrictionOverlap.swift
RelaxNGRestrictionPaths.swift
RelaxNGRestrictions.swift
RelaxNGSchema.swift
SchemaAllGroupPlacement.swift
SchemaAttributeApplicability.swift
SchemaAttributeRestriction.swift
SchemaAttributeUniqueness.swift
SchemaCompileValidation.swift
SchemaCompositionValidations.swift
SchemaContentDerivation.swift fix(schema): a complexContent restriction cannot restrict simple content 2026-06-22 19:40:57 +02:00
SchemaContentOrder.swift
SchemaDerivationControl.swift
SchemaDocument.swift
SchemaDocumentHints.swift
SchemaElementDeclarationsConsistent.swift
SchemaExtensionAllGroup.swift
SchemaFacetApplicability.swift
SchemaIDAttribute.swift
SchemaIdentityXPath.swift
SchemaIDValueConstraint.swift
SchemaImportNamespace.swift
SchemaNameUniqueness.swift
SchemaNestedDefinition.swift
SchemaNotationValidity.swift
SchemaRedefineAttributeGroupRestriction.swift
SchemaRedefineSelfReference.swift
SchemaReferenceForeignPools.swift
SchemaReferenceResolution.swift
SchemaReferences.swift
SchemaSimpleTypeFinal.swift
SchemaSimpleTypeValidity.swift
SchemaStructure.swift
SchemaStructureHelpers.swift
SchemaSubstitutionType.swift
SchemaUndeclaredNamespace.swift
SchemaWildcardNamespace.swift
SchemaXSIAttribute.swift
SimpleType.swift
StreamingXSDValidator.swift
TypeDerivation.swift
XPathQueryCache.swift
XSDAttributeParser.swift
XSDCompletions.swift
XSDComplexContent.swift
XSDContext.swift
XSDDerivation.swift
XSDDerivationTables.swift
XSDParser.swift
XSDParserHelpers.swift
XSDParserParticles.swift fix(schema): optional xs:all group requires its members when present 2026-06-22 18:29:09 +02:00
XSDParserTypeReferences.swift
XSDParserUnion.swift
XSDSchemaValidations.swift
XSDSimpleContentParser.swift
XSDSimpleParser.swift
XSDSimpleParser+Facets.swift
XSDSubstitutionMembers.swift
XSDValidations.swift
XSDWildcardParser.swift