@techspokes/typescript-wsdl-client 1.1.4 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +49 -1
- package/dist/app/generateApp.d.ts.map +1 -1
- package/dist/app/generateApp.js +8 -6
- package/dist/cli.js +49 -5
- package/dist/client/checkedDirectRuntime.d.ts +59 -0
- package/dist/client/checkedDirectRuntime.d.ts.map +1 -0
- package/dist/client/checkedDirectRuntime.js +23 -0
- package/dist/client/directClientRuntime.d.ts +49 -0
- package/dist/client/directClientRuntime.d.ts.map +1 -0
- package/dist/client/directClientRuntime.js +112 -0
- package/dist/client/directClientVersion.d.ts +4 -0
- package/dist/client/directClientVersion.d.ts.map +1 -0
- package/dist/client/directClientVersion.js +3 -0
- package/dist/client/generateDirectClient.d.ts +14 -0
- package/dist/client/generateDirectClient.d.ts.map +1 -0
- package/dist/client/generateDirectClient.js +136 -0
- package/dist/compiler/buildCanonicalGraph.d.ts +7 -0
- package/dist/compiler/buildCanonicalGraph.d.ts.map +1 -0
- package/dist/compiler/buildCanonicalGraph.js +381 -0
- package/dist/compiler/canonicalGraph.d.ts +198 -0
- package/dist/compiler/canonicalGraph.d.ts.map +1 -0
- package/dist/compiler/canonicalGraph.js +37 -0
- package/dist/compiler/catalogErrors.d.ts +18 -0
- package/dist/compiler/catalogErrors.d.ts.map +1 -0
- package/dist/compiler/catalogErrors.js +86 -0
- package/dist/compiler/catalogProvenance.d.ts +15 -0
- package/dist/compiler/catalogProvenance.d.ts.map +1 -0
- package/dist/compiler/catalogProvenance.js +229 -0
- package/dist/compiler/checkedAssessment.d.ts +91 -0
- package/dist/compiler/checkedAssessment.d.ts.map +1 -0
- package/dist/compiler/checkedAssessment.js +300 -0
- package/dist/compiler/checkedSourcePreparation.d.ts +35 -0
- package/dist/compiler/checkedSourcePreparation.d.ts.map +1 -0
- package/dist/compiler/checkedSourcePreparation.js +131 -0
- package/dist/compiler/complexTypeContent.d.ts +59 -0
- package/dist/compiler/complexTypeContent.d.ts.map +1 -0
- package/dist/compiler/complexTypeContent.js +558 -0
- package/dist/compiler/composeCanonicalGraph.d.ts +69 -0
- package/dist/compiler/composeCanonicalGraph.d.ts.map +1 -0
- package/dist/compiler/composeCanonicalGraph.js +252 -0
- package/dist/compiler/dataOwnership.d.ts +22 -0
- package/dist/compiler/dataOwnership.d.ts.map +1 -0
- package/dist/compiler/dataOwnership.js +157 -0
- package/dist/compiler/datatypeValues.d.ts +47 -0
- package/dist/compiler/datatypeValues.d.ts.map +1 -0
- package/dist/compiler/datatypeValues.js +275 -0
- package/dist/compiler/directCodec.d.ts +59 -0
- package/dist/compiler/directCodec.d.ts.map +1 -0
- package/dist/compiler/directCodec.js +192 -0
- package/dist/compiler/directExecutionPolicy.d.ts +10 -0
- package/dist/compiler/directExecutionPolicy.d.ts.map +1 -0
- package/dist/compiler/directExecutionPolicy.js +17 -0
- package/dist/compiler/directOperation.d.ts +72 -0
- package/dist/compiler/directOperation.d.ts.map +1 -0
- package/dist/compiler/directOperation.js +282 -0
- package/dist/compiler/directSoap.d.ts +42 -0
- package/dist/compiler/directSoap.d.ts.map +1 -0
- package/dist/compiler/directSoap.js +298 -0
- package/dist/compiler/directSoapSource.d.ts +15 -0
- package/dist/compiler/directSoapSource.d.ts.map +1 -0
- package/dist/compiler/directSoapSource.js +86 -0
- package/dist/compiler/directSourceCapsule.d.ts +97 -0
- package/dist/compiler/directSourceCapsule.d.ts.map +1 -0
- package/dist/compiler/directSourceCapsule.js +305 -0
- package/dist/compiler/directStructure.d.ts +51 -0
- package/dist/compiler/directStructure.d.ts.map +1 -0
- package/dist/compiler/directStructure.js +252 -0
- package/dist/compiler/directStructurePlan.d.ts +16 -0
- package/dist/compiler/directStructurePlan.d.ts.map +1 -0
- package/dist/compiler/directStructurePlan.js +58 -0
- package/dist/compiler/directValues.d.ts +69 -0
- package/dist/compiler/directValues.d.ts.map +1 -0
- package/dist/compiler/directValues.js +282 -0
- package/dist/compiler/finiteRe01Verification.d.ts +140 -0
- package/dist/compiler/finiteRe01Verification.d.ts.map +1 -0
- package/dist/compiler/finiteRe01Verification.js +830 -0
- package/dist/compiler/graphTraversal.d.ts +11 -0
- package/dist/compiler/graphTraversal.d.ts.map +1 -0
- package/dist/compiler/graphTraversal.js +37 -0
- package/dist/compiler/hypotheticalScopedIdentity.d.ts +23 -0
- package/dist/compiler/hypotheticalScopedIdentity.d.ts.map +1 -0
- package/dist/compiler/hypotheticalScopedIdentity.js +81 -0
- package/dist/compiler/occurrenceAnalysis.d.ts +65 -0
- package/dist/compiler/occurrenceAnalysis.d.ts.map +1 -0
- package/dist/compiler/occurrenceAnalysis.js +300 -0
- package/dist/compiler/originalSourceMembership.d.ts +6 -0
- package/dist/compiler/originalSourceMembership.d.ts.map +1 -0
- package/dist/compiler/originalSourceMembership.js +31 -0
- package/dist/compiler/particleAttribution.d.ts +17 -0
- package/dist/compiler/particleAttribution.d.ts.map +1 -0
- package/dist/compiler/particleAttribution.js +474 -0
- package/dist/compiler/particleDeclarationConsistency.d.ts +24 -0
- package/dist/compiler/particleDeclarationConsistency.d.ts.map +1 -0
- package/dist/compiler/particleDeclarationConsistency.js +197 -0
- package/dist/compiler/particleExtension.d.ts +22 -0
- package/dist/compiler/particleExtension.d.ts.map +1 -0
- package/dist/compiler/particleExtension.js +119 -0
- package/dist/compiler/particleLocalAssessment.d.ts +20 -0
- package/dist/compiler/particleLocalAssessment.d.ts.map +1 -0
- package/dist/compiler/particleLocalAssessment.js +92 -0
- package/dist/compiler/particleRestriction.d.ts +24 -0
- package/dist/compiler/particleRestriction.d.ts.map +1 -0
- package/dist/compiler/particleRestriction.js +489 -0
- package/dist/compiler/particleSemanticView.d.ts +50 -0
- package/dist/compiler/particleSemanticView.d.ts.map +1 -0
- package/dist/compiler/particleSemanticView.js +297 -0
- package/dist/compiler/particleWildcardRelation.d.ts +88 -0
- package/dist/compiler/particleWildcardRelation.d.ts.map +1 -0
- package/dist/compiler/particleWildcardRelation.js +143 -0
- package/dist/compiler/re01CandidateCorrespondence.d.ts +64 -0
- package/dist/compiler/re01CandidateCorrespondence.d.ts.map +1 -0
- package/dist/compiler/re01CandidateCorrespondence.js +572 -0
- package/dist/compiler/re01TypeProperties.d.ts +71 -0
- package/dist/compiler/re01TypeProperties.d.ts.map +1 -0
- package/dist/compiler/re01TypeProperties.js +120 -0
- package/dist/compiler/re01TypePropertyValidation.d.ts +23 -0
- package/dist/compiler/re01TypePropertyValidation.d.ts.map +1 -0
- package/dist/compiler/re01TypePropertyValidation.js +161 -0
- package/dist/compiler/resolveCanonicalGraph.d.ts +38 -0
- package/dist/compiler/resolveCanonicalGraph.d.ts.map +1 -0
- package/dist/compiler/resolveCanonicalGraph.js +170 -0
- package/dist/compiler/scalarSchemaAssessment.d.ts +425 -0
- package/dist/compiler/scalarSchemaAssessment.d.ts.map +1 -0
- package/dist/compiler/scalarSchemaAssessment.js +5198 -0
- package/dist/compiler/schemaAttributeGroupProperties.d.ts +17 -0
- package/dist/compiler/schemaAttributeGroupProperties.d.ts.map +1 -0
- package/dist/compiler/schemaAttributeGroupProperties.js +53 -0
- package/dist/compiler/schemaAttributeProperties.d.ts +10 -0
- package/dist/compiler/schemaAttributeProperties.d.ts.map +1 -0
- package/dist/compiler/schemaAttributeProperties.js +11 -0
- package/dist/compiler/schemaAttributeUses.d.ts +90 -0
- package/dist/compiler/schemaAttributeUses.d.ts.map +1 -0
- package/dist/compiler/schemaAttributeUses.js +725 -0
- package/dist/compiler/schemaBinaryWordReconstruction.d.ts +10 -0
- package/dist/compiler/schemaBinaryWordReconstruction.d.ts.map +1 -0
- package/dist/compiler/schemaBinaryWordReconstruction.js +33 -0
- package/dist/compiler/schemaBuiltinFacets.d.ts +14 -0
- package/dist/compiler/schemaBuiltinFacets.d.ts.map +1 -0
- package/dist/compiler/schemaBuiltinFacets.js +51 -0
- package/dist/compiler/schemaCalendarImages.d.ts +8 -0
- package/dist/compiler/schemaCalendarImages.d.ts.map +1 -0
- package/dist/compiler/schemaCalendarImages.js +204 -0
- package/dist/compiler/schemaCalendarLanguage.d.ts +11 -0
- package/dist/compiler/schemaCalendarLanguage.d.ts.map +1 -0
- package/dist/compiler/schemaCalendarLanguage.js +227 -0
- package/dist/compiler/schemaComponentEquality.d.ts +28 -0
- package/dist/compiler/schemaComponentEquality.d.ts.map +1 -0
- package/dist/compiler/schemaComponentEquality.js +446 -0
- package/dist/compiler/schemaConstructionAssessment.d.ts +46 -0
- package/dist/compiler/schemaConstructionAssessment.d.ts.map +1 -0
- package/dist/compiler/schemaConstructionAssessment.js +663 -0
- package/dist/compiler/schemaDatatypeValues.d.ts +4 -0
- package/dist/compiler/schemaDatatypeValues.d.ts.map +1 -0
- package/dist/compiler/schemaDatatypeValues.js +2 -0
- package/dist/compiler/schemaDecimalLanguage.d.ts +7 -0
- package/dist/compiler/schemaDecimalLanguage.d.ts.map +1 -0
- package/dist/compiler/schemaDecimalLanguage.js +102 -0
- package/dist/compiler/schemaDeclarationPrimitives.d.ts +34 -0
- package/dist/compiler/schemaDeclarationPrimitives.d.ts.map +1 -0
- package/dist/compiler/schemaDeclarationPrimitives.js +194 -0
- package/dist/compiler/schemaDocumentSyntax.d.ts +55 -0
- package/dist/compiler/schemaDocumentSyntax.d.ts.map +1 -0
- package/dist/compiler/schemaDocumentSyntax.js +294 -0
- package/dist/compiler/schemaDurationLanguage.d.ts +11 -0
- package/dist/compiler/schemaDurationLanguage.d.ts.map +1 -0
- package/dist/compiler/schemaDurationLanguage.js +170 -0
- package/dist/compiler/schemaElementProperties.d.ts +16 -0
- package/dist/compiler/schemaElementProperties.d.ts.map +1 -0
- package/dist/compiler/schemaElementProperties.js +23 -0
- package/dist/compiler/schemaEndpointWordCapacity.d.ts +36 -0
- package/dist/compiler/schemaEndpointWordCapacity.d.ts.map +1 -0
- package/dist/compiler/schemaEndpointWordCapacity.js +39 -0
- package/dist/compiler/schemaExactCalendar.d.ts +73 -0
- package/dist/compiler/schemaExactCalendar.d.ts.map +1 -0
- package/dist/compiler/schemaExactCalendar.js +264 -0
- package/dist/compiler/schemaFacetAnnotation.d.ts +32 -0
- package/dist/compiler/schemaFacetAnnotation.d.ts.map +1 -0
- package/dist/compiler/schemaFacetAnnotation.js +199 -0
- package/dist/compiler/schemaGeneratedScalarShape.d.ts +35 -0
- package/dist/compiler/schemaGeneratedScalarShape.d.ts.map +1 -0
- package/dist/compiler/schemaGeneratedScalarShape.js +176 -0
- package/dist/compiler/schemaIdentityConstraints.d.ts +73 -0
- package/dist/compiler/schemaIdentityConstraints.d.ts.map +1 -0
- package/dist/compiler/schemaIdentityConstraints.js +362 -0
- package/dist/compiler/schemaIeeeLanguage.d.ts +43 -0
- package/dist/compiler/schemaIeeeLanguage.d.ts.map +1 -0
- package/dist/compiler/schemaIeeeLanguage.js +759 -0
- package/dist/compiler/schemaIntegerImages.d.ts +11 -0
- package/dist/compiler/schemaIntegerImages.d.ts.map +1 -0
- package/dist/compiler/schemaIntegerImages.js +113 -0
- package/dist/compiler/schemaLexicalPredicates.d.ts +29 -0
- package/dist/compiler/schemaLexicalPredicates.d.ts.map +1 -0
- package/dist/compiler/schemaLexicalPredicates.js +63 -0
- package/dist/compiler/schemaNotationProperties.d.ts +32 -0
- package/dist/compiler/schemaNotationProperties.d.ts.map +1 -0
- package/dist/compiler/schemaNotationProperties.js +84 -0
- package/dist/compiler/schemaNumericImageConditions.d.ts +24 -0
- package/dist/compiler/schemaNumericImageConditions.d.ts.map +1 -0
- package/dist/compiler/schemaNumericImageConditions.js +66 -0
- package/dist/compiler/schemaParticleWildcardProperties.d.ts +20 -0
- package/dist/compiler/schemaParticleWildcardProperties.d.ts.map +1 -0
- package/dist/compiler/schemaParticleWildcardProperties.js +43 -0
- package/dist/compiler/schemaPattern.d.ts +1062 -0
- package/dist/compiler/schemaPattern.d.ts.map +1 -0
- package/dist/compiler/schemaPattern.js +581 -0
- package/dist/compiler/schemaRegularLanguage.d.ts +67 -0
- package/dist/compiler/schemaRegularLanguage.d.ts.map +1 -0
- package/dist/compiler/schemaRegularLanguage.js +1166 -0
- package/dist/compiler/schemaScalarContext.d.ts +81 -0
- package/dist/compiler/schemaScalarContext.d.ts.map +1 -0
- package/dist/compiler/schemaScalarContext.js +78 -0
- package/dist/compiler/schemaScalarKernel.d.ts +182 -0
- package/dist/compiler/schemaScalarKernel.d.ts.map +1 -0
- package/dist/compiler/schemaScalarKernel.js +391 -0
- package/dist/compiler/schemaScalarWitnesses.d.ts +6 -0
- package/dist/compiler/schemaScalarWitnesses.d.ts.map +1 -0
- package/dist/compiler/schemaScalarWitnesses.js +118 -0
- package/dist/compiler/schemaSimpleTypeProperties.d.ts +95 -0
- package/dist/compiler/schemaSimpleTypeProperties.d.ts.map +1 -0
- package/dist/compiler/schemaSimpleTypeProperties.js +103 -0
- package/dist/compiler/schemaSourceGrammar.d.ts +27 -0
- package/dist/compiler/schemaSourceGrammar.d.ts.map +1 -0
- package/dist/compiler/schemaSourceGrammar.js +290 -0
- package/dist/compiler/schemaSourceLexical.d.ts +4 -0
- package/dist/compiler/schemaSourceLexical.d.ts.map +1 -0
- package/dist/compiler/schemaSourceLexical.js +12 -0
- package/dist/compiler/schemaSourceValues.d.ts +51 -0
- package/dist/compiler/schemaSourceValues.d.ts.map +1 -0
- package/dist/compiler/schemaSourceValues.js +225 -0
- package/dist/compiler/schemaSourceWildcards.d.ts +28 -0
- package/dist/compiler/schemaSourceWildcards.d.ts.map +1 -0
- package/dist/compiler/schemaSourceWildcards.js +247 -0
- package/dist/compiler/schemaSymbolicSequences.d.ts +16 -0
- package/dist/compiler/schemaSymbolicSequences.d.ts.map +1 -0
- package/dist/compiler/schemaSymbolicSequences.js +99 -0
- package/dist/compiler/schemaSymbolicValueSets.d.ts +32 -0
- package/dist/compiler/schemaSymbolicValueSets.d.ts.map +1 -0
- package/dist/compiler/schemaSymbolicValueSets.js +149 -0
- package/dist/compiler/schemaSyntaxAssessment.d.ts +25 -0
- package/dist/compiler/schemaSyntaxAssessment.d.ts.map +1 -0
- package/dist/compiler/schemaSyntaxAssessment.js +361 -0
- package/dist/compiler/schemaTemporalAliases.d.ts +6 -0
- package/dist/compiler/schemaTemporalAliases.d.ts.map +1 -0
- package/dist/compiler/schemaTemporalAliases.js +195 -0
- package/dist/compiler/schemaTokenImages.d.ts +9 -0
- package/dist/compiler/schemaTokenImages.d.ts.map +1 -0
- package/dist/compiler/schemaTokenImages.js +142 -0
- package/dist/compiler/schemaTypeIdentity.d.ts +39 -0
- package/dist/compiler/schemaTypeIdentity.d.ts.map +1 -0
- package/dist/compiler/schemaTypeIdentity.js +78 -0
- package/dist/compiler/schemaTypeRelations.d.ts +38 -0
- package/dist/compiler/schemaTypeRelations.d.ts.map +1 -0
- package/dist/compiler/schemaTypeRelations.js +576 -0
- package/dist/compiler/schemaUri.d.ts +13 -0
- package/dist/compiler/schemaUri.d.ts.map +1 -0
- package/dist/compiler/schemaUri.js +103 -0
- package/dist/compiler/schemaValueContext.d.ts +26 -0
- package/dist/compiler/schemaValueContext.d.ts.map +1 -0
- package/dist/compiler/schemaValueContext.js +1 -0
- package/dist/compiler/schemaValueImages.d.ts +10 -0
- package/dist/compiler/schemaValueImages.d.ts.map +1 -0
- package/dist/compiler/schemaValueImages.js +142 -0
- package/dist/compiler/schemaValueSequences.d.ts +15 -0
- package/dist/compiler/schemaValueSequences.d.ts.map +1 -0
- package/dist/compiler/schemaValueSequences.js +19 -0
- package/dist/compiler/semanticBudget.d.ts +50 -0
- package/dist/compiler/semanticBudget.d.ts.map +1 -0
- package/dist/compiler/semanticBudget.js +178 -0
- package/dist/compiler/semanticCatalog.d.ts +122 -0
- package/dist/compiler/semanticCatalog.d.ts.map +1 -0
- package/dist/compiler/semanticCatalog.js +160 -0
- package/dist/compiler/semanticContext.d.ts +172 -0
- package/dist/compiler/semanticContext.d.ts.map +1 -0
- package/dist/compiler/semanticContext.js +1168 -0
- package/dist/compiler/semanticTypeDependencies.d.ts +8 -0
- package/dist/compiler/semanticTypeDependencies.d.ts.map +1 -0
- package/dist/compiler/semanticTypeDependencies.js +64 -0
- package/dist/compiler/semanticTypeReference.d.ts +24 -0
- package/dist/compiler/semanticTypeReference.d.ts.map +1 -0
- package/dist/compiler/semanticTypeReference.js +36 -0
- package/dist/compiler/shapeResolver.d.ts +1 -0
- package/dist/compiler/shapeResolver.d.ts.map +1 -1
- package/dist/compiler/shapeResolver.js +7 -9
- package/dist/compiler/sourceSchemaBinding.d.ts +26 -0
- package/dist/compiler/sourceSchemaBinding.d.ts.map +1 -0
- package/dist/compiler/sourceSchemaBinding.js +39 -0
- package/dist/compiler/structuralCompanions.d.ts +16 -0
- package/dist/compiler/structuralCompanions.d.ts.map +1 -0
- package/dist/compiler/structuralCompanions.js +232 -0
- package/dist/compiler/validateSemanticGraph.d.ts +5 -0
- package/dist/compiler/validateSemanticGraph.d.ts.map +1 -0
- package/dist/compiler/validateSemanticGraph.js +376 -0
- package/dist/compiler/wildcardAlgebra.d.ts +26 -0
- package/dist/compiler/wildcardAlgebra.d.ts.map +1 -0
- package/dist/compiler/wildcardAlgebra.js +155 -0
- package/dist/gateway/generateGateway.d.ts.map +1 -1
- package/dist/gateway/generateGateway.js +2 -2
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/loader/orderedSyntax.d.ts +77 -0
- package/dist/loader/orderedSyntax.d.ts.map +1 -0
- package/dist/loader/orderedSyntax.js +202 -0
- package/dist/loader/resolutionDepth.d.ts +7 -0
- package/dist/loader/resolutionDepth.d.ts.map +1 -0
- package/dist/loader/resolutionDepth.js +65 -0
- package/dist/loader/schemaInput.d.ts +53 -0
- package/dist/loader/schemaInput.d.ts.map +1 -0
- package/dist/loader/schemaInput.js +212 -0
- package/dist/loader/schemaResources.d.ts +59 -0
- package/dist/loader/schemaResources.d.ts.map +1 -0
- package/dist/loader/schemaResources.js +292 -0
- package/dist/openapi/generateOpenAPI.d.ts.map +1 -1
- package/dist/openapi/generateOpenAPI.js +2 -2
- package/dist/test/generateTests.d.ts.map +1 -1
- package/dist/test/generateTests.js +2 -2
- package/dist/util/xmlWhitespace.d.ts +3 -0
- package/dist/util/xmlWhitespace.d.ts.map +1 -0
- package/dist/util/xmlWhitespace.js +4 -0
- package/docs/README.md +14 -1
- package/docs/architecture.md +9 -0
- package/docs/cli-reference.md +21 -1
- package/docs/content-model-analysis.md +92 -0
- package/docs/content-model-baseline.md +121 -0
- package/docs/content-model-catalog.md +116 -0
- package/docs/content-model-companions.md +90 -0
- package/docs/content-model-composition.md +103 -0
- package/docs/content-model-decisions.md +79 -0
- package/docs/content-model-gateway-feasibility.md +169 -0
- package/docs/content-model-graph.md +121 -0
- package/docs/content-model-loading.md +163 -0
- package/docs/content-model-matching.md +85 -0
- package/docs/content-model-readiness.md +144 -0
- package/docs/content-model-resolution.md +81 -0
- package/docs/content-model-s02-handoff.md +98 -0
- package/docs/content-model-s06-au-01.md +425 -0
- package/docs/content-model-s06-dt-01.md +386 -0
- package/docs/content-model-s06-pw-01.md +350 -0
- package/docs/content-model-s06-re-01-resolver-implementation.md +869 -0
- package/docs/content-model-s06-re-01-resolver.md +513 -0
- package/docs/content-model-s06-re-01-scalar-witnesses.md +1423 -0
- package/docs/content-model-s06-re-01-support-reconstruction.md +6337 -0
- package/docs/content-model-s06-re-01.md +7477 -0
- package/docs/content-model-s06-research-handoff.md +909 -0
- package/docs/content-model-shipped-fix.md +83 -0
- package/docs/content-model-soap-feasibility.md +165 -0
- package/docs/decisions/002-streamable-responses.md +2 -0
- package/docs/decisions/003-content-model-contracts.md +280 -0
- package/docs/direct-values.md +311 -0
- package/docs/reference-validation.md +243 -0
- package/docs/releases/v1.1.5.md +38 -0
- package/docs/roadmap/README.md +2 -2
- package/docs/supported-patterns.md +13 -5
- package/package.json +26 -13
- package/src/generation/preambles/direct-client/typescript.preamble +3 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Shared-core reconstruction after all complete native WORD predicates are compiled. */
|
|
2
|
+
import type { RegularLanguage } from './schemaRegularLanguage.js';
|
|
3
|
+
import { schemaRegularLanguages } from './schemaRegularLanguage.js';
|
|
4
|
+
import type { SchemaPatternContext } from './schemaValueContext.js';
|
|
5
|
+
/** No semantic authority is issued here: callers supply exact masks from native owners. */
|
|
6
|
+
export declare function reconstructBinaryWords<Owner>(c: SchemaPatternContext<Owner>, regular: ReturnType<typeof schemaRegularLanguages<Owner>>, masks: readonly RegularLanguage[], binaryMask: RegularLanguage, literal: (word: string) => RegularLanguage, owner: Owner): Readonly<{
|
|
7
|
+
core: string;
|
|
8
|
+
words: readonly string[];
|
|
9
|
+
}> | undefined;
|
|
10
|
+
//# sourceMappingURL=schemaBinaryWordReconstruction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemaBinaryWordReconstruction.d.ts","sourceRoot":"","sources":["../../src/compiler/schemaBinaryWordReconstruction.ts"],"names":[],"mappings":"AAAA,yFAAyF;AACzF,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAC,sBAAsB,EAAC,MAAM,4BAA4B,CAAC;AAClE,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,yBAAyB,CAAC;AAElE,2FAA2F;AAC3F,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,CAAC,EAAE,oBAAoB,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,UAAU,CAAC,OAAO,sBAAsB,CAAC,KAAK,CAAC,CAAC,EACrI,KAAK,EAAE,SAAS,eAAe,EAAE,EAAE,UAAU,EAAE,eAAe,EAAE,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,eAAe,EAC1G,KAAK,EAAE,KAAK,GAAG,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAA;CAAC,CAAC,GAAG,SAAS,CAsB9E"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { schemaRegularLanguages } from './schemaRegularLanguage.js';
|
|
2
|
+
/** No semantic authority is issued here: callers supply exact masks from native owners. */
|
|
3
|
+
export function reconstructBinaryWords(c, regular, masks, binaryMask, literal, owner) {
|
|
4
|
+
const erased = [{ lo: 9, hi: 10, remove: true }, { lo: 13, hi: 13, remove: true }, { lo: 32, hi: 32, remove: true }];
|
|
5
|
+
c.step(owner, masks.length * 2 + 8);
|
|
6
|
+
const projected = masks.map(mask => regular.characterImage(mask, erased, owner));
|
|
7
|
+
projected.push(regular.characterImage(binaryMask, erased, owner));
|
|
8
|
+
const core = regular.witness(regular.intersect(projected, owner), owner);
|
|
9
|
+
if (core === undefined)
|
|
10
|
+
return undefined;
|
|
11
|
+
// The complete erasure inverse has arbitrary XML whitespace at every cut.
|
|
12
|
+
// literal() quotes complete words; whitespace alternatives stay private to
|
|
13
|
+
// this regular factory, so no externally fabricated language handle enters.
|
|
14
|
+
const whitespace = regular.union([literal(' '), literal('\t'), literal('\r'), literal('\n')], owner);
|
|
15
|
+
const gaps = regular.repeat(whitespace, 0, 'unbounded', owner);
|
|
16
|
+
c.step(owner, core.length * 3 + 4);
|
|
17
|
+
const pieces = [gaps];
|
|
18
|
+
for (const character of core) {
|
|
19
|
+
c.step(owner, 3 + character.length);
|
|
20
|
+
pieces.push(literal(character), gaps);
|
|
21
|
+
}
|
|
22
|
+
const inverse = regular.concatenate(pieces, owner);
|
|
23
|
+
c.step(owner, masks.length * 2 + 2);
|
|
24
|
+
const words = [];
|
|
25
|
+
for (const mask of masks) {
|
|
26
|
+
const word = regular.witness(regular.intersect([mask, inverse], owner), owner);
|
|
27
|
+
if (word === undefined)
|
|
28
|
+
throw new TypeError('A projected binary core must have an actual WORD preimage');
|
|
29
|
+
c.step(owner, word.length + 2);
|
|
30
|
+
words.push(word);
|
|
31
|
+
}
|
|
32
|
+
return { core, words };
|
|
33
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { SchemaValueContext } from './schemaValueContext.js';
|
|
2
|
+
export type IntrinsicScalarFacet = Readonly<{
|
|
3
|
+
name: string;
|
|
4
|
+
kind: 'integer' | 'bound' | 'whiteSpace';
|
|
5
|
+
value: string;
|
|
6
|
+
fixed: boolean;
|
|
7
|
+
}>;
|
|
8
|
+
export type IntrinsicFacetProperties = Readonly<{
|
|
9
|
+
scalars: readonly IntrinsicScalarFacet[];
|
|
10
|
+
patterns: readonly string[];
|
|
11
|
+
}>;
|
|
12
|
+
export declare const LIST_CONSTRUCTOR_FACETS: IntrinsicFacetProperties;
|
|
13
|
+
export declare function schemaBuiltinFacetProperties<Owner>(name: string, owner: Owner, c: Pick<SchemaValueContext<Owner>, 'step' | 'text'>): IntrinsicFacetProperties;
|
|
14
|
+
//# sourceMappingURL=schemaBuiltinFacets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemaBuiltinFacets.d.ts","sourceRoot":"","sources":["../../src/compiler/schemaBuiltinFacets.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,yBAAyB,CAAC;AAEhE,MAAM,MAAM,oBAAoB,GAAG,QAAQ,CAAC;IAC1C,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,SAAS,GAAG,OAAO,GAAG,YAAY,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,OAAO,CAAC;CACvF,CAAC,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,QAAQ,CAAC;IAC9C,OAAO,EAAE,SAAS,oBAAoB,EAAE,CAAC;IAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;CACvE,CAAC,CAAC;AACH,eAAO,MAAM,uBAAuB,EAAE,wBAGpC,CAAC;AAKH,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAC5E,CAAC,EAAE,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG,wBAAwB,CA0B/E"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/** Exact derived-builtin facet components from dated Datatypes Appendix A.
|
|
2
|
+
* Primitive normalization behavior is separate: primitive {facets} is empty.
|
|
3
|
+
*/
|
|
4
|
+
import { builtinListItem, builtinParents, integerBounds } from './schemaDatatypeValues.js';
|
|
5
|
+
export const LIST_CONSTRUCTOR_FACETS = Object.freeze({
|
|
6
|
+
scalars: Object.freeze([Object.freeze({ name: 'whiteSpace', kind: 'whiteSpace', value: 'collapse', fixed: true })]),
|
|
7
|
+
patterns: Object.freeze([]),
|
|
8
|
+
});
|
|
9
|
+
const exactPatterns = Object.freeze({
|
|
10
|
+
language: '[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*', NMTOKEN: '\\c+', Name: '\\i\\c*',
|
|
11
|
+
NCName: '[\\i-[:]][\\c-[:]]*', integer: '[\\-+]?[0-9]+',
|
|
12
|
+
});
|
|
13
|
+
export function schemaBuiltinFacetProperties(name, owner, c) {
|
|
14
|
+
c.step(owner, 5);
|
|
15
|
+
if (builtinListItem(name)) {
|
|
16
|
+
c.step(owner, 6);
|
|
17
|
+
return { scalars: [...LIST_CONSTRUCTOR_FACETS.scalars, { name: 'minLength', kind: 'integer', value: '1', fixed: false }], patterns: [] };
|
|
18
|
+
}
|
|
19
|
+
const path = [], scalars = new Map(), patterns = [];
|
|
20
|
+
for (let current = name; builtinParents[current]; current = builtinParents[current]) {
|
|
21
|
+
c.step(owner, 2);
|
|
22
|
+
path.push(current);
|
|
23
|
+
}
|
|
24
|
+
for (let index = path.length - 1; index >= 0; index--) {
|
|
25
|
+
c.step(owner, 6);
|
|
26
|
+
const current = path[index], pattern = exactPatterns[current];
|
|
27
|
+
if (pattern !== undefined) {
|
|
28
|
+
c.text(pattern, owner);
|
|
29
|
+
patterns.push(pattern);
|
|
30
|
+
}
|
|
31
|
+
if (current === 'normalizedString' || current === 'token')
|
|
32
|
+
scalars.set('whiteSpace', {
|
|
33
|
+
name: 'whiteSpace', kind: 'whiteSpace', value: current === 'token' ? 'collapse' : 'replace', fixed: false,
|
|
34
|
+
});
|
|
35
|
+
if (current === 'integer')
|
|
36
|
+
scalars.set('fractionDigits', { name: 'fractionDigits', kind: 'integer', value: '0', fixed: true });
|
|
37
|
+
const bounds = integerBounds[current];
|
|
38
|
+
if (bounds)
|
|
39
|
+
for (const position of [0, 1]) {
|
|
40
|
+
c.step(owner, 4);
|
|
41
|
+
const value = bounds[position];
|
|
42
|
+
if (value !== undefined) {
|
|
43
|
+
c.text(value, owner);
|
|
44
|
+
const boundName = position === 0 ? 'minInclusive' : 'maxInclusive';
|
|
45
|
+
scalars.set(boundName, { name: boundName, kind: 'bound', value, fixed: false });
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
c.step(owner, scalars.size + 2);
|
|
50
|
+
return { scalars: [...scalars.values()], patterns };
|
|
51
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CalendarFamily } from './schemaExactCalendar.js';
|
|
2
|
+
import type { RegularLanguage } from './schemaRegularLanguage.js';
|
|
3
|
+
import { schemaRegularLanguages } from './schemaRegularLanguage.js';
|
|
4
|
+
import type { SchemaPatternContext } from './schemaValueContext.js';
|
|
5
|
+
export declare function schemaCalendarImages<Owner>(c: SchemaPatternContext<Owner>, regular: ReturnType<typeof schemaRegularLanguages<Owner>>, expression: (text: string, owner: Owner) => RegularLanguage): {
|
|
6
|
+
image: (source: RegularLanguage, family: CalendarFamily, owner: Owner) => RegularLanguage;
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=schemaCalendarImages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemaCalendarImages.d.ts","sourceRoot":"","sources":["../../src/compiler/schemaCalendarImages.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAiB,cAAc,EAAC,MAAM,0BAA0B,CAAC;AAC7E,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAC,sBAAsB,EAAC,MAAM,4BAA4B,CAAC;AAGlE,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,yBAAyB,CAAC;AAElE,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,CAAC,EAAE,oBAAoB,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,UAAU,CAAC,OAAO,sBAAsB,CAAC,KAAK,CAAC,CAAC,EACnI,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,KAAK,eAAe;oBASpC,eAAe,UAAU,cAAc,SAAS,KAAK,KAAG,eAAe;EAsH/F"}
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
/** Finite field-boundary images of exact DT A calendar values. */
|
|
2
|
+
import { parseCalendar, parseReduced, showInstant } from './schemaExactCalendar.js';
|
|
3
|
+
import { schemaRegularLanguages } from './schemaRegularLanguage.js';
|
|
4
|
+
import { schemaCalendarLanguages } from './schemaCalendarLanguage.js';
|
|
5
|
+
import { schemaIntegerImages } from './schemaIntegerImages.js';
|
|
6
|
+
export function schemaCalendarImages(c, regular, expression) {
|
|
7
|
+
const calendars = schemaCalendarLanguages(c, regular, expression), integers = schemaIntegerImages(c, regular, expression);
|
|
8
|
+
const quote = (text, owner) => { c.text(text, owner); c.step(owner, text.length * 2 + 1); return expression(text.replace(/[\\.\-^?*+{}()\[\]|]/g, '\\$&'), owner); };
|
|
9
|
+
const padded = (language, owner) => {
|
|
10
|
+
c.step(owner, 3);
|
|
11
|
+
const choices = [regular.intersect([language, expression('[1-9][0-9]{3,}', owner)], owner)];
|
|
12
|
+
for (let size = 1; size < 4; size++) {
|
|
13
|
+
c.step(owner, 16);
|
|
14
|
+
choices.push(regular.concatenate([expression('0'.repeat(4 - size), owner),
|
|
15
|
+
regular.intersect([language, expression('[0-9]{' + size + '}', owner)], owner)], owner));
|
|
16
|
+
}
|
|
17
|
+
return regular.union(choices, owner);
|
|
18
|
+
};
|
|
19
|
+
const image = (source, family, owner) => {
|
|
20
|
+
const b = { charge: count => c.step(owner, count), arithmetic: digits => c.step(owner, (digits + 4) ** 2), text: value => { c.text(value, owner); } };
|
|
21
|
+
c.step(owner, 4);
|
|
22
|
+
const images = [], epsilon = quote('', owner), yearPresent = ['date', 'dateTime', 'gYear', 'gYearMonth'].includes(family);
|
|
23
|
+
const sourceProgram = regular.automaton(source, owner), suffixCache = new Map();
|
|
24
|
+
c.step(owner, sourceProgram.states.length * 3 + 2);
|
|
25
|
+
const finals = sourceProgram.states.flatMap((state, index) => state.accepting ? [index] : []);
|
|
26
|
+
const prefixFor = (suffix) => {
|
|
27
|
+
c.text(suffix, owner);
|
|
28
|
+
let current = finals;
|
|
29
|
+
for (let offset = suffix.length - 1; offset >= 0; offset--) {
|
|
30
|
+
c.step(owner, current.length * 16 + 8);
|
|
31
|
+
const key = suffix.charCodeAt(offset) + ':' + JSON.stringify(current), known = suffixCache.get(key);
|
|
32
|
+
if (known) {
|
|
33
|
+
current = known;
|
|
34
|
+
continue;
|
|
35
|
+
}
|
|
36
|
+
c.step(owner, current.length * 2 + 3);
|
|
37
|
+
const accepted = new Set(current), previous = [];
|
|
38
|
+
for (let state = 0; state < sourceProgram.states.length; state++)
|
|
39
|
+
for (const edge of sourceProgram.states[state].transitions) {
|
|
40
|
+
c.step(owner);
|
|
41
|
+
if (edge.lo <= suffix.charCodeAt(offset) && edge.hi >= suffix.charCodeAt(offset) && accepted.has(edge.to)) {
|
|
42
|
+
c.step(owner);
|
|
43
|
+
previous.push(state);
|
|
44
|
+
break;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
c.step(owner, key.length + previous.length + 2);
|
|
48
|
+
suffixCache.set(key, previous);
|
|
49
|
+
current = previous;
|
|
50
|
+
if (!current.length)
|
|
51
|
+
return undefined;
|
|
52
|
+
}
|
|
53
|
+
if (!current.length)
|
|
54
|
+
return undefined;
|
|
55
|
+
return regular.paths(sourceProgram, [sourceProgram.start], new Set(current), owner);
|
|
56
|
+
};
|
|
57
|
+
for (let offset = -841; offset <= 840; offset++) {
|
|
58
|
+
c.step(owner, 16);
|
|
59
|
+
const zoned = offset !== -841, minutes = zoned ? offset : 0;
|
|
60
|
+
const zones = !zoned ? [''] : !minutes ? ['Z', '+00:00', '-00:00']
|
|
61
|
+
: [(minutes < 0 ? '-' : '+') + Math.floor(Math.abs(minutes) / 60).toString().padStart(2, '0') + ':' + (Math.abs(minutes) % 60).toString().padStart(2, '0')];
|
|
62
|
+
for (const zone of zones) {
|
|
63
|
+
const prefix = prefixFor(zone);
|
|
64
|
+
if (!prefix)
|
|
65
|
+
continue;
|
|
66
|
+
for (const negative of yearPresent ? [false, true] : [false]) {
|
|
67
|
+
const unsigned = negative ? regular.quotient(prefix, quote('-', owner), epsilon, owner) : prefix, program = regular.automaton(unsigned, owner);
|
|
68
|
+
c.step(owner, program.states.length * 3 + 4);
|
|
69
|
+
const incoming = program.states.map(() => []), productive = new Set(), pending = [];
|
|
70
|
+
for (let from = 0; from < program.states.length; from++) {
|
|
71
|
+
if (program.states[from].accepting) {
|
|
72
|
+
c.step(owner, 2);
|
|
73
|
+
productive.add(from);
|
|
74
|
+
pending.push(from);
|
|
75
|
+
}
|
|
76
|
+
for (const edge of program.states[from].transitions) {
|
|
77
|
+
c.step(owner);
|
|
78
|
+
incoming[edge.to].push(from);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
while (pending.length) {
|
|
82
|
+
c.step(owner);
|
|
83
|
+
const state = pending.pop();
|
|
84
|
+
for (const from of incoming[state]) {
|
|
85
|
+
c.step(owner);
|
|
86
|
+
if (!productive.has(from)) {
|
|
87
|
+
c.step(owner, 2);
|
|
88
|
+
productive.add(from);
|
|
89
|
+
pending.push(from);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
c.step(owner, 3);
|
|
94
|
+
let frames = [];
|
|
95
|
+
if (!yearPresent)
|
|
96
|
+
frames.push({ at: program.start, year: quote('2000', owner), fields: [] });
|
|
97
|
+
else
|
|
98
|
+
for (let end = 0; end < program.states.length; end++) {
|
|
99
|
+
const year = regular.intersect([regular.paths(program, [program.start], new Set([end]), owner), calendars.year(false, owner)], owner);
|
|
100
|
+
if (regular.witness(year, owner) !== undefined)
|
|
101
|
+
frames.push({ at: end, year, fields: [] });
|
|
102
|
+
}
|
|
103
|
+
const walk = (from, text) => {
|
|
104
|
+
c.text(text, owner);
|
|
105
|
+
let state = from;
|
|
106
|
+
for (const character of text) {
|
|
107
|
+
c.step(owner, program.states[state].transitions.length + 1);
|
|
108
|
+
const cp = character.charCodeAt(0), edge = program.states[state].transitions.find(edge => edge.lo <= cp && edge.hi >= cp);
|
|
109
|
+
if (!edge || !productive.has(edge.to))
|
|
110
|
+
return undefined;
|
|
111
|
+
state = edge.to;
|
|
112
|
+
}
|
|
113
|
+
return state;
|
|
114
|
+
};
|
|
115
|
+
const clock = family === 'dateTime' || family === 'time';
|
|
116
|
+
const descriptors = [
|
|
117
|
+
{ present: !['gYear', 'gDay', 'time'].includes(family), separator: family === 'gMonthDay' || family === 'gMonth' ? '--' : '-', min: 1, max: 12, fixed: 1 },
|
|
118
|
+
{ present: ['date', 'dateTime', 'gMonthDay', 'gDay'].includes(family), separator: family === 'gDay' ? '---' : '-', min: 1, max: 31, fixed: 1 },
|
|
119
|
+
{ present: clock, separator: family === 'dateTime' ? 'T' : '', min: 0, max: 24, fixed: 0 },
|
|
120
|
+
{ present: clock, separator: ':', min: 0, max: 59, fixed: 0 },
|
|
121
|
+
{ present: clock, separator: ':', min: 0, max: 60, fixed: 0 },
|
|
122
|
+
];
|
|
123
|
+
for (const descriptor of descriptors) {
|
|
124
|
+
c.step(owner, 3);
|
|
125
|
+
const next = [];
|
|
126
|
+
for (const frame of frames) {
|
|
127
|
+
if (!descriptor.present) {
|
|
128
|
+
c.step(owner, frame.fields.length + 4);
|
|
129
|
+
next.push({ ...frame, fields: [...frame.fields, descriptor.fixed] });
|
|
130
|
+
continue;
|
|
131
|
+
}
|
|
132
|
+
for (let value = descriptor.min; value <= descriptor.max; value++) {
|
|
133
|
+
c.step(owner, 12);
|
|
134
|
+
const at = walk(frame.at, descriptor.separator + value.toString().padStart(2, '0'));
|
|
135
|
+
if (at !== undefined) {
|
|
136
|
+
c.step(owner, frame.fields.length + 4);
|
|
137
|
+
next.push({ ...frame, at, fields: [...frame.fields, value] });
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
frames = next;
|
|
142
|
+
}
|
|
143
|
+
c.step(owner, program.states.length * 4 + 3);
|
|
144
|
+
const accepted = new Set(program.states.flatMap((state, index) => state.accepting ? [index] : []));
|
|
145
|
+
for (const frame of frames) {
|
|
146
|
+
c.step(owner, 3);
|
|
147
|
+
const fractions = [];
|
|
148
|
+
if (accepted.has(frame.at))
|
|
149
|
+
fractions.push(undefined);
|
|
150
|
+
const dot = clock ? walk(frame.at, '.') : undefined;
|
|
151
|
+
if (dot !== undefined) {
|
|
152
|
+
const tail = regular.intersect([regular.paths(program, [dot], accepted, owner), expression('[0-9]+', owner)], owner);
|
|
153
|
+
if (regular.witness(regular.intersect([tail, expression('0+', owner)], owner), owner) !== undefined)
|
|
154
|
+
fractions.push(undefined);
|
|
155
|
+
const trimmed = regular.intersect([regular.quotient(tail, epsilon, expression('0*', owner), owner), expression('[0-9]*[1-9]', owner)], owner);
|
|
156
|
+
if (regular.witness(trimmed, owner) !== undefined)
|
|
157
|
+
fractions.push(trimmed);
|
|
158
|
+
}
|
|
159
|
+
if (!fractions.length)
|
|
160
|
+
continue;
|
|
161
|
+
for (const leap of yearPresent ? [false, true] : [true]) {
|
|
162
|
+
const rawYear = !yearPresent ? frame.year : regular.intersect([frame.year, leap ? calendars.year(true, owner) : regular.negate(calendars.year(true, owner), owner)], owner);
|
|
163
|
+
if (regular.witness(rawYear, owner) === undefined)
|
|
164
|
+
continue;
|
|
165
|
+
const representative = !yearPresent ? '2000' : negative ? leap ? '-0004' : '-0001' : leap ? '2000' : '2001';
|
|
166
|
+
c.step(owner, 96);
|
|
167
|
+
const [month, day, hour, minute, second] = frame.fields, two = (n) => n.toString().padStart(2, '0');
|
|
168
|
+
const date = representative + '-' + two(month) + '-' + two(day), time = two(hour) + ':' + two(minute) + ':' + two(second);
|
|
169
|
+
const lexical = family === 'dateTime' ? date + 'T' + time + zone : family === 'date' ? date + zone : family === 'time' ? time + zone
|
|
170
|
+
: family === 'gYear' ? representative + zone : family === 'gYearMonth' ? representative + '-' + two(month) + zone
|
|
171
|
+
: family === 'gMonthDay' ? '--' + two(month) + '-' + two(day) + zone : family === 'gDay' ? '---' + two(day) + zone : '--' + two(month) + zone;
|
|
172
|
+
const value = family === 'date' || family === 'dateTime' ? parseCalendar(family, lexical, b) : parseReduced(family, lexical, b), coordinate = showInstant(value.seconds, b);
|
|
173
|
+
c.step(owner, coordinate.length * 3 + 8);
|
|
174
|
+
const split = /^(-?[0-9]+)(-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2})Z$/.exec(coordinate);
|
|
175
|
+
let years;
|
|
176
|
+
if (!yearPresent)
|
|
177
|
+
years = quote(split[1], owner);
|
|
178
|
+
else {
|
|
179
|
+
const continuous = (year) => year > 0n ? year - 1n : year;
|
|
180
|
+
c.step(owner, 64);
|
|
181
|
+
const change = Number(continuous(BigInt(split[1])) - continuous(BigInt(representative))), magnitudeChange = negative ? -change : change;
|
|
182
|
+
const absolute = regular.intersect([regular.quotient(rawYear, expression('0*', owner), epsilon, owner), expression('[1-9][0-9]*', owner)], owner);
|
|
183
|
+
const one = quote('1', owner), parts = [];
|
|
184
|
+
if (magnitudeChange === -1 && regular.witness(regular.intersect([absolute, one], owner), owner) !== undefined)
|
|
185
|
+
parts.push(quote(negative ? '0001' : '-0001', owner));
|
|
186
|
+
const remaining = magnitudeChange === -1 ? regular.intersect([absolute, regular.negate(one, owner)], owner) : absolute;
|
|
187
|
+
const shifted = integers.sum([{ language: remaining, weight: 1 }], owner, magnitudeChange);
|
|
188
|
+
parts.push(regular.concatenate([quote(negative ? '-' : '', owner), padded(shifted, owner)], owner));
|
|
189
|
+
years = regular.union(parts, owner);
|
|
190
|
+
}
|
|
191
|
+
for (const fraction of fractions) {
|
|
192
|
+
c.step(owner, 2);
|
|
193
|
+
images.push(regular.concatenate([years, quote(split[2], owner),
|
|
194
|
+
fraction ? regular.concatenate([quote('.', owner), fraction], owner) : epsilon, quote(zoned ? 'Z' : '', owner)], owner));
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
return regular.union(images, owner);
|
|
202
|
+
};
|
|
203
|
+
return { image };
|
|
204
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Calendar, CalendarFamily } from './schemaExactCalendar.js';
|
|
2
|
+
import type { RegularLanguage } from './schemaRegularLanguage.js';
|
|
3
|
+
import { schemaRegularLanguages } from './schemaRegularLanguage.js';
|
|
4
|
+
import type { SchemaPatternContext } from './schemaValueContext.js';
|
|
5
|
+
export declare function schemaCalendarLanguages<Owner>(c: SchemaPatternContext<Owner>, regular: ReturnType<typeof schemaRegularLanguages<Owner>>, expression: (text: string, owner: Owner) => RegularLanguage): {
|
|
6
|
+
bound: (source: RegularLanguage, endpoint: Calendar, name: "minInclusive" | "minExclusive" | "maxInclusive" | "maxExclusive", owner: Owner) => RegularLanguage;
|
|
7
|
+
validDate: (family: CalendarFamily, owner: Owner) => RegularLanguage;
|
|
8
|
+
valid: (family: CalendarFamily, owner: Owner) => RegularLanguage;
|
|
9
|
+
year: (leap: boolean, owner: Owner) => RegularLanguage;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=schemaCalendarLanguage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemaCalendarLanguage.d.ts","sourceRoot":"","sources":["../../src/compiler/schemaCalendarLanguage.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,QAAQ,EAAkB,cAAc,EAAU,MAAM,0BAA0B,CAAC;AAChG,OAAO,KAAK,EAAmB,eAAe,EAAC,MAAM,4BAA4B,CAAC;AAClF,OAAO,EAAC,sBAAsB,EAAC,MAAM,4BAA4B,CAAC;AAElE,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,yBAAyB,CAAC;AAGlE,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,CAAC,EAAE,oBAAoB,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,UAAU,CAAC,OAAO,sBAAsB,CAAC,KAAK,CAAC,CAAC,EACtI,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,KAAK,eAAe;oBAgHpC,eAAe,YAAY,QAAQ,QAAQ,cAAc,GAAG,cAAc,GAAG,cAAc,GAAG,cAAc,SAAS,KAAK,KAAG,eAAe;wBA3FxI,cAAc,SAAS,KAAK,KAAG,eAAe;oBA2IlD,cAAc,SAAS,KAAK,KAAG,eAAe;iBAvJjD,OAAO,SAAS,KAAK,KAAG,eAAe;EA+J5D"}
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
/** Exact regular preimages of DT A calendar validity and bound predicates. */
|
|
2
|
+
import { showInstant, ordinal } from './schemaExactCalendar.js';
|
|
3
|
+
import { schemaRegularLanguages } from './schemaRegularLanguage.js';
|
|
4
|
+
import { schemaDecimalLanguages } from './schemaDecimalLanguage.js';
|
|
5
|
+
export function schemaCalendarLanguages(c, regular, expression) {
|
|
6
|
+
const decimals = schemaDecimalLanguages(c), yearLanguages = new Map();
|
|
7
|
+
const empty = (owner) => regular.union([], owner);
|
|
8
|
+
const literal = (text, owner) => {
|
|
9
|
+
c.text(text, owner);
|
|
10
|
+
c.step(owner, text.length * 2 + 1);
|
|
11
|
+
return expression(text.replace(/[\\.\-^?*+{}()\[\]|]/g, '\\$&'), owner);
|
|
12
|
+
};
|
|
13
|
+
const calendarBudget = (owner) => ({ charge: work => c.step(owner, work),
|
|
14
|
+
arithmetic: digits => c.step(owner, (digits + 4) ** 2), text: text => { c.text(text, owner); } });
|
|
15
|
+
const year = (leap, owner) => {
|
|
16
|
+
const cached = yearLanguages.get(leap);
|
|
17
|
+
if (cached)
|
|
18
|
+
return cached;
|
|
19
|
+
const grammar = regular.intersect([expression('\\-?([0-9]{4}|[1-9][0-9]{4,})', owner), regular.negate(expression('\\-?0000', owner), owner)], owner);
|
|
20
|
+
if (!leap) {
|
|
21
|
+
c.step(owner);
|
|
22
|
+
yearLanguages.set(false, grammar);
|
|
23
|
+
return grammar;
|
|
24
|
+
}
|
|
25
|
+
// 10^4 is divisible by 400. Noncentury leap years have a nonzero
|
|
26
|
+
// two-digit suffix divisible by four; centuries require their preceding
|
|
27
|
+
// two digits (the last four digits overall) to be divisible by four.
|
|
28
|
+
const suffix = '\\-?[0-9]*(([02468][48]|[13579][26]|[2468]0)|([02468][048]|[13579][26])00)';
|
|
29
|
+
c.step(owner, suffix.length + 2);
|
|
30
|
+
const language = regular.intersect([grammar, expression(suffix, owner)], owner);
|
|
31
|
+
c.step(owner);
|
|
32
|
+
yearLanguages.set(true, language);
|
|
33
|
+
return language;
|
|
34
|
+
};
|
|
35
|
+
const validDate = (family, owner) => {
|
|
36
|
+
const epsilon = literal('', owner);
|
|
37
|
+
if (family === 'time')
|
|
38
|
+
return epsilon;
|
|
39
|
+
if (family === 'gYear')
|
|
40
|
+
return year(false, owner);
|
|
41
|
+
if (family === 'gYearMonth')
|
|
42
|
+
return regular.concatenate([year(false, owner), expression('\\-(0[1-9]|1[0-2])', owner)], owner);
|
|
43
|
+
if (family === 'gMonth')
|
|
44
|
+
return expression('\\-\\-(0[1-9]|1[0-2])', owner);
|
|
45
|
+
if (family === 'gDay')
|
|
46
|
+
return expression('\\-\\-\\-(0[1-9]|[12][0-9]|3[01])', owner);
|
|
47
|
+
const monthDay = '((01|03|05|07|08|10|12)\\-(0[1-9]|[12][0-9]|3[01])|(04|06|09|11)\\-(0[1-9]|[12][0-9]|30)|02\\-(0[1-9]|1[0-9]|2[0-8]))';
|
|
48
|
+
if (family === 'gMonthDay')
|
|
49
|
+
return expression('\\-\\-(' + monthDay + '|02\\-29)', owner);
|
|
50
|
+
return regular.union([regular.concatenate([year(false, owner), literal('-', owner), expression(monthDay, owner)], owner),
|
|
51
|
+
regular.concatenate([year(true, owner), literal('-02-29', owner)], owner)], owner);
|
|
52
|
+
};
|
|
53
|
+
const fields = (family, style, owner) => {
|
|
54
|
+
c.step(owner, 48);
|
|
55
|
+
const epsilon = literal('', owner), digits = expression('[0-9]{2}', owner);
|
|
56
|
+
const y = ['time', 'gMonthDay', 'gDay', 'gMonth'].includes(family)
|
|
57
|
+
? { language: epsilon, fixed: 2000, separator: '' } : { language: year(false, owner), separator: '' };
|
|
58
|
+
const m = family === 'gYear' || family === 'gDay' || family === 'time'
|
|
59
|
+
? { language: epsilon, fixed: 1, separator: '' } : { language: digits, separator: family === 'gMonthDay' || family === 'gMonth' ? '--' : '-' };
|
|
60
|
+
const d = family === 'gYear' || family === 'gYearMonth' || family === 'gMonth' || family === 'time'
|
|
61
|
+
? { language: epsilon, fixed: 1, separator: '' } : { language: digits, separator: family === 'gDay' ? '---' : '-' };
|
|
62
|
+
const clock = family === 'dateTime' || family === 'time';
|
|
63
|
+
const h = !clock ? { language: epsilon, fixed: 0, separator: '' }
|
|
64
|
+
: style === '24' ? { language: literal('24', owner), fixed: 0, separator: family === 'dateTime' ? 'T' : '' }
|
|
65
|
+
: { language: expression('([01][0-9]|2[0-3])', owner), separator: family === 'dateTime' ? 'T' : '' };
|
|
66
|
+
const minute = !clock ? { language: epsilon, fixed: 0, separator: '' }
|
|
67
|
+
: style === '24' ? { language: literal('00', owner), fixed: 0, separator: ':' } : { language: expression('[0-5][0-9]', owner), separator: ':' };
|
|
68
|
+
const second = !clock ? { language: epsilon, fixed: 0, separator: '' }
|
|
69
|
+
: style === '24' ? { language: expression('00([.]0+)?', owner), fixed: 0, separator: ':' }
|
|
70
|
+
: { language: expression(style === '60' ? '60([.][0-9]+)?' : '[0-5][0-9]([.][0-9]+)?', owner), shift: style === '60' ? 60 : undefined, separator: ':' };
|
|
71
|
+
return [y, m, d, h, minute, second];
|
|
72
|
+
};
|
|
73
|
+
const joinFields = (parts, descriptor, owner) => {
|
|
74
|
+
c.step(owner, parts.length * 2 + 2);
|
|
75
|
+
const result = [];
|
|
76
|
+
for (let index = 0; index < parts.length; index++) {
|
|
77
|
+
c.step(owner, 2);
|
|
78
|
+
result.push(literal(descriptor[index].separator, owner), parts[index]);
|
|
79
|
+
}
|
|
80
|
+
return regular.concatenate(result, owner);
|
|
81
|
+
};
|
|
82
|
+
const compareFields = (descriptor, threshold, greater, inclusive, owner) => {
|
|
83
|
+
const budget = calendarBudget(owner), text = showInstant(threshold, budget);
|
|
84
|
+
c.step(owner, text.length * 3 + 8);
|
|
85
|
+
const match = /^(-?[0-9]+)-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2}(?:\.[0-9]+)?)Z$/.exec(text);
|
|
86
|
+
const targets = match.slice(1), equals = [], alternatives = [];
|
|
87
|
+
for (let index = 0; index < descriptor.length; index++) {
|
|
88
|
+
c.step(owner, targets[index].length * 2 + 4);
|
|
89
|
+
const field = descriptor[index], target = targets[index].replace(/^(-?)0+(?=[0-9])/, '$1');
|
|
90
|
+
let unequal, equal;
|
|
91
|
+
if (field.fixed !== undefined) {
|
|
92
|
+
c.step(owner, target.length ** 2 + 4);
|
|
93
|
+
const order = field.fixed === 0 ? /[1-9]/.test(target) ? -1 : 0
|
|
94
|
+
: BigInt(field.fixed) < BigInt(target) ? -1 : BigInt(field.fixed) > BigInt(target) ? 1 : 0;
|
|
95
|
+
unequal = (greater ? order > 0 : order < 0) ? field.language : empty(owner);
|
|
96
|
+
equal = order === 0 ? field.language : empty(owner);
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
c.text(target, owner);
|
|
100
|
+
let compared = target;
|
|
101
|
+
if (field.shift) {
|
|
102
|
+
c.step(owner, target.length + 16);
|
|
103
|
+
const [whole, fraction] = target.split('.');
|
|
104
|
+
compared = String(Number(whole) + field.shift) + (fraction ? '.' + fraction : '');
|
|
105
|
+
}
|
|
106
|
+
const relation = decimals.relation(compared, greater, owner);
|
|
107
|
+
unequal = relation === undefined ? empty(owner) : regular.intersect([field.language, expression(relation, owner)], owner);
|
|
108
|
+
const negative = compared.startsWith('-'), unsigned = negative ? compared.slice(1) : compared;
|
|
109
|
+
const [whole, fraction] = unsigned.split('.');
|
|
110
|
+
c.step(owner, compared.length * 3 + 32);
|
|
111
|
+
const inverse = compared.replace(/^[-+]?0+(?=[0-9])/, '') === '0' ? '[+\\-]?(0+([.]0*)?|[.]0+)'
|
|
112
|
+
: (negative ? '\\-' : '[+]?') + (fraction ? '0*' + whole + '[.]' + fraction + '0*' : '0*' + whole + '([.]0*)?');
|
|
113
|
+
equal = regular.intersect([field.language, expression(inverse, owner)], owner);
|
|
114
|
+
}
|
|
115
|
+
c.step(owner, descriptor.length * 2 + equals.length + 4);
|
|
116
|
+
alternatives.push(joinFields([...equals, unequal, ...descriptor.slice(index + 1).map(field => field.language)], descriptor, owner));
|
|
117
|
+
equals.push(equal);
|
|
118
|
+
}
|
|
119
|
+
if (inclusive)
|
|
120
|
+
alternatives.push(joinFields(equals, descriptor, owner));
|
|
121
|
+
return regular.union(alternatives, owner);
|
|
122
|
+
};
|
|
123
|
+
const suffixChecker = (source, owner) => {
|
|
124
|
+
const program = regular.automaton(source, owner), cache = new Map();
|
|
125
|
+
c.step(owner, program.states.length + 4);
|
|
126
|
+
const final = program.states.flatMap((state, index) => state.accepting ? [index] : []);
|
|
127
|
+
return (text) => {
|
|
128
|
+
c.text(text, owner);
|
|
129
|
+
let current = final;
|
|
130
|
+
for (let offset = text.length - 1; offset >= 0; offset--) {
|
|
131
|
+
c.step(owner, current.length * 16 + 8);
|
|
132
|
+
const identity = text.charCodeAt(offset) + ':' + JSON.stringify(current), known = cache.get(identity);
|
|
133
|
+
if (known) {
|
|
134
|
+
current = known;
|
|
135
|
+
continue;
|
|
136
|
+
}
|
|
137
|
+
c.step(owner, current.length * 2 + 3);
|
|
138
|
+
const accepted = new Set(current), previous = [], cp = text.charCodeAt(offset);
|
|
139
|
+
for (let state = 0; state < program.states.length; state++)
|
|
140
|
+
for (const edge of program.states[state].transitions) {
|
|
141
|
+
c.step(owner, 2);
|
|
142
|
+
if (cp >= edge.lo && cp <= edge.hi && accepted.has(edge.to)) {
|
|
143
|
+
c.step(owner);
|
|
144
|
+
previous.push(state);
|
|
145
|
+
break;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
c.step(owner, identity.length + previous.length + 2);
|
|
149
|
+
cache.set(identity, previous);
|
|
150
|
+
current = previous;
|
|
151
|
+
if (!current.length)
|
|
152
|
+
return undefined;
|
|
153
|
+
}
|
|
154
|
+
if (!current.length)
|
|
155
|
+
return undefined;
|
|
156
|
+
c.step(owner, current.length * 2 + program.states.length * 3 + 4);
|
|
157
|
+
const accepted = new Set(current);
|
|
158
|
+
return regular.fromAutomaton({ start: program.start, states: program.states.map((state, index) => ({ transitions: state.transitions, accepting: accepted.has(index) })) }, owner);
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
const bound = (source, endpoint, name, owner) => {
|
|
162
|
+
const family = endpoint.family, budget = calendarBudget(owner), possibleSuffix = suffixChecker(source, owner);
|
|
163
|
+
c.step(owner, 4);
|
|
164
|
+
const choices = [], greater = name.startsWith('min'), inclusive = name.endsWith('Inclusive');
|
|
165
|
+
budget.arithmetic(endpoint.seconds.digits + endpoint.seconds.scale + 8);
|
|
166
|
+
const power = 10n ** BigInt(endpoint.seconds.scale);
|
|
167
|
+
const shifted = (seconds) => {
|
|
168
|
+
budget.arithmetic(endpoint.seconds.digits + endpoint.seconds.scale + 8);
|
|
169
|
+
c.step(owner, 4);
|
|
170
|
+
return { ...endpoint.seconds, coefficient: endpoint.seconds.coefficient + BigInt(seconds) * power };
|
|
171
|
+
};
|
|
172
|
+
c.step(owner, 4);
|
|
173
|
+
const date = validDate(family, owner);
|
|
174
|
+
for (let index = -841; index <= 840; index++) {
|
|
175
|
+
c.step(owner, 16);
|
|
176
|
+
const zoned = index !== -841, offset = zoned ? index : 0;
|
|
177
|
+
const suffixes = !zoned ? [''] : !offset ? ['Z', '+00:00', '-00:00']
|
|
178
|
+
: [(offset < 0 ? '-' : '+') + Math.floor(Math.abs(offset) / 60).toString().padStart(2, '0') + ':' + (Math.abs(offset) % 60).toString().padStart(2, '0')];
|
|
179
|
+
for (const zone of suffixes) {
|
|
180
|
+
const prefix = possibleSuffix(zone);
|
|
181
|
+
if (!prefix)
|
|
182
|
+
continue;
|
|
183
|
+
if (!zone && regular.witness(regular.intersect([source, expression('.*[0-9]', owner)], owner), owner) === undefined)
|
|
184
|
+
continue;
|
|
185
|
+
const crossTimeline = zoned !== endpoint.zoned;
|
|
186
|
+
const uncertainty = crossTimeline ? (greater ? 50400 : -50400) : 0;
|
|
187
|
+
for (const style of family === 'dateTime' || family === 'time' ? ['normal', '60', '24'] : ['normal']) {
|
|
188
|
+
const descriptor = fields(family, style, owner), rendered = joinFields(descriptor.map(field => field.language), descriptor, owner);
|
|
189
|
+
const validity = regular.concatenate([regular.intersect([prefix, rendered,
|
|
190
|
+
family === 'dateTime' ? regular.concatenate([date, expression('T.*', owner)], owner)
|
|
191
|
+
: family === 'time' ? rendered : date], owner), literal(zone, owner)], owner);
|
|
192
|
+
if (regular.witness(regular.intersect([source, validity], owner), owner) === undefined)
|
|
193
|
+
continue;
|
|
194
|
+
const adjustment = style === '60' ? 60 : style === '24' ? 86400 : 0;
|
|
195
|
+
if (family !== 'time') {
|
|
196
|
+
const predicate = compareFields(descriptor, shifted(offset * 60 + uncertainty - adjustment), greater, inclusive && !crossTimeline, owner);
|
|
197
|
+
choices.push(regular.intersect([validity, regular.concatenate([predicate, literal(zone, owner)], owner)], owner));
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
// Raw clocks occupy one reference day. Four carries cover every
|
|
201
|
+
// allowed offset and the two overflow styles under DT A modulo.
|
|
202
|
+
const baseDay = ordinal(2000n, 1, 1, budget, 4) * 86400n;
|
|
203
|
+
for (let carry = -1; carry <= 2; carry++) {
|
|
204
|
+
const main = shifted(offset * 60 + uncertainty - adjustment + carry * 86400);
|
|
205
|
+
budget.arithmetic(endpoint.seconds.digits + endpoint.seconds.scale + 16);
|
|
206
|
+
c.step(owner, 8);
|
|
207
|
+
const begin = { coefficient: (baseDay + BigInt(offset * 60 - adjustment + carry * 86400)) * power, scale: endpoint.seconds.scale, digits: endpoint.seconds.digits + 16 };
|
|
208
|
+
const end = { ...begin, coefficient: begin.coefficient + 86400n * power };
|
|
209
|
+
const predicate = regular.intersect([compareFields(descriptor, main, greater, inclusive && !crossTimeline, owner),
|
|
210
|
+
compareFields(descriptor, begin, true, true, owner), compareFields(descriptor, end, false, false, owner)], owner);
|
|
211
|
+
choices.push(regular.intersect([validity, regular.concatenate([predicate, literal(zone, owner)], owner)], owner));
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
return regular.union(choices, owner);
|
|
218
|
+
};
|
|
219
|
+
const valid = (family, owner) => {
|
|
220
|
+
const zone = expression('(Z|[+\\-]((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?', owner);
|
|
221
|
+
const clock = expression('(([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?|24:00:00([.]0+)?)', owner);
|
|
222
|
+
const value = family === 'time' ? clock : family === 'dateTime'
|
|
223
|
+
? regular.concatenate([validDate(family, owner), literal('T', owner), clock], owner) : validDate(family, owner);
|
|
224
|
+
return regular.concatenate([value, zone], owner);
|
|
225
|
+
};
|
|
226
|
+
return { bound, validDate, valid, year };
|
|
227
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/** Sufficient recursive component-property equality for cos-particle-extend.
|
|
2
|
+
* Paired recurrence closes equality only; component validity remains a premise.
|
|
3
|
+
*/
|
|
4
|
+
import type { GraphNode, NodeId } from './canonicalGraph.js';
|
|
5
|
+
import type { SemanticContext } from './semanticContext.js';
|
|
6
|
+
import type { ScalarFailure } from './schemaScalarKernel.js';
|
|
7
|
+
import type { ScalarObligation } from './scalarSchemaAssessment.js';
|
|
8
|
+
import type { RelationFailure } from './schemaTypeRelations.js';
|
|
9
|
+
import type { AttributeFailure } from './schemaAttributeUses.js';
|
|
10
|
+
import type { ResourceLimitFailure } from './semanticBudget.js';
|
|
11
|
+
import type { SemanticTypeDependency } from './semanticTypeReference.js';
|
|
12
|
+
import type { IdentityConstraintDependency } from './schemaIdentityConstraints.js';
|
|
13
|
+
type Failure = RelationFailure | ScalarFailure | AttributeFailure | ResourceLimitFailure;
|
|
14
|
+
export type ComponentEqualityResult = Readonly<{
|
|
15
|
+
kind: 'checked';
|
|
16
|
+
value: boolean;
|
|
17
|
+
contextId: string;
|
|
18
|
+
authority: 'XSD10-component-properties-v1';
|
|
19
|
+
obligations: readonly string[];
|
|
20
|
+
scalarObligations: readonly ScalarObligation[];
|
|
21
|
+
typeDependencies: readonly SemanticTypeDependency[];
|
|
22
|
+
identityConstraintDependencies: readonly IdentityConstraintDependency[];
|
|
23
|
+
/** Concrete component operands whose property facts this comparison consumed. */
|
|
24
|
+
dependencies: readonly NodeId[];
|
|
25
|
+
}> | Failure;
|
|
26
|
+
export declare function compareComponentProperties(context: SemanticContext, a: GraphNode, b: GraphNode): ComponentEqualityResult;
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=schemaComponentEquality.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemaComponentEquality.d.ts","sourceRoot":"","sources":["../../src/compiler/schemaComponentEquality.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAC,SAAS,EAAE,MAAM,EAAyD,MAAM,qBAAqB,CAAC;AACnH,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,sBAAsB,CAAC;AAG1D,OAAO,KAAK,EAAC,aAAa,EAAe,MAAM,yBAAyB,CAAC;AACzE,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,6BAA6B,CAAC;AAElE,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,0BAA0B,CAAC;AAG9D,OAAO,KAAK,EAAC,gBAAgB,EAA0C,MAAM,0BAA0B,CAAC;AAKxG,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,qBAAqB,CAAC;AAG9D,OAAO,KAAK,EAAC,sBAAsB,EAAwB,MAAM,4BAA4B,CAAC;AAE9F,OAAO,KAAK,EAAC,4BAA4B,EAAC,MAAM,gCAAgC,CAAC;AAEjF,KAAK,OAAO,GAAG,eAAe,GAAG,aAAa,GAAG,gBAAgB,GAAG,oBAAoB,CAAC;AACzF,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAAC;IAAC,IAAI,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IACjG,SAAS,EAAE,+BAA+B,CAAC;IAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3E,iBAAiB,EAAE,SAAS,gBAAgB,EAAE,CAAC;IAC/C,gBAAgB,EAAE,SAAS,sBAAsB,EAAE,CAAC;IACpD,8BAA8B,EAAE,SAAS,4BAA4B,EAAE,CAAC;IACxE,iFAAiF;IACjF,YAAY,EAAE,SAAS,MAAM,EAAE,CAAA;CAAC,CAAC,GAAG,OAAO,CAAC;AAS9C,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,eAAe,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,GAAG,uBAAuB,CAsRxH"}
|