@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,11 @@
|
|
|
1
|
+
/** Finite decimal carry products for images of nonnegative integer fields. */
|
|
2
|
+
import type { RegularLanguage } from './schemaRegularLanguage.js';
|
|
3
|
+
import { schemaRegularLanguages } from './schemaRegularLanguage.js';
|
|
4
|
+
import type { SchemaPatternContext } from './schemaValueContext.js';
|
|
5
|
+
export declare function schemaIntegerImages<Owner>(c: SchemaPatternContext<Owner>, regular: ReturnType<typeof schemaRegularLanguages<Owner>>, expression: (text: string, owner: Owner) => RegularLanguage): {
|
|
6
|
+
sum: (inputs: readonly {
|
|
7
|
+
language: RegularLanguage;
|
|
8
|
+
weight: number;
|
|
9
|
+
}[], owner: Owner, initialCarry?: number) => RegularLanguage;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=schemaIntegerImages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemaIntegerImages.d.ts","sourceRoot":"","sources":["../../src/compiler/schemaIntegerImages.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,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,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,CAAC,EAAE,oBAAoB,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,UAAU,CAAC,OAAO,sBAAsB,CAAC,KAAK,CAAC,CAAC,EAClI,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,KAAK,eAAe;kBACtC,SAAS;QAAC,QAAQ,EAAE,eAAe,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAC,EAAE,SAAS,KAAK,4BAAqB,eAAe;EA6D9H"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { schemaRegularLanguages } from './schemaRegularLanguage.js';
|
|
2
|
+
export function schemaIntegerImages(c, regular, expression) {
|
|
3
|
+
const sum = (inputs, owner, initialCarry = 0) => {
|
|
4
|
+
c.step(owner, inputs.length * 2 + 4);
|
|
5
|
+
c.step(owner, inputs.length + 2);
|
|
6
|
+
if (!Number.isSafeInteger(initialCarry) || inputs.some(input => !Number.isSafeInteger(input.weight) || input.weight < 0)
|
|
7
|
+
|| !Number.isSafeInteger(inputs.reduce((sum, input) => sum + input.weight * 9, Math.abs(initialCarry))))
|
|
8
|
+
throw new TypeError('Integer image weights and carry must use exact safe arithmetic');
|
|
9
|
+
const programs = inputs.map(input => regular.automaton(regular.reverse(input.language, owner), owner));
|
|
10
|
+
c.step(owner, programs.length * 2 + 3);
|
|
11
|
+
const productive = programs.map(program => {
|
|
12
|
+
c.step(owner, program.states.length * 3 + 4);
|
|
13
|
+
const incoming = program.states.map(() => []), useful = new Set(), pending = [];
|
|
14
|
+
for (let from = 0; from < program.states.length; from++) {
|
|
15
|
+
if (program.states[from].accepting) {
|
|
16
|
+
c.step(owner, 2);
|
|
17
|
+
useful.add(from);
|
|
18
|
+
pending.push(from);
|
|
19
|
+
}
|
|
20
|
+
for (const edge of program.states[from].transitions)
|
|
21
|
+
if (edge.lo <= 57 && edge.hi >= 48) {
|
|
22
|
+
c.step(owner);
|
|
23
|
+
incoming[edge.to].push(from);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
while (pending.length) {
|
|
27
|
+
c.step(owner);
|
|
28
|
+
const state = pending.pop();
|
|
29
|
+
for (const from of incoming[state]) {
|
|
30
|
+
c.step(owner);
|
|
31
|
+
if (!useful.has(from)) {
|
|
32
|
+
c.step(owner, 2);
|
|
33
|
+
useful.add(from);
|
|
34
|
+
pending.push(from);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return useful;
|
|
39
|
+
});
|
|
40
|
+
if (programs.some((program, index) => !productive[index].has(program.start)))
|
|
41
|
+
return regular.union([], owner);
|
|
42
|
+
c.step(owner, programs.length + 6);
|
|
43
|
+
const states = [{ positions: programs.map(program => program.start), carry: initialCarry }], edges = [[]];
|
|
44
|
+
const identity = (state) => { c.step(owner, state.positions.length * 16 + 32); return JSON.stringify(state); };
|
|
45
|
+
c.step(owner, 3);
|
|
46
|
+
const seen = new Map([[identity(states[0]), 0]]), accepted = [];
|
|
47
|
+
for (let cursor = 0; cursor < states.length; cursor++) {
|
|
48
|
+
c.step(owner, inputs.length + 2);
|
|
49
|
+
const state = states[cursor];
|
|
50
|
+
if (state.carry === 0 && state.positions.every((position, index) => position === -1 || programs[index].states[position].accepting))
|
|
51
|
+
accepted.push(cursor);
|
|
52
|
+
c.step(owner, inputs.length * 2 + 3);
|
|
53
|
+
const choices = [];
|
|
54
|
+
for (let index = 0; index < inputs.length; index++) {
|
|
55
|
+
const position = state.positions[index];
|
|
56
|
+
c.step(owner, 2);
|
|
57
|
+
const row = [];
|
|
58
|
+
if (position === -1 || programs[index].states[position].accepting) {
|
|
59
|
+
c.step(owner, 2);
|
|
60
|
+
row.push({ digit: 0, to: -1 });
|
|
61
|
+
}
|
|
62
|
+
if (position !== -1)
|
|
63
|
+
for (const edge of programs[index].states[position].transitions) {
|
|
64
|
+
c.step(owner);
|
|
65
|
+
if (!productive[index].has(edge.to))
|
|
66
|
+
continue;
|
|
67
|
+
for (let cp = Math.max(48, edge.lo); cp <= Math.min(57, edge.hi); cp++) {
|
|
68
|
+
c.step(owner, 2);
|
|
69
|
+
row.push({ digit: cp - 48, to: edge.to });
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
choices.push(row);
|
|
73
|
+
}
|
|
74
|
+
c.step(owner, 4);
|
|
75
|
+
const frontier = [{ index: 0, value: state.carry, positions: [] }];
|
|
76
|
+
while (frontier.length) {
|
|
77
|
+
c.step(owner);
|
|
78
|
+
const frame = frontier.pop();
|
|
79
|
+
if (frame.index !== inputs.length) {
|
|
80
|
+
for (const option of choices[frame.index]) {
|
|
81
|
+
c.step(owner, frame.positions.length + 5);
|
|
82
|
+
frontier.push({ index: frame.index + 1,
|
|
83
|
+
value: frame.value + option.digit * inputs[frame.index].weight, positions: [...frame.positions, option.to] });
|
|
84
|
+
}
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
87
|
+
c.step(owner, 6);
|
|
88
|
+
const digit = (frame.value % 10 + 10) % 10, next = { positions: frame.positions, carry: Math.floor(frame.value / 10) }, key = identity(next);
|
|
89
|
+
let to = seen.get(key);
|
|
90
|
+
if (to === undefined) {
|
|
91
|
+
c.step(owner, key.length + 6);
|
|
92
|
+
to = states.length;
|
|
93
|
+
states.push(next);
|
|
94
|
+
edges.push([]);
|
|
95
|
+
seen.set(key, to);
|
|
96
|
+
}
|
|
97
|
+
c.step(owner, 4);
|
|
98
|
+
edges[cursor].push({ to, ranges: [[48 + digit, 48 + digit]] });
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
c.step(owner, accepted.length * 3 + 3);
|
|
102
|
+
const end = edges.length;
|
|
103
|
+
edges.push([]);
|
|
104
|
+
for (const state of accepted)
|
|
105
|
+
edges[state].push({ to: end });
|
|
106
|
+
const raw = regular.reverse(regular.fromNfa({ edges, start: 0, end }, owner), owner), choices = [];
|
|
107
|
+
if (regular.witness(regular.intersect([raw, expression('0*', owner)], owner), owner) !== undefined)
|
|
108
|
+
choices.push(expression('0', owner));
|
|
109
|
+
choices.push(regular.intersect([regular.quotient(raw, expression('0*', owner), expression('', owner), owner), expression('[1-9][0-9]*', owner)], owner));
|
|
110
|
+
return regular.union(choices, owner);
|
|
111
|
+
};
|
|
112
|
+
return { sum };
|
|
113
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/** Finite Boolean products of regular syntax and exact numeric input guards. */
|
|
2
|
+
import type { RegularLanguage } from './schemaRegularLanguage.js';
|
|
3
|
+
import { schemaRegularLanguages } from './schemaRegularLanguage.js';
|
|
4
|
+
import type { NumericImageCondition } from './schemaNumericImageConditions.js';
|
|
5
|
+
import { schemaNumericImageConditions } from './schemaNumericImageConditions.js';
|
|
6
|
+
import type { SchemaPatternContext } from './schemaValueContext.js';
|
|
7
|
+
export type LexicalPredicate = Readonly<{
|
|
8
|
+
kind: 'regular';
|
|
9
|
+
language: RegularLanguage;
|
|
10
|
+
}> | Readonly<{
|
|
11
|
+
kind: 'numeric';
|
|
12
|
+
condition: NumericImageCondition;
|
|
13
|
+
}> | Readonly<{
|
|
14
|
+
kind: 'and' | 'or';
|
|
15
|
+
children: readonly LexicalPredicate[];
|
|
16
|
+
}> | Readonly<{
|
|
17
|
+
kind: 'not';
|
|
18
|
+
child: LexicalPredicate;
|
|
19
|
+
}>;
|
|
20
|
+
export type LexicalBranch = Readonly<{
|
|
21
|
+
language: RegularLanguage;
|
|
22
|
+
numeric: NumericImageCondition;
|
|
23
|
+
}>;
|
|
24
|
+
export declare function schemaLexicalPredicates<Owner>(c: SchemaPatternContext<Owner>, regular: ReturnType<typeof schemaRegularLanguages<Owner>>, numeric: ReturnType<typeof schemaNumericImageConditions<Owner>>): {
|
|
25
|
+
branches: (predicate: LexicalPredicate, source: RegularLanguage, owner: Owner) => readonly LexicalBranch[];
|
|
26
|
+
exists: (predicate: LexicalPredicate, source: RegularLanguage, owner: Owner) => boolean;
|
|
27
|
+
witness: (predicate: LexicalPredicate, source: RegularLanguage, owner: Owner) => string | undefined;
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=schemaLexicalPredicates.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemaLexicalPredicates.d.ts","sourceRoot":"","sources":["../../src/compiler/schemaLexicalPredicates.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAC,sBAAsB,EAAC,MAAM,4BAA4B,CAAC;AAClE,OAAO,KAAK,EAAC,qBAAqB,EAAC,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAC,4BAA4B,EAAC,MAAM,mCAAmC,CAAC;AAC/E,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,yBAAyB,CAAC;AAElE,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CAAC;IAAC,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,EAAE,eAAe,CAAA;CAAC,CAAC,GACnF,QAAQ,CAAC;IAAC,IAAI,EAAE,SAAS,CAAC;IAAC,SAAS,EAAE,qBAAqB,CAAA;CAAC,CAAC,GAC7D,QAAQ,CAAC;IAAC,IAAI,EAAE,KAAK,GAAG,IAAI,CAAC;IAAC,QAAQ,EAAE,SAAS,gBAAgB,EAAE,CAAA;CAAC,CAAC,GACrE,QAAQ,CAAC;IAAC,IAAI,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,gBAAgB,CAAA;CAAC,CAAC,CAAC;AACnD,MAAM,MAAM,aAAa,GAAG,QAAQ,CAAC;IAAC,QAAQ,EAAE,eAAe,CAAC;IAAC,OAAO,EAAE,qBAAqB,CAAA;CAAC,CAAC,CAAC;AAClG,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,CAAC,EAAE,oBAAoB,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,UAAU,CAAC,OAAO,sBAAsB,CAAC,KAAK,CAAC,CAAC,EACtI,OAAO,EAAE,UAAU,CAAC,OAAO,4BAA4B,CAAC,KAAK,CAAC,CAAC;0BAClC,gBAAgB,UAAU,eAAe,SAAS,KAAK,KAAG,SAAS,aAAa,EAAE;wBA2BpF,gBAAgB,UAAU,eAAe,SAAS,KAAK,KAAG,OAAO;yBAIhE,gBAAgB,UAAU,eAAe,SAAS,KAAK,KAAG,MAAM,GAAG,SAAS;EAOzG"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { schemaRegularLanguages } from './schemaRegularLanguage.js';
|
|
2
|
+
import { schemaNumericImageConditions } from './schemaNumericImageConditions.js';
|
|
3
|
+
export function schemaLexicalPredicates(c, regular, numeric) {
|
|
4
|
+
const branches = (predicate, source, owner) => {
|
|
5
|
+
c.step(owner, 6);
|
|
6
|
+
const pending = [{ tasks: [{ predicate, negative: false }], branch: { language: source, numeric: numeric.all() } }], result = [];
|
|
7
|
+
while (pending.length) {
|
|
8
|
+
c.step(owner);
|
|
9
|
+
const frame = pending.pop();
|
|
10
|
+
if (!frame.tasks.length) {
|
|
11
|
+
c.step(owner);
|
|
12
|
+
result.push(frame.branch);
|
|
13
|
+
continue;
|
|
14
|
+
}
|
|
15
|
+
c.step(owner, frame.tasks.length + 2);
|
|
16
|
+
const [task, ...remaining] = frame.tasks, node = task.predicate;
|
|
17
|
+
if (node.kind === 'not') {
|
|
18
|
+
c.step(owner, remaining.length + 4);
|
|
19
|
+
pending.push({ ...frame, tasks: [{ predicate: node.child, negative: !task.negative }, ...remaining] });
|
|
20
|
+
}
|
|
21
|
+
else if (node.kind === 'regular') {
|
|
22
|
+
const language = regular.intersect([frame.branch.language, task.negative ? regular.negate(node.language, owner) : node.language], owner);
|
|
23
|
+
if (regular.witness(language, owner) !== undefined) {
|
|
24
|
+
c.step(owner, 4);
|
|
25
|
+
pending.push({ tasks: remaining, branch: { ...frame.branch, language } });
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
else if (node.kind === 'numeric') {
|
|
29
|
+
const condition = task.negative ? numeric.difference(numeric.all(), node.condition, owner) : node.condition;
|
|
30
|
+
c.step(owner, 4);
|
|
31
|
+
pending.push({ tasks: remaining, branch: { ...frame.branch, numeric: numeric.intersection(frame.branch.numeric, condition, owner) } });
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
const disjunction = task.negative ? node.kind === 'and' : node.kind === 'or';
|
|
35
|
+
if (disjunction)
|
|
36
|
+
for (const child of node.children) {
|
|
37
|
+
c.step(owner, remaining.length + 4);
|
|
38
|
+
pending.push({ ...frame, tasks: [{ predicate: child, negative: task.negative }, ...remaining] });
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
c.step(owner, node.children.length * 3 + remaining.length + 3);
|
|
42
|
+
pending.push({ ...frame, tasks: [...node.children.map(predicate => ({ predicate, negative: task.negative })), ...remaining] });
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return result;
|
|
47
|
+
};
|
|
48
|
+
const exists = (predicate, source, owner) => {
|
|
49
|
+
for (const branch of branches(predicate, source, owner))
|
|
50
|
+
if (numeric.exists(branch.language, branch.numeric, owner))
|
|
51
|
+
return true;
|
|
52
|
+
return false;
|
|
53
|
+
};
|
|
54
|
+
const witness = (predicate, source, owner) => {
|
|
55
|
+
for (const branch of branches(predicate, source, owner)) {
|
|
56
|
+
const word = numeric.witness(branch.language, branch.numeric, owner);
|
|
57
|
+
if (word !== undefined)
|
|
58
|
+
return word;
|
|
59
|
+
}
|
|
60
|
+
return undefined;
|
|
61
|
+
};
|
|
62
|
+
return { branches, exists, witness };
|
|
63
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/** Shared notation property mapping and rules; never source/context authority. */
|
|
2
|
+
import type { ExpandedName, SyntaxElement } from '../loader/orderedSyntax.js';
|
|
3
|
+
import type { SchemaInterpretation } from '../loader/schemaInput.js';
|
|
4
|
+
import type { SemanticBudget } from './semanticBudget.js';
|
|
5
|
+
export type SchemaNotationProperties = Readonly<{
|
|
6
|
+
name: ExpandedName;
|
|
7
|
+
publicIdentifier: string | undefined;
|
|
8
|
+
systemIdentifier: string | undefined;
|
|
9
|
+
}>;
|
|
10
|
+
export type NotationPropertyFailure = Readonly<{
|
|
11
|
+
kind: 'invalid-schema';
|
|
12
|
+
rule: 'n-props-correct';
|
|
13
|
+
message: string;
|
|
14
|
+
}>;
|
|
15
|
+
export type SourceNotationProperties = Readonly<{
|
|
16
|
+
kind: 'properties';
|
|
17
|
+
properties: SchemaNotationProperties;
|
|
18
|
+
}> | NotationPropertyFailure;
|
|
19
|
+
declare const checked: Readonly<{
|
|
20
|
+
kind: "checked";
|
|
21
|
+
}>;
|
|
22
|
+
/** Source target-namespace mapping, including chameleon include interpretation. */
|
|
23
|
+
export declare function sourceNotationNamespace(schema: SchemaInterpretation, budget: SemanticBudget): string;
|
|
24
|
+
/** XML source mapping only. Invalid named tuples remain available for reservation. */
|
|
25
|
+
export declare function readSourceNotationProperties(syntax: SyntaxElement, effectiveNamespace: string, budget: SemanticBudget): SourceNotationProperties;
|
|
26
|
+
/** Abstract values are checked as supplied, without source normalization/repair. */
|
|
27
|
+
export declare function checkNotationProperties(properties: SchemaNotationProperties, budget: SemanticBudget): typeof checked | NotationPropertyFailure;
|
|
28
|
+
export declare function notationNameKey(name: ExpandedName, budget: SemanticBudget): string;
|
|
29
|
+
/** Complete property equality: absent identifiers never fill from another tuple. */
|
|
30
|
+
export declare function equalNotationProperties(left: SchemaNotationProperties, right: SchemaNotationProperties, budget: SemanticBudget): boolean;
|
|
31
|
+
export {};
|
|
32
|
+
//# sourceMappingURL=schemaNotationProperties.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemaNotationProperties.d.ts","sourceRoot":"","sources":["../../src/compiler/schemaNotationProperties.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,OAAO,KAAK,EAAC,YAAY,EAAE,aAAa,EAAC,MAAM,4BAA4B,CAAC;AAC5E,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,0BAA0B,CAAC;AAInE,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AAExD,MAAM,MAAM,wBAAwB,GAAG,QAAQ,CAAC;IAC9C,IAAI,EAAE,YAAY,CAAC;IACnB,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC;CACtC,CAAC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAAC;IAC7C,IAAI,EAAE,gBAAgB,CAAC;IAAC,IAAI,EAAE,iBAAiB,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;CAClE,CAAC,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,QAAQ,CAAC;IAAC,IAAI,EAAE,YAAY,CAAC;IAAC,UAAU,EAAE,wBAAwB,CAAA;CAAC,CAAC,GAAG,uBAAuB,CAAC;AACtI,QAAA,MAAM,OAAO;;EAA4C,CAAC;AAM1D,mFAAmF;AACnF,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,oBAAoB,EAAE,MAAM,EAAE,cAAc,GAAG,MAAM,CAYpG;AAED,sFAAsF;AACtF,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,GAAG,wBAAwB,CAoBhJ;AAED,oFAAoF;AACpF,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,wBAAwB,EAAE,MAAM,EAAE,cAAc,GAAG,OAAO,OAAO,GAAG,uBAAuB,CAa9I;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,cAAc,GAAG,MAAM,CAGlF;AAED,oFAAoF;AACpF,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,wBAAwB,EAAE,KAAK,EAAE,wBAAwB,EAAE,MAAM,EAAE,cAAc,GAAG,OAAO,CAMxI"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { isXmlNCName } from '../loader/orderedSyntax.js';
|
|
2
|
+
import { normalizeWhitespace } from '../util/xmlWhitespace.js';
|
|
3
|
+
import { schemaUri } from './schemaUri.js';
|
|
4
|
+
const checked = Object.freeze({ kind: 'checked' });
|
|
5
|
+
function failure(message, budget) {
|
|
6
|
+
budget.chargeWork(64 + message.length);
|
|
7
|
+
return Object.freeze({ kind: 'invalid-schema', rule: 'n-props-correct', message });
|
|
8
|
+
}
|
|
9
|
+
/** Source target-namespace mapping, including chameleon include interpretation. */
|
|
10
|
+
export function sourceNotationNamespace(schema, budget) {
|
|
11
|
+
for (const attribute of schema.syntax.attributes) {
|
|
12
|
+
budget.chargeWork(6 + attribute.name.namespace.length + attribute.name.local.length);
|
|
13
|
+
if (attribute.name.namespace === '' && attribute.name.local === 'targetNamespace') {
|
|
14
|
+
budget.chargeWork(2 + 4 * attribute.value.length);
|
|
15
|
+
return normalizeWhitespace(attribute.value, 'collapse');
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
budget.chargeWork(2);
|
|
19
|
+
if (schema.context.kind !== 'include')
|
|
20
|
+
return '';
|
|
21
|
+
budget.chargeWork(2 + 4 * schema.context.namespace.length);
|
|
22
|
+
return normalizeWhitespace(schema.context.namespace, 'collapse');
|
|
23
|
+
}
|
|
24
|
+
/** XML source mapping only. Invalid named tuples remain available for reservation. */
|
|
25
|
+
export function readSourceNotationProperties(syntax, effectiveNamespace, budget) {
|
|
26
|
+
let local, publicIdentifier, systemIdentifier;
|
|
27
|
+
for (const attribute of syntax.attributes) {
|
|
28
|
+
budget.chargeWork(8 + attribute.name.namespace.length + attribute.name.local.length);
|
|
29
|
+
if (attribute.name.namespace !== '')
|
|
30
|
+
continue;
|
|
31
|
+
const field = attribute.name.local;
|
|
32
|
+
if (field !== 'name' && field !== 'public' && field !== 'system')
|
|
33
|
+
continue;
|
|
34
|
+
budget.chargeWork(2 + 4 * attribute.value.length);
|
|
35
|
+
const value = normalizeWhitespace(attribute.value, 'collapse');
|
|
36
|
+
if (field === 'name' && local === undefined)
|
|
37
|
+
local = value;
|
|
38
|
+
else if (field === 'public' && publicIdentifier === undefined)
|
|
39
|
+
publicIdentifier = value;
|
|
40
|
+
else if (field === 'system' && systemIdentifier === undefined)
|
|
41
|
+
systemIdentifier = value;
|
|
42
|
+
}
|
|
43
|
+
if (local === undefined)
|
|
44
|
+
return failure('Notation requires a name property', budget);
|
|
45
|
+
budget.chargeWork(2 + 4 * effectiveNamespace.length);
|
|
46
|
+
const namespace = normalizeWhitespace(effectiveNamespace, 'collapse');
|
|
47
|
+
budget.chargeWork(96); // Mapped QName, complete tuple, result and their frozen fields.
|
|
48
|
+
return Object.freeze({ kind: 'properties', properties: Object.freeze({
|
|
49
|
+
name: Object.freeze({ namespace, local }), publicIdentifier, systemIdentifier,
|
|
50
|
+
}) });
|
|
51
|
+
}
|
|
52
|
+
/** Abstract values are checked as supplied, without source normalization/repair. */
|
|
53
|
+
export function checkNotationProperties(properties, budget) {
|
|
54
|
+
const { name, publicIdentifier, systemIdentifier } = properties;
|
|
55
|
+
budget.chargeWork(12 + name.local.length * 4);
|
|
56
|
+
if (!isXmlNCName(name.local))
|
|
57
|
+
return failure('Notation name must be an XML NCName', budget);
|
|
58
|
+
const step = (_owner, count = 1) => budget.chargeWork(count);
|
|
59
|
+
if (name.namespace !== '' && !schemaUri(name.namespace, properties, { step }))
|
|
60
|
+
return failure('Notation namespace must be a URI reference or absent', budget);
|
|
61
|
+
if (publicIdentifier === undefined && systemIdentifier === undefined)
|
|
62
|
+
return failure('Notation requires a public or system identifier', budget);
|
|
63
|
+
if (publicIdentifier !== undefined) {
|
|
64
|
+
budget.chargeWork(2 + 4 * publicIdentifier.length);
|
|
65
|
+
if (!/^[\r\na-zA-Z0-9 \-'()+,.\/:=?;!*#@$_%]*$/.test(publicIdentifier))
|
|
66
|
+
return failure('Notation public identifier has an invalid XML PubidChar', budget);
|
|
67
|
+
}
|
|
68
|
+
if (systemIdentifier !== undefined && !schemaUri(systemIdentifier, properties, { step }))
|
|
69
|
+
return failure('Notation system identifier must be a URI reference', budget);
|
|
70
|
+
budget.chargeWork();
|
|
71
|
+
return checked;
|
|
72
|
+
}
|
|
73
|
+
export function notationNameKey(name, budget) {
|
|
74
|
+
budget.chargeWork(30 + 6 * (name.namespace.length + name.local.length));
|
|
75
|
+
return JSON.stringify([name.namespace, name.local]);
|
|
76
|
+
}
|
|
77
|
+
/** Complete property equality: absent identifiers never fill from another tuple. */
|
|
78
|
+
export function equalNotationProperties(left, right, budget) {
|
|
79
|
+
budget.chargeWork(16 + left.name.namespace.length + right.name.namespace.length + left.name.local.length + right.name.local.length +
|
|
80
|
+
(left.publicIdentifier?.length ?? 0) + (right.publicIdentifier?.length ?? 0) +
|
|
81
|
+
(left.systemIdentifier?.length ?? 0) + (right.systemIdentifier?.length ?? 0));
|
|
82
|
+
return left.name.namespace === right.name.namespace && left.name.local === right.name.local &&
|
|
83
|
+
left.publicIdentifier === right.publicIdentifier && left.systemIdentifier === right.systemIdentifier;
|
|
84
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** Boolean numeric guards carried through value-invariant lexical images. */
|
|
2
|
+
import type { IeeeInputInterval } from './schemaIeeeLanguage.js';
|
|
3
|
+
import { schemaIeeeLanguages } from './schemaIeeeLanguage.js';
|
|
4
|
+
import type { RegularLanguage } from './schemaRegularLanguage.js';
|
|
5
|
+
import { schemaRegularLanguages } from './schemaRegularLanguage.js';
|
|
6
|
+
import type { SchemaPatternContext } from './schemaValueContext.js';
|
|
7
|
+
export type NumericImageCondition = Readonly<{
|
|
8
|
+
intervals: readonly IeeeInputInterval[];
|
|
9
|
+
literals: readonly string[];
|
|
10
|
+
nonNumeric: boolean;
|
|
11
|
+
}>;
|
|
12
|
+
export declare function schemaNumericImageConditions<Owner>(c: SchemaPatternContext<Owner>, regular: ReturnType<typeof schemaRegularLanguages<Owner>>, ieee: ReturnType<typeof schemaIeeeLanguages<Owner>>, expression: (text: string, owner: Owner) => RegularLanguage): {
|
|
13
|
+
all: () => NumericImageCondition;
|
|
14
|
+
difference: (a: NumericImageCondition, b: NumericImageCondition, owner: Owner) => NumericImageCondition;
|
|
15
|
+
intersection: (a: NumericImageCondition, b: NumericImageCondition, owner: Owner) => Readonly<{
|
|
16
|
+
intervals: readonly IeeeInputInterval[];
|
|
17
|
+
literals: readonly string[];
|
|
18
|
+
nonNumeric: boolean;
|
|
19
|
+
}>;
|
|
20
|
+
exists: (language: RegularLanguage, condition: NumericImageCondition, owner: Owner) => boolean;
|
|
21
|
+
numericWitness: (language: RegularLanguage, condition: NumericImageCondition, owner: Owner) => string | undefined;
|
|
22
|
+
witness: (language: RegularLanguage, condition: NumericImageCondition, owner: Owner) => string | undefined;
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=schemaNumericImageConditions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemaNumericImageConditions.d.ts","sourceRoot":"","sources":["../../src/compiler/schemaNumericImageConditions.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAC,mBAAmB,EAAC,MAAM,yBAAyB,CAAC;AAC5D,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,MAAM,MAAM,qBAAqB,GAAG,QAAQ,CAAC;IAAC,SAAS,EAAE,SAAS,iBAAiB,EAAE,CAAC;IAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IAAC,UAAU,EAAE,OAAO,CAAA;CAAC,CAAC,CAAC;AAC1I,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,CAAC,EAAE,oBAAoB,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,UAAU,CAAC,OAAO,sBAAsB,CAAC,KAAK,CAAC,CAAC,EAC3I,IAAI,EAAE,UAAU,CAAC,OAAO,mBAAmB,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,KAAK,eAAe;eAChG,qBAAqB;oBACd,qBAAqB,KAAK,qBAAqB,SAAS,KAAK,KAAG,qBAAqB;sBAInF,qBAAqB,KAAK,qBAAqB,SAAS,KAAK;mBAR/B,SAAS,iBAAiB,EAAE;kBAAY,SAAS,MAAM,EAAE;oBAAc,OAAO;;uBAU3G,eAAe,aAAa,qBAAqB,SAAS,KAAK,KAAG,OAAO;+BAejE,eAAe,aAAa,qBAAqB,SAAS,KAAK,KAAG,MAAM,GAAG,SAAS;wBAS3F,eAAe,aAAa,qBAAqB,SAAS,KAAK,KAAG,MAAM,GAAG,SAAS;EAiBhH"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { schemaIeeeLanguages } from './schemaIeeeLanguage.js';
|
|
2
|
+
import { schemaRegularLanguages } from './schemaRegularLanguage.js';
|
|
3
|
+
export function schemaNumericImageConditions(c, regular, ieee, expression) {
|
|
4
|
+
const all = () => ({ intervals: [{ negative: false }, { negative: true }], literals: ['INF', '-INF', 'NaN'], nonNumeric: true });
|
|
5
|
+
const difference = (a, b, owner) => {
|
|
6
|
+
c.step(owner, a.literals.length + b.literals.length + 4);
|
|
7
|
+
return { intervals: ieee.subtractIntervals(a.intervals, b.intervals, owner), literals: a.literals.filter(value => !b.literals.includes(value)), nonNumeric: a.nonNumeric && !b.nonNumeric };
|
|
8
|
+
};
|
|
9
|
+
const intersection = (a, b, owner) => difference(a, difference(all(), b, owner), owner);
|
|
10
|
+
const grammar = (owner) => expression('INF|\\-INF|NaN|[+\\-]?([0-9]+([.][0-9]*)?|[.][0-9]+)([eE][+\\-]?[0-9]+)?', owner);
|
|
11
|
+
const exists = (language, condition, owner) => {
|
|
12
|
+
c.step(owner, condition.intervals.length + condition.literals.length + 4);
|
|
13
|
+
if (condition.nonNumeric && ['INF', '-INF', 'NaN'].every(value => condition.literals.includes(value))
|
|
14
|
+
&& [false, true].every(negative => condition.intervals.some(interval => interval.negative === negative && !interval.lower && !interval.upper)))
|
|
15
|
+
return regular.witness(language, owner) !== undefined;
|
|
16
|
+
if (condition.nonNumeric && regular.witness(regular.intersect([language,
|
|
17
|
+
regular.negate(regular.whitespacePreimage(grammar(owner), 'collapse', owner), owner)], owner), owner) !== undefined)
|
|
18
|
+
return true;
|
|
19
|
+
for (const literal of condition.literals) {
|
|
20
|
+
const inverse = regular.whitespacePreimage(expression(literal === '-INF' ? '\\-INF' : literal, owner), 'collapse', owner);
|
|
21
|
+
if (regular.witness(regular.intersect([language, inverse], owner), owner) !== undefined)
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
const normalized = regular.whitespaceImage(language, 'collapse', owner);
|
|
25
|
+
for (const interval of condition.intervals)
|
|
26
|
+
if (ieee.intervalWitness(normalized, interval, owner) !== undefined)
|
|
27
|
+
return true;
|
|
28
|
+
return false;
|
|
29
|
+
};
|
|
30
|
+
const numericWitness = (language, condition, owner) => {
|
|
31
|
+
const normalized = regular.whitespaceImage(language, 'collapse', owner);
|
|
32
|
+
for (const literal of condition.literals) {
|
|
33
|
+
const word = regular.witness(regular.intersect([normalized, expression(literal === '-INF' ? '\\-INF' : literal, owner)], owner), owner);
|
|
34
|
+
if (word !== undefined)
|
|
35
|
+
return word;
|
|
36
|
+
}
|
|
37
|
+
for (const interval of condition.intervals) {
|
|
38
|
+
const word = ieee.intervalWitness(normalized, interval, owner);
|
|
39
|
+
if (word !== undefined)
|
|
40
|
+
return word;
|
|
41
|
+
}
|
|
42
|
+
return undefined;
|
|
43
|
+
};
|
|
44
|
+
const witness = (language, condition, owner) => {
|
|
45
|
+
c.step(owner, condition.intervals.length + condition.literals.length + 4);
|
|
46
|
+
if (condition.nonNumeric && ['INF', '-INF', 'NaN'].every(value => condition.literals.includes(value))
|
|
47
|
+
&& [false, true].every(negative => condition.intervals.some(interval => interval.negative === negative && !interval.lower && !interval.upper)))
|
|
48
|
+
return regular.witness(language, owner);
|
|
49
|
+
if (condition.nonNumeric) {
|
|
50
|
+
const word = regular.witness(regular.intersect([language, regular.negate(regular.whitespacePreimage(grammar(owner), 'collapse', owner), owner)], owner), owner);
|
|
51
|
+
if (word !== undefined)
|
|
52
|
+
return word;
|
|
53
|
+
}
|
|
54
|
+
const normalized = numericWitness(language, condition, owner);
|
|
55
|
+
if (normalized === undefined)
|
|
56
|
+
return undefined;
|
|
57
|
+
c.text(normalized, owner);
|
|
58
|
+
c.step(owner, normalized.length * 3 + 4);
|
|
59
|
+
const quoted = normalized.replace(/[\\.\-^?*+{}()\[\]|]/g, '\\$&');
|
|
60
|
+
const raw = regular.witness(regular.intersect([language, regular.whitespacePreimage(expression(quoted, owner), 'collapse', owner)], owner), owner);
|
|
61
|
+
if (raw === undefined)
|
|
62
|
+
throw new TypeError('A normalized numeric witness must have a raw preimage');
|
|
63
|
+
return raw;
|
|
64
|
+
};
|
|
65
|
+
return { all, difference, intersection, exists, numericWitness, witness };
|
|
66
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** Fresh abstract particle properties, distinct from canonical XML wildcard spelling and native origin. */
|
|
2
|
+
import type { LexicalValue, NodeId, ParticleNode } from './canonicalGraph.js';
|
|
3
|
+
import type { SemanticBudget } from './semanticBudget.js';
|
|
4
|
+
import type { SemanticContext } from './semanticContext.js';
|
|
5
|
+
import type { NamespaceConstraint, WildcardProcess } from './wildcardAlgebra.js';
|
|
6
|
+
export type RawParticleWildcardProperties = Readonly<{
|
|
7
|
+
particle: NodeId;
|
|
8
|
+
namespace: NamespaceConstraint;
|
|
9
|
+
processContents: WildcardProcess;
|
|
10
|
+
}>;
|
|
11
|
+
export type SelectedParticleWildcard = Readonly<{
|
|
12
|
+
namespace: NamespaceConstraint;
|
|
13
|
+
processContents: WildcardProcess;
|
|
14
|
+
/** Source spelling is diagnostic data, never the selected abstract namespace property. */
|
|
15
|
+
lexical: LexicalValue;
|
|
16
|
+
}>;
|
|
17
|
+
export declare function prepareRawParticleWildcardProperties(input: unknown, budget: SemanticBudget): RawParticleWildcardProperties;
|
|
18
|
+
/** All semantic particle owners select the same tuple; source-private inputs stay lexical. */
|
|
19
|
+
export declare function readParticleWildcard(context: SemanticContext, particle: ParticleNode): SelectedParticleWildcard;
|
|
20
|
+
//# sourceMappingURL=schemaParticleWildcardProperties.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemaParticleWildcardProperties.d.ts","sourceRoot":"","sources":["../../src/compiler/schemaParticleWildcardProperties.ts"],"names":[],"mappings":"AAAA,2GAA2G;AAC3G,OAAO,KAAK,EAAC,YAAY,EAAE,MAAM,EAAE,YAAY,EAAC,MAAM,qBAAqB,CAAC;AAC5E,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,sBAAsB,CAAC;AAE1D,OAAO,KAAK,EAAC,mBAAmB,EAAE,eAAe,EAAC,MAAM,sBAAsB,CAAC;AAE/E,MAAM,MAAM,6BAA6B,GAAG,QAAQ,CAAC;IACnD,QAAQ,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,mBAAmB,CAAC;IAAC,eAAe,EAAE,eAAe,CAAC;CACpF,CAAC,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,QAAQ,CAAC;IAC9C,SAAS,EAAE,mBAAmB,CAAC;IAAC,eAAe,EAAE,eAAe,CAAC;IACjE,0FAA0F;IAC1F,OAAO,EAAE,YAAY,CAAC;CACvB,CAAC,CAAC;AAEH,wBAAgB,oCAAoC,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,cAAc,GAAG,6BAA6B,CAqB1H;AAED,8FAA8F;AAC9F,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,YAAY,GAAG,wBAAwB,CAQ/G"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { canonicalNamespaceConstraint, wildcardNamespaces } from './wildcardAlgebra.js';
|
|
2
|
+
export function prepareRawParticleWildcardProperties(input, budget) {
|
|
3
|
+
const value = budget.snapshot(input);
|
|
4
|
+
const object = (item) => !!item && typeof item === 'object' && !Array.isArray(item);
|
|
5
|
+
const fields = (item, names) => {
|
|
6
|
+
budget.chargeWork(3);
|
|
7
|
+
let count = 0;
|
|
8
|
+
for (const key in item) {
|
|
9
|
+
budget.chargeWork(1 + key.length);
|
|
10
|
+
if (!names.includes(key))
|
|
11
|
+
return false;
|
|
12
|
+
count++;
|
|
13
|
+
}
|
|
14
|
+
return count === names.length;
|
|
15
|
+
};
|
|
16
|
+
budget.chargeWork(12);
|
|
17
|
+
if (!object(value) || !fields(value, ['particle', 'namespace', 'processContents']) || typeof value.particle !== 'string'
|
|
18
|
+
|| !object(value.namespace) || !fields(value.namespace, ['kind', 'namespaces'])
|
|
19
|
+
|| value.namespace.kind !== 'set' && value.namespace.kind !== 'not' || !Array.isArray(value.namespace.namespaces)
|
|
20
|
+
|| !['strict', 'lax', 'skip'].includes(value.processContents))
|
|
21
|
+
throw new TypeError('Invalid particle wildcard properties');
|
|
22
|
+
budget.chargeWork(value.particle.length + value.namespace.namespaces.length + 3);
|
|
23
|
+
for (const namespace of value.namespace.namespaces) {
|
|
24
|
+
budget.chargeWork();
|
|
25
|
+
if (typeof namespace !== 'string')
|
|
26
|
+
throw new TypeError('Invalid namespace property');
|
|
27
|
+
budget.chargeWork(namespace.length);
|
|
28
|
+
}
|
|
29
|
+
const namespace = canonicalNamespaceConstraint(value.namespace, budget.chargeWork);
|
|
30
|
+
budget.chargeWork(5);
|
|
31
|
+
return budget.freeze({ particle: value.particle, namespace, processContents: value.processContents });
|
|
32
|
+
}
|
|
33
|
+
/** All semantic particle owners select the same tuple; source-private inputs stay lexical. */
|
|
34
|
+
export function readParticleWildcard(context, particle) {
|
|
35
|
+
if (particle.term.kind !== 'any')
|
|
36
|
+
throw new TypeError('An ANY particle is required');
|
|
37
|
+
const budget = context.budget, found = context.lookup(particle.id);
|
|
38
|
+
const raw = found.kind === 'found' && found.node === particle ? context.rawParticleWildcardProperties(particle.id) : undefined;
|
|
39
|
+
const namespace = raw?.namespace ?? wildcardNamespaces(particle.term.wildcard, budget.chargeWork);
|
|
40
|
+
budget.chargeWork(5);
|
|
41
|
+
return Object.freeze({ namespace, processContents: raw?.processContents ?? particle.term.wildcard.processContents,
|
|
42
|
+
lexical: particle.term.wildcard.namespace });
|
|
43
|
+
}
|