@techspokes/typescript-wsdl-client 1.1.3 → 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 +50 -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/generateClient.d.ts.map +1 -1
- package/dist/client/generateClient.js +22 -9
- 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/generated-code.md +4 -0
- package/docs/reference-validation.md +243 -0
- package/docs/releases/v1.1.4.md +36 -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 +27 -13
- package/src/generation/preambles/direct-client/typescript.preamble +3 -0
- package/src/runtime/clientStreamMethods.tpl.txt +1 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** Typed graph edges shared by resolution and structural companion traversal. */
|
|
2
|
+
import type { GraphNode, NodeId, Reference } from "./canonicalGraph.js";
|
|
3
|
+
export type ReferenceSlot = Readonly<{
|
|
4
|
+
path: string;
|
|
5
|
+
reference: Reference;
|
|
6
|
+
}>;
|
|
7
|
+
/** Map typed reference fields only; lexical syntax/provenance remain original data. */
|
|
8
|
+
export declare function mapNodeReferences(node: GraphNode, map: (reference: Reference) => Reference): GraphNode;
|
|
9
|
+
export declare function referenceSlots(node: GraphNode): readonly ReferenceSlot[];
|
|
10
|
+
export declare function containedNodes(node: GraphNode): readonly NodeId[];
|
|
11
|
+
//# sourceMappingURL=graphTraversal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graphTraversal.d.ts","sourceRoot":"","sources":["../../src/compiler/graphTraversal.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,OAAO,KAAK,EAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAC,MAAM,qBAAqB,CAAC;AAEtE,MAAM,MAAM,aAAa,GAAG,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,SAAS,CAAA;CAAC,CAAC,CAAC;AAE3E,uFAAuF;AACvF,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,SAAS,GAAG,SAAS,CAYtG;AACD,wBAAgB,cAAc,CAAC,IAAI,EAAE,SAAS,GAAG,SAAS,aAAa,EAAE,CAaxE;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,SAAS,GAAG,SAAS,MAAM,EAAE,CAQjE"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/** Map typed reference fields only; lexical syntax/provenance remain original data. */
|
|
2
|
+
export function mapNodeReferences(node, map) {
|
|
3
|
+
switch (node.kind) {
|
|
4
|
+
case "element": return { ...node, type: map(node.type), substitutionGroup: node.substitutionGroup ? map(node.substitutionGroup) : undefined };
|
|
5
|
+
case "attribute": return { ...node, type: map(node.type) };
|
|
6
|
+
case "attributeUse": return { ...node, declaration: map(node.declaration) };
|
|
7
|
+
case "attributeGroupUse": return { ...node, reference: map(node.reference) };
|
|
8
|
+
case "particle": return { ...node, term: node.term.kind === "element" ? { ...node.term, declaration: map(node.term.declaration) } : node.term.kind === "group" ? { ...node.term, reference: map(node.term.reference) } : node.term };
|
|
9
|
+
case "complexType": return { ...node, derivation: node.derivation ? { ...node.derivation, base: map(node.derivation.base), inlineType: node.derivation.inlineType ? map(node.derivation.inlineType) : undefined } : undefined };
|
|
10
|
+
case "simpleType": return { ...node, variety: node.variety.kind === "restriction" ? { ...node.variety, base: map(node.variety.base) } : node.variety.kind === "list" ? { ...node.variety, item: map(node.variety.item) } : { ...node.variety, members: node.variety.members.map(map) } };
|
|
11
|
+
case "wsdl": return { ...node, references: node.references.map(r => ({ ...r, reference: map(r.reference) })) };
|
|
12
|
+
default: return node;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
export function referenceSlots(node) {
|
|
16
|
+
const slot = (path, reference) => ({ path, reference });
|
|
17
|
+
switch (node.kind) {
|
|
18
|
+
case "element": return [slot("type", node.type), ...(node.substitutionGroup ? [slot("substitutionGroup", node.substitutionGroup)] : [])];
|
|
19
|
+
case "attribute": return [slot("type", node.type)];
|
|
20
|
+
case "attributeUse": return [slot("declaration", node.declaration)];
|
|
21
|
+
case "attributeGroupUse": return [slot("reference", node.reference)];
|
|
22
|
+
case "particle": return node.term.kind === "element" ? [slot("term/declaration", node.term.declaration)] : node.term.kind === "group" ? [slot("term/reference", node.term.reference)] : [];
|
|
23
|
+
case "complexType": return node.derivation ? [slot("derivation/base", node.derivation.base), ...(node.derivation.inlineType ? [slot("derivation/inlineType", node.derivation.inlineType)] : [])] : [];
|
|
24
|
+
case "simpleType": return node.variety.kind === "restriction" ? [slot("variety/base", node.variety.base)] : node.variety.kind === "list" ? [slot("variety/item", node.variety.item)] : node.variety.members.map((r, i) => slot(`variety/members/${i}`, r));
|
|
25
|
+
case "wsdl": return node.references.map((r, i) => slot(`references/${i}`, r.reference));
|
|
26
|
+
default: return [];
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export function containedNodes(node) {
|
|
30
|
+
switch (node.kind) {
|
|
31
|
+
case "group": return [node.content];
|
|
32
|
+
case "complexType": return [...(node.content ? [node.content] : []), ...node.attributes];
|
|
33
|
+
case "attributeGroup": return node.attributes;
|
|
34
|
+
case "particle": return "children" in node.term ? node.term.children : [];
|
|
35
|
+
default: return [];
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { GraphNode, Identity } from './canonicalGraph.js';
|
|
2
|
+
export type IdentityCharge = (units: number) => void;
|
|
3
|
+
export declare const HYPOTHETICAL_SCOPED_TAG = "hypothetical-scoped-v1";
|
|
4
|
+
/** JSON tuple encoding is injective on owner/path/role UTF-16 strings; actual IDs keep legacy encoding. */
|
|
5
|
+
export declare function hypotheticalScopedId(owner: string, path: string, role: string, charge?: IdentityCharge): string;
|
|
6
|
+
/** Private backing only: these tagged IDs are never admitted context members. */
|
|
7
|
+
export declare function privateParticleId(family: 'effective' | 'builtin-anyType', owner: string, path: string, role: string, charge: IdentityCharge): string;
|
|
8
|
+
/** Encoding-independent identity tuple; required to reject legacy/new aliases of one scoped identity. */
|
|
9
|
+
export declare function semanticIdentityTuple(identity: Identity, charge?: IdentityCharge): string;
|
|
10
|
+
/** New acceptance seam ONLY for hypothetical additions; actual/source admission remains native legacy. */
|
|
11
|
+
export declare function matchesHypotheticalNodeId(node: GraphNode, charge?: IdentityCharge): boolean;
|
|
12
|
+
export declare function sameSemanticIdentity(left: GraphNode, right: GraphNode, charge?: IdentityCharge): boolean;
|
|
13
|
+
/** Returns the second record of a duplicate identity tuple; does not conflate distinct tuples sharing a hash. */
|
|
14
|
+
export declare function duplicateIdentityTuple(nodes: Iterable<GraphNode>, charge?: IdentityCharge): string | undefined;
|
|
15
|
+
/** Finite constructive allocation, independent of hash range or collision assumptions. */
|
|
16
|
+
export declare function allocateHypotheticalScopedIdentity(owner: string, role: string, forbiddenIds: ReadonlySet<string>, forbiddenTuples: ReadonlySet<string>, charge?: IdentityCharge): Readonly<{
|
|
17
|
+
id: string;
|
|
18
|
+
identity: Extract<Identity, {
|
|
19
|
+
kind: 'scoped';
|
|
20
|
+
}>;
|
|
21
|
+
candidatesTried: bigint;
|
|
22
|
+
}>;
|
|
23
|
+
//# sourceMappingURL=hypotheticalScopedIdentity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hypotheticalScopedIdentity.d.ts","sourceRoot":"","sources":["../../src/compiler/hypotheticalScopedIdentity.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,SAAS,EAAE,QAAQ,EAAC,MAAM,qBAAqB,CAAC;AAE7D,MAAM,MAAM,cAAc,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;AAErD,eAAO,MAAM,uBAAuB,2BAA2B,CAAC;AAEhE,2GAA2G;AAC3G,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,GAAE,cAAqB,GAAG,MAAM,CAGrH;AAED,iFAAiF;AACjF,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,WAAW,GAAG,iBAAiB,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAClH,MAAM,EAAE,cAAc,GAAG,MAAM,CAGhC;AAED,yGAAyG;AACzG,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,GAAE,cAAqB,GAAG,MAAM,CAO/F;AAED,0GAA0G;AAC1G,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,SAAS,EAAE,MAAM,GAAE,cAAqB,GAAG,OAAO,CAejG;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,GAAE,cAAqB,GAAG,OAAO,CAG9G;AAED,iHAAiH;AACjH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAE,cAAqB,GAAG,MAAM,GAAG,SAAS,CAUpH;AAED,0FAA0F;AAC1F,wBAAgB,kCAAkC,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAC5E,YAAY,EAAE,WAAW,CAAC,MAAM,CAAC,EAAE,eAAe,EAAE,WAAW,CAAC,MAAM,CAAC,EAAE,MAAM,GAAE,cAAqB,GACtG,QAAQ,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE;QAAC,IAAI,EAAE,QAAQ,CAAA;KAAC,CAAC,CAAC;IAAC,eAAe,EAAE,MAAM,CAAA;CAAC,CAAC,CAiB/F"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/** Internal optional injective encoding for genuinely fresh scoped plan identities. */
|
|
2
|
+
import { globalId, scopedId } from './canonicalGraph.js';
|
|
3
|
+
const noop = () => { };
|
|
4
|
+
export const HYPOTHETICAL_SCOPED_TAG = 'hypothetical-scoped-v1';
|
|
5
|
+
/** JSON tuple encoding is injective on owner/path/role UTF-16 strings; actual IDs keep legacy encoding. */
|
|
6
|
+
export function hypotheticalScopedId(owner, path, role, charge = noop) {
|
|
7
|
+
charge(64 + 6 * (owner.length + path.length + role.length));
|
|
8
|
+
return JSON.stringify([HYPOTHETICAL_SCOPED_TAG, owner, path, role]);
|
|
9
|
+
}
|
|
10
|
+
/** Private backing only: these tagged IDs are never admitted context members. */
|
|
11
|
+
export function privateParticleId(family, owner, path, role, charge) {
|
|
12
|
+
charge(96 + 6 * (family.length + owner.length + path.length + role.length));
|
|
13
|
+
return JSON.stringify(['semantic-private-particle-v1', family, owner, path, role]);
|
|
14
|
+
}
|
|
15
|
+
/** Encoding-independent identity tuple; required to reject legacy/new aliases of one scoped identity. */
|
|
16
|
+
export function semanticIdentityTuple(identity, charge = noop) {
|
|
17
|
+
if (identity.kind === 'global') {
|
|
18
|
+
charge(64 + 6 * (identity.role.length + identity.name.namespace.length + identity.name.local.length));
|
|
19
|
+
return globalId(identity.role, identity.name);
|
|
20
|
+
}
|
|
21
|
+
charge(64 + 6 * (identity.owner.length + identity.path.length + identity.role.length));
|
|
22
|
+
return JSON.stringify(['scoped-identity', identity.owner, identity.path, identity.role]);
|
|
23
|
+
}
|
|
24
|
+
/** New acceptance seam ONLY for hypothetical additions; actual/source admission remains native legacy. */
|
|
25
|
+
export function matchesHypotheticalNodeId(node, charge = noop) {
|
|
26
|
+
const identity = node.identity;
|
|
27
|
+
if (identity.kind === 'global') {
|
|
28
|
+
charge(64 + 6 * (identity.role.length + identity.name.namespace.length + identity.name.local.length));
|
|
29
|
+
const expected = globalId(identity.role, identity.name);
|
|
30
|
+
charge(node.id.length + expected.length + 1);
|
|
31
|
+
return node.id === expected;
|
|
32
|
+
}
|
|
33
|
+
charge(HYPOTHETICAL_SCOPED_TAG.length + 4);
|
|
34
|
+
if (node.id.startsWith('["' + HYPOTHETICAL_SCOPED_TAG + '"')) {
|
|
35
|
+
const expected = hypotheticalScopedId(identity.owner, identity.path, identity.role, charge);
|
|
36
|
+
charge(node.id.length + expected.length + 1);
|
|
37
|
+
return node.id === expected;
|
|
38
|
+
}
|
|
39
|
+
charge(64 + 6 * (identity.owner.length + identity.path.length + identity.role.length));
|
|
40
|
+
const legacy = scopedId(identity.owner, identity.path, identity.role);
|
|
41
|
+
charge(node.id.length + legacy.length + 1);
|
|
42
|
+
return node.id === legacy;
|
|
43
|
+
}
|
|
44
|
+
export function sameSemanticIdentity(left, right, charge = noop) {
|
|
45
|
+
const a = semanticIdentityTuple(left.identity, charge), b = semanticIdentityTuple(right.identity, charge);
|
|
46
|
+
charge(a.length + b.length + 1);
|
|
47
|
+
return a === b;
|
|
48
|
+
}
|
|
49
|
+
/** Returns the second record of a duplicate identity tuple; does not conflate distinct tuples sharing a hash. */
|
|
50
|
+
export function duplicateIdentityTuple(nodes, charge = noop) {
|
|
51
|
+
charge(4);
|
|
52
|
+
const seen = new Map();
|
|
53
|
+
for (const node of nodes) {
|
|
54
|
+
const tuple = semanticIdentityTuple(node.identity, charge);
|
|
55
|
+
charge(tuple.length + node.id.length + 3);
|
|
56
|
+
const prior = seen.get(tuple);
|
|
57
|
+
if (prior !== undefined && prior !== node.id)
|
|
58
|
+
return node.id;
|
|
59
|
+
seen.set(tuple, node.id);
|
|
60
|
+
}
|
|
61
|
+
return undefined;
|
|
62
|
+
}
|
|
63
|
+
/** Finite constructive allocation, independent of hash range or collision assumptions. */
|
|
64
|
+
export function allocateHypotheticalScopedIdentity(owner, role, forbiddenIds, forbiddenTuples, charge = noop) {
|
|
65
|
+
charge(64);
|
|
66
|
+
const blocked = BigInt(forbiddenIds.size) + BigInt(forbiddenTuples.size);
|
|
67
|
+
for (let index = 0n; index <= blocked; index += 1n) {
|
|
68
|
+
// Set.size is a safe integer, so index has at most 17 decimal digits.
|
|
69
|
+
charge(64);
|
|
70
|
+
const path = '/$hypothetical/' + index.toString();
|
|
71
|
+
charge(8 + owner.length + path.length + role.length);
|
|
72
|
+
const identity = { kind: 'scoped', owner, path, role };
|
|
73
|
+
const id = hypotheticalScopedId(owner, path, role, charge), tuple = semanticIdentityTuple(identity, charge);
|
|
74
|
+
charge(6 + id.length + tuple.length);
|
|
75
|
+
if (!forbiddenIds.has(id) && !forbiddenTuples.has(tuple)) {
|
|
76
|
+
charge(4);
|
|
77
|
+
return Object.freeze({ id, identity, candidatesTried: index + 1n });
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
throw new Error('Finite injective allocation invariant violated');
|
|
81
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { NodeId, Occurs } from "./canonicalGraph.js";
|
|
2
|
+
import type { ExpandedName } from "../loader/orderedSyntax.js";
|
|
3
|
+
import type { ComposedGraph } from "./composeCanonicalGraph.js";
|
|
4
|
+
import { SemanticError } from "./resolveCanonicalGraph.js";
|
|
5
|
+
import type { SemanticLimits } from "./resolveCanonicalGraph.js";
|
|
6
|
+
import type { ResourceLimitFailure, SemanticBudget } from './semanticBudget.js';
|
|
7
|
+
export type Bound = Occurs["max"];
|
|
8
|
+
export declare const ZERO_OCCURS: Occurs;
|
|
9
|
+
/** Charge operand and result work before BigInt conversion or arithmetic allocation. */
|
|
10
|
+
export declare function occurrenceAlgebra(charge: () => void): {
|
|
11
|
+
compare: (a: Bound, b: Bound) => number;
|
|
12
|
+
validate: (range: Occurs) => void;
|
|
13
|
+
add: (a: Bound, b: Bound) => Bound;
|
|
14
|
+
multiply: (a: Bound, b: Bound) => Bound;
|
|
15
|
+
count: (value: string) => bigint;
|
|
16
|
+
sum: (a: Occurs, b: Occurs) => Occurs;
|
|
17
|
+
product: (a: Occurs, b: Occurs) => Occurs;
|
|
18
|
+
alternative: (a: Occurs, b: Occurs) => Occurs;
|
|
19
|
+
};
|
|
20
|
+
export type PropertyContribution = Readonly<{
|
|
21
|
+
name: ExpandedName;
|
|
22
|
+
occurs: Occurs;
|
|
23
|
+
declarations: readonly NodeId[];
|
|
24
|
+
particles: readonly NodeId[];
|
|
25
|
+
}>;
|
|
26
|
+
export type ParticleSummary = Readonly<{
|
|
27
|
+
id: NodeId;
|
|
28
|
+
nullable: boolean;
|
|
29
|
+
hasRealization: boolean;
|
|
30
|
+
elements: readonly PropertyContribution[];
|
|
31
|
+
wildcard: Occurs;
|
|
32
|
+
/** XSD's formal ETR / Particle Emptiable predicate, not language emptiness. */
|
|
33
|
+
effectiveTotalRange: Occurs;
|
|
34
|
+
schemaEmptiable: boolean;
|
|
35
|
+
}>;
|
|
36
|
+
export type TypeSummary = Readonly<{
|
|
37
|
+
id: NodeId;
|
|
38
|
+
children: Omit<ParticleSummary, "id">;
|
|
39
|
+
/** All child summaries, including ETR, cover declared particles only beside opaque builtin content. */
|
|
40
|
+
scope: "declared-particles" | "declared-particles-with-opaque-builtin";
|
|
41
|
+
}>;
|
|
42
|
+
export type OccurrenceAnalysis = Readonly<{
|
|
43
|
+
composed: ComposedGraph;
|
|
44
|
+
particles: readonly ParticleSummary[];
|
|
45
|
+
types: readonly TypeSummary[];
|
|
46
|
+
assessment: "requires-schema-assessment";
|
|
47
|
+
metrics: Readonly<{
|
|
48
|
+
steps: number;
|
|
49
|
+
}>;
|
|
50
|
+
}>;
|
|
51
|
+
export type AnalysisResult = Readonly<{
|
|
52
|
+
kind: "analyzed";
|
|
53
|
+
analysis: OccurrenceAnalysis;
|
|
54
|
+
} | {
|
|
55
|
+
kind: "failure";
|
|
56
|
+
diagnostic: SemanticError;
|
|
57
|
+
}>;
|
|
58
|
+
/** Pure bounded DAG evaluation. Element/type value recursion is an atomic element boundary. */
|
|
59
|
+
export declare function analyzeOccurrences(composed: ComposedGraph, limits?: SemanticLimits): AnalysisResult;
|
|
60
|
+
export declare function analyzeOccurrences(composed: ComposedGraph, limits: SemanticLimits, accounting: Readonly<{
|
|
61
|
+
/** Selected semantic projection data; omission preserves canonical analysis's qualified ANY default. */
|
|
62
|
+
budget: SemanticBudget;
|
|
63
|
+
wildcardRealization?: ReadonlyMap<NodeId, boolean>;
|
|
64
|
+
}>): AnalysisResult | ResourceLimitFailure;
|
|
65
|
+
//# sourceMappingURL=occurrenceAnalysis.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"occurrenceAnalysis.d.ts","sourceRoot":"","sources":["../../src/compiler/occurrenceAnalysis.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAY,MAAM,EAAE,MAAM,EAA0B,MAAM,qBAAqB,CAAC;AAC5F,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,4BAA4B,CAAC;AAC7D,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAkB,aAAa,EAAiB,MAAM,4BAA4B,CAAC;AAC1F,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,4BAA4B,CAAC;AAC/D,OAAO,KAAK,EAAC,oBAAoB,EAAE,cAAc,EAAC,MAAM,qBAAqB,CAAC;AAE9E,MAAM,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;AAClC,eAAO,MAAM,WAAW,EAAE,MAA4C,CAAC;AAGvE,wFAAwF;AACxF,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,IAAI;iBAE9B,KAAK,KAAK,KAAK,KAAG,MAAM;sBAQnB,MAAM;aAKf,KAAK,KAAK,KAAK,KAAG,KAAK;kBAIlB,KAAK,KAAK,KAAK,KAAG,KAAK;mBAQtB,MAAM,KAAG,MAAM;aAO1B,MAAM,KAAK,MAAM,KAAG,MAAM;iBACtB,MAAM,KAAK,MAAM,KAAG,MAAM;qBACtB,MAAM,KAAK,MAAM,KAAG,MAAM;EAE9C;AAED,MAAM,MAAM,oBAAoB,GAAG,QAAQ,CAAC;IAC1C,IAAI,EAAE,YAAY,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;CACnG,CAAC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC;IACrC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAC;IAAC,cAAc,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,SAAS,oBAAoB,EAAE,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IACpH,+EAA+E;IAC/E,mBAAmB,EAAE,MAAM,CAAC;IAAC,eAAe,EAAE,OAAO,CAAC;CACvD,CAAC,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC;IACjC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,CAAC;IAClD,uGAAuG;IACvG,KAAK,EAAE,oBAAoB,GAAG,wCAAwC,CAAC;CACxE,CAAC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,QAAQ,CAAC;IACxC,QAAQ,EAAE,aAAa,CAAC;IAAC,SAAS,EAAE,SAAS,eAAe,EAAE,CAAC;IAAC,KAAK,EAAE,SAAS,WAAW,EAAE,CAAC;IAC9F,UAAU,EAAE,4BAA4B,CAAC;IAAC,OAAO,EAAE,QAAQ,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAC,CAAC,CAAC;CAC9E,CAAC,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,QAAQ,CACnC;IAAC,IAAI,EAAE,UAAU,CAAC;IAAC,QAAQ,EAAE,kBAAkB,CAAA;CAAC,GAChD;IAAC,IAAI,EAAE,SAAS,CAAC;IAAC,UAAU,EAAE,aAAa,CAAA;CAAC,CAC7C,CAAC;AAEF,+FAA+F;AAC/F,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,aAAa,EAAE,MAAM,CAAC,EAAE,cAAc,GAAG,cAAc,CAAC;AACrG,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,aAAa,EAAE,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,QAAQ,CAAC;IACvG,wGAAwG;IACxG,MAAM,EAAE,cAAc,CAAC;IAAC,mBAAmB,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC5E,CAAC,GAAG,cAAc,GAAG,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
/** Exact S06 summaries of child particles. Intervals never describe the full language. */
|
|
2
|
+
import { deepFreeze } from "./canonicalGraph.js";
|
|
3
|
+
import { referenceTarget, SemanticError, semanticBudget } from "./resolveCanonicalGraph.js";
|
|
4
|
+
export const ZERO_OCCURS = Object.freeze({ min: "0", max: "0" });
|
|
5
|
+
const ONE_OCCURS = Object.freeze({ min: "1", max: "1" });
|
|
6
|
+
/** Charge operand and result work before BigInt conversion or arithmetic allocation. */
|
|
7
|
+
export function occurrenceAlgebra(charge) {
|
|
8
|
+
const work = (length) => { for (let i = 0; i < length; i++)
|
|
9
|
+
charge(); };
|
|
10
|
+
const compare = (a, b) => {
|
|
11
|
+
work(a.length + b.length);
|
|
12
|
+
return a === b ? 0 : a === "unbounded" ? 1 : b === "unbounded" ? -1 : a.length === b.length ? (a < b ? -1 : 1) : a.length < b.length ? -1 : 1;
|
|
13
|
+
};
|
|
14
|
+
const finite = (value) => {
|
|
15
|
+
work(value.length);
|
|
16
|
+
return value === "unbounded" || /^(0|[1-9][0-9]*)$/.test(value);
|
|
17
|
+
};
|
|
18
|
+
const validate = (range) => {
|
|
19
|
+
if (range.min === "unbounded" || !finite(range.min) || !finite(range.max) || compare(range.min, range.max) > 0) {
|
|
20
|
+
throw new SemanticError("invalid-schema", "Malformed occurrence range");
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
const add = (a, b) => {
|
|
24
|
+
work(a.length + b.length + 1);
|
|
25
|
+
return a === "unbounded" || b === "unbounded" ? "unbounded" : (BigInt(a) + BigInt(b)).toString();
|
|
26
|
+
};
|
|
27
|
+
const multiply = (a, b) => {
|
|
28
|
+
work(a.length + b.length);
|
|
29
|
+
if (a === "0" || b === "0")
|
|
30
|
+
return "0";
|
|
31
|
+
if (a === "unbounded" || b === "unbounded")
|
|
32
|
+
return "unbounded";
|
|
33
|
+
// Conservative decimal multiplication work also bounds the result's digit allocation.
|
|
34
|
+
for (let i = 0; i < a.length; i++)
|
|
35
|
+
work(b.length);
|
|
36
|
+
return (BigInt(a) * BigInt(b)).toString();
|
|
37
|
+
};
|
|
38
|
+
const count = (value) => {
|
|
39
|
+
// Conservative quadratic decimal conversion work is charged before BigInt.
|
|
40
|
+
for (let i = 0; i < value.length; i++)
|
|
41
|
+
work(value.length);
|
|
42
|
+
if (!finite(value) || value === 'unbounded')
|
|
43
|
+
throw new SemanticError('invalid-schema', 'Finite occurrence count required');
|
|
44
|
+
return BigInt(value);
|
|
45
|
+
};
|
|
46
|
+
return { compare, validate, add, multiply, count,
|
|
47
|
+
sum: (a, b) => ({ min: add(a.min, b.min), max: add(a.max, b.max) }),
|
|
48
|
+
product: (a, b) => ({ min: multiply(a.min, b.min), max: multiply(a.max, b.max) }),
|
|
49
|
+
alternative: (a, b) => ({ min: compare(a.min, b.min) <= 0 ? a.min : b.min, max: compare(a.max, b.max) >= 0 ? a.max : b.max }),
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
export function analyzeOccurrences(composed, limits = {}, accounting) {
|
|
53
|
+
return accounting ? accounting.budget.guard(() => analyzeOwnedOccurrences(composed, limits, accounting.budget, accounting.wildcardRealization)) : analyzeOwnedOccurrences(composed, limits);
|
|
54
|
+
}
|
|
55
|
+
function analyzeOwnedOccurrences(composed, limits, request, wildcardRealization) {
|
|
56
|
+
let current;
|
|
57
|
+
const allocate = (units) => request?.chargeWork(units);
|
|
58
|
+
try {
|
|
59
|
+
allocate(128); // Fixed local closures, budget facade and algebra/state containers.
|
|
60
|
+
const graph = composed.resolved.graph, local = semanticBudget(limits);
|
|
61
|
+
const budget = request ? { maxNodes: local.maxNodes, get steps() { return local.steps; }, step(node) {
|
|
62
|
+
request.chargeWork();
|
|
63
|
+
local.step(node);
|
|
64
|
+
} } : local;
|
|
65
|
+
if (graph.nodes.length > budget.maxNodes)
|
|
66
|
+
throw new SemanticError("resource-limit", `Analysis exceeds ${budget.maxNodes} graph nodes`);
|
|
67
|
+
allocate(3);
|
|
68
|
+
const nodes = new Map();
|
|
69
|
+
for (const n of graph.nodes) {
|
|
70
|
+
budget.step(n);
|
|
71
|
+
allocate(2);
|
|
72
|
+
nodes.set(n.id, n);
|
|
73
|
+
}
|
|
74
|
+
const summaries = new Map(), active = new Set();
|
|
75
|
+
const algebra = occurrenceAlgebra(() => budget.step(current));
|
|
76
|
+
const get = (id) => nodes.get(id) ?? (() => { throw new SemanticError("invalid-schema", "Missing structural component", id, current?.context.source); })();
|
|
77
|
+
const key = (name) => {
|
|
78
|
+
for (const value of [name.namespace, name.local])
|
|
79
|
+
for (let i = 0; i < value.length; i++)
|
|
80
|
+
budget.step(current);
|
|
81
|
+
allocate(8 + 6 * (name.namespace.length + name.local.length));
|
|
82
|
+
return JSON.stringify([name.namespace, name.local]);
|
|
83
|
+
};
|
|
84
|
+
const target = (reference, owner) => {
|
|
85
|
+
if (reference.kind === "symbol")
|
|
86
|
+
for (const value of [reference.role, reference.name.namespace, reference.name.local])
|
|
87
|
+
for (let i = 0; i < value.length; i++)
|
|
88
|
+
budget.step(owner);
|
|
89
|
+
return referenceTarget(reference, nodes, owner);
|
|
90
|
+
};
|
|
91
|
+
const copyIds = (a, b) => {
|
|
92
|
+
allocate(1);
|
|
93
|
+
const unique = new Set();
|
|
94
|
+
for (const list of [a, b])
|
|
95
|
+
for (const id of list) {
|
|
96
|
+
budget.step(current);
|
|
97
|
+
for (let i = 0; i < id.length; i++)
|
|
98
|
+
budget.step(current);
|
|
99
|
+
unique.add(id);
|
|
100
|
+
}
|
|
101
|
+
allocate(1 + unique.size);
|
|
102
|
+
return [...unique];
|
|
103
|
+
};
|
|
104
|
+
const empty = () => { allocate(8); return { nullable: true, hasRealization: true, elements: [], wildcard: ZERO_OCCURS, effectiveTotalRange: ZERO_OCCURS, schemaEmptiable: true }; };
|
|
105
|
+
const combine = (input, choice) => {
|
|
106
|
+
allocate(5);
|
|
107
|
+
const parts = [];
|
|
108
|
+
let effectiveTotalRange = ZERO_OCCURS;
|
|
109
|
+
for (let i = 0; i < input.length; i++) {
|
|
110
|
+
const part = input[i];
|
|
111
|
+
budget.step(current);
|
|
112
|
+
// Formal ETR includes all declared alternatives, even an empty choice.
|
|
113
|
+
effectiveTotalRange = choice ? i === 0 ? part.effectiveTotalRange : algebra.alternative(effectiveTotalRange, part.effectiveTotalRange) : algebra.sum(effectiveTotalRange, part.effectiveTotalRange);
|
|
114
|
+
if (!choice || part.hasRealization) {
|
|
115
|
+
allocate(1);
|
|
116
|
+
parts.push(part);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
const formal = { effectiveTotalRange, schemaEmptiable: effectiveTotalRange.min === "0" };
|
|
120
|
+
const elements = new Map();
|
|
121
|
+
let wildcard = ZERO_OCCURS, nullable = !choice;
|
|
122
|
+
const hasRealization = choice ? parts.length > 0 : parts.every(p => p.hasRealization);
|
|
123
|
+
if (!hasRealization) {
|
|
124
|
+
allocate(8);
|
|
125
|
+
return { ...formal, nullable: false, hasRealization: false, elements: [], wildcard: ZERO_OCCURS };
|
|
126
|
+
}
|
|
127
|
+
for (let i = 0; i < parts.length; i++) {
|
|
128
|
+
budget.step(current);
|
|
129
|
+
allocate(1);
|
|
130
|
+
const part = parts[i], present = new Set();
|
|
131
|
+
nullable = choice ? nullable || part.nullable : nullable && part.nullable;
|
|
132
|
+
wildcard = choice && i > 0 ? algebra.alternative(wildcard, part.wildcard) : choice ? part.wildcard : algebra.sum(wildcard, part.wildcard);
|
|
133
|
+
for (const p of part.elements) {
|
|
134
|
+
budget.step(current);
|
|
135
|
+
const k = key(p.name);
|
|
136
|
+
present.add(k);
|
|
137
|
+
const prior = elements.get(k);
|
|
138
|
+
const occurs = prior ? (choice ? algebra.alternative(prior.occurs, p.occurs) : algebra.sum(prior.occurs, p.occurs)) : choice && i > 0 ? algebra.alternative(ZERO_OCCURS, p.occurs) : p.occurs;
|
|
139
|
+
allocate(8);
|
|
140
|
+
elements.set(k, { name: p.name, occurs, declarations: copyIds(prior?.declarations ?? [], p.declarations), particles: copyIds(prior?.particles ?? [], p.particles) });
|
|
141
|
+
}
|
|
142
|
+
if (choice)
|
|
143
|
+
for (const [k, p] of elements) {
|
|
144
|
+
budget.step(current);
|
|
145
|
+
if (!present.has(k)) {
|
|
146
|
+
allocate(8);
|
|
147
|
+
elements.set(k, { ...p, occurs: algebra.alternative(p.occurs, ZERO_OCCURS) });
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
allocate(8 + elements.size);
|
|
152
|
+
return { ...formal, nullable, hasRealization, elements: [...elements.values()], wildcard };
|
|
153
|
+
};
|
|
154
|
+
const dependencies = (node) => {
|
|
155
|
+
if ("children" in node.term) {
|
|
156
|
+
allocate(1 + node.term.children.length);
|
|
157
|
+
const result = [];
|
|
158
|
+
for (const id of node.term.children) {
|
|
159
|
+
budget.step(node);
|
|
160
|
+
result.push(id);
|
|
161
|
+
}
|
|
162
|
+
return result;
|
|
163
|
+
}
|
|
164
|
+
if (node.term.kind === "group") {
|
|
165
|
+
const id = target(node.term.reference, node), group = id ? get(id) : undefined;
|
|
166
|
+
if (group?.kind !== "group")
|
|
167
|
+
throw new SemanticError("invalid-schema", "Group particle requires a model group", node.id, node.context.source);
|
|
168
|
+
allocate(2);
|
|
169
|
+
return [group.content];
|
|
170
|
+
}
|
|
171
|
+
if (node.term.kind === "element") {
|
|
172
|
+
const id = target(node.term.declaration, node);
|
|
173
|
+
if (!id || get(id).kind !== "element")
|
|
174
|
+
throw new SemanticError("invalid-schema", "Element particle requires an element declaration", node.id, node.context.source);
|
|
175
|
+
}
|
|
176
|
+
allocate(1);
|
|
177
|
+
return [];
|
|
178
|
+
};
|
|
179
|
+
const frame = (node) => { current = node; algebra.validate(node.occurs); allocate(4); return { node, children: dependencies(node), index: 0 }; };
|
|
180
|
+
for (const root of graph.nodes) {
|
|
181
|
+
if (root.kind !== "particle" || summaries.has(root.id))
|
|
182
|
+
continue;
|
|
183
|
+
allocate(3);
|
|
184
|
+
const stack = [frame(root)];
|
|
185
|
+
active.add(root.id);
|
|
186
|
+
while (stack.length) {
|
|
187
|
+
const f = stack[stack.length - 1];
|
|
188
|
+
current = f.node;
|
|
189
|
+
budget.step(current);
|
|
190
|
+
if (f.index < f.children.length) {
|
|
191
|
+
const id = f.children[f.index++], child = get(id);
|
|
192
|
+
if (child.kind !== "particle")
|
|
193
|
+
throw new SemanticError("invalid-schema", "Content requires a particle", id, child.context.source);
|
|
194
|
+
if (active.has(id))
|
|
195
|
+
throw new SemanticError("invalid-schema", "Forbidden particle expansion cycle", id, child.context.source);
|
|
196
|
+
if (!summaries.has(id)) {
|
|
197
|
+
allocate(2);
|
|
198
|
+
active.add(id);
|
|
199
|
+
stack.push(frame(child));
|
|
200
|
+
}
|
|
201
|
+
continue;
|
|
202
|
+
}
|
|
203
|
+
const node = f.node;
|
|
204
|
+
let content;
|
|
205
|
+
if (node.term.kind === "element") {
|
|
206
|
+
const id = target(node.term.declaration, node), declaration = get(id);
|
|
207
|
+
if (declaration.kind !== "element")
|
|
208
|
+
throw new Error("Checked element target changed");
|
|
209
|
+
allocate(20);
|
|
210
|
+
content = { nullable: false, hasRealization: true, elements: [{ name: declaration.name, occurs: ONE_OCCURS, declarations: [id], particles: [node.id] }], wildcard: ZERO_OCCURS, effectiveTotalRange: ONE_OCCURS, schemaEmptiable: false };
|
|
211
|
+
}
|
|
212
|
+
else if (node.term.kind === "any") {
|
|
213
|
+
let hasRealization = true;
|
|
214
|
+
if (wildcardRealization) {
|
|
215
|
+
allocate(2);
|
|
216
|
+
hasRealization = wildcardRealization.get(node.id) ?? true;
|
|
217
|
+
}
|
|
218
|
+
allocate(8);
|
|
219
|
+
content = { nullable: false, hasRealization, elements: [], wildcard: hasRealization ? ONE_OCCURS : ZERO_OCCURS,
|
|
220
|
+
effectiveTotalRange: ONE_OCCURS, schemaEmptiable: false };
|
|
221
|
+
}
|
|
222
|
+
else {
|
|
223
|
+
allocate(1 + f.children.length);
|
|
224
|
+
const parts = [];
|
|
225
|
+
for (const id of f.children) {
|
|
226
|
+
budget.step(node);
|
|
227
|
+
// XSD syntax with 0..0 maps to no particle. Traverse it above for
|
|
228
|
+
// diagnostics, but never create an epsilon *choice alternative*.
|
|
229
|
+
const child = get(id);
|
|
230
|
+
if (node.term.kind === "choice" && child.kind === "particle" && child.occurs.max === "0")
|
|
231
|
+
continue;
|
|
232
|
+
parts.push(summaries.get(id));
|
|
233
|
+
}
|
|
234
|
+
content = combine(parts, node.term.kind === "choice");
|
|
235
|
+
}
|
|
236
|
+
allocate(1 + content.elements.length * 6);
|
|
237
|
+
const elements = [];
|
|
238
|
+
for (const p of content.elements) {
|
|
239
|
+
budget.step(node);
|
|
240
|
+
elements.push({ ...p, occurs: algebra.product(p.occurs, node.occurs) });
|
|
241
|
+
}
|
|
242
|
+
const effectiveTotalRange = algebra.product(content.effectiveTotalRange, node.occurs);
|
|
243
|
+
allocate(12);
|
|
244
|
+
summaries.set(node.id, { id: node.id, nullable: node.occurs.min === "0" || content.nullable, hasRealization: node.occurs.min === "0" || content.hasRealization, elements, wildcard: algebra.product(content.wildcard, node.occurs), effectiveTotalRange, schemaEmptiable: effectiveTotalRange.min === "0" });
|
|
245
|
+
active.delete(node.id);
|
|
246
|
+
stack.pop();
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
allocate(1 + composed.types.length * 5);
|
|
250
|
+
const types = [];
|
|
251
|
+
for (const type of composed.types) {
|
|
252
|
+
current = get(type.id);
|
|
253
|
+
budget.step(current);
|
|
254
|
+
allocate(1 + type.content.length);
|
|
255
|
+
const parts = [];
|
|
256
|
+
let opaque = false;
|
|
257
|
+
for (const contribution of type.content) {
|
|
258
|
+
budget.step(current);
|
|
259
|
+
if (contribution.kind === "builtin") {
|
|
260
|
+
opaque = true;
|
|
261
|
+
continue;
|
|
262
|
+
}
|
|
263
|
+
const summary = summaries.get(contribution.particle);
|
|
264
|
+
if (!summary)
|
|
265
|
+
throw new SemanticError("invalid-schema", "Missing composed particle", type.id, current.context.source);
|
|
266
|
+
parts.push(summary);
|
|
267
|
+
}
|
|
268
|
+
types.push({ id: type.id, children: parts.length ? combine(parts, false) : empty(), scope: opaque ? "declared-particles-with-opaque-builtin" : "declared-particles" });
|
|
269
|
+
}
|
|
270
|
+
allocate(12 + summaries.size);
|
|
271
|
+
const result = { kind: "analyzed", analysis: { composed, particles: [...summaries.values()], types, assessment: "requires-schema-assessment", metrics: { steps: budget.steps } } };
|
|
272
|
+
if (!request)
|
|
273
|
+
return deepFreeze(result);
|
|
274
|
+
// Freeze new owned output only; the immutable composed input is borrowed.
|
|
275
|
+
request.chargeWork(3);
|
|
276
|
+
const stack = [result], seen = new Set();
|
|
277
|
+
while (stack.length) {
|
|
278
|
+
request.chargeWork(3);
|
|
279
|
+
const item = stack.pop();
|
|
280
|
+
if (!item || typeof item !== 'object' || item === composed || Object.isFrozen(item) || seen.has(item))
|
|
281
|
+
continue;
|
|
282
|
+
request.chargeWork(2);
|
|
283
|
+
seen.add(item);
|
|
284
|
+
for (const name in item) {
|
|
285
|
+
request.chargeWork(2 + name.length);
|
|
286
|
+
if (Object.hasOwn(item, name))
|
|
287
|
+
stack.push(item[name]);
|
|
288
|
+
}
|
|
289
|
+
Object.freeze(item);
|
|
290
|
+
}
|
|
291
|
+
return result;
|
|
292
|
+
}
|
|
293
|
+
catch (error) {
|
|
294
|
+
if (error instanceof SemanticError) {
|
|
295
|
+
allocate(10 + error.message.length);
|
|
296
|
+
return Object.freeze({ kind: "failure", diagnostic: error.component || !current ? error : new SemanticError(error.category, error.message, current.id, current.context.source, error.related) });
|
|
297
|
+
}
|
|
298
|
+
throw error;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Original source projections suppressed by XSD mapping, not candidate validity. */
|
|
2
|
+
import type { GraphNode, NodeId } from './canonicalGraph.js';
|
|
3
|
+
import type { SemanticBudget } from './semanticBudget.js';
|
|
4
|
+
/** Called on the private immutable original graph inside the request guard. */
|
|
5
|
+
export declare function computeOriginalSourceAbsence(input: readonly GraphNode[], budget: SemanticBudget): ReadonlySet<NodeId>;
|
|
6
|
+
//# sourceMappingURL=originalSourceMembership.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"originalSourceMembership.d.ts","sourceRoot":"","sources":["../../src/compiler/originalSourceMembership.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,OAAO,KAAK,EAAC,SAAS,EAAE,MAAM,EAAC,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AAExD,+EAA+E;AAC/E,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,SAAS,SAAS,EAAE,EAAE,MAAM,EAAE,cAAc,GAAG,WAAW,CAAC,MAAM,CAAC,CAqBrH"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** Called on the private immutable original graph inside the request guard. */
|
|
2
|
+
export function computeOriginalSourceAbsence(input, budget) {
|
|
3
|
+
budget.chargeWork(3);
|
|
4
|
+
const roots = [], nodes = [], result = new Set();
|
|
5
|
+
for (const original of input) {
|
|
6
|
+
budget.chargeWork();
|
|
7
|
+
if (original.identity.kind === 'global')
|
|
8
|
+
continue;
|
|
9
|
+
budget.chargeWork();
|
|
10
|
+
nodes.push(original);
|
|
11
|
+
if (original.kind === 'attributeUse' && original.use === 'prohibited' ||
|
|
12
|
+
original.kind === 'particle' && original.occurs.min === '0' && original.occurs.max === '0') {
|
|
13
|
+
budget.chargeWork();
|
|
14
|
+
roots.push(original);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
for (const node of nodes)
|
|
18
|
+
for (const root of roots) {
|
|
19
|
+
const a = node.context, z = root.context, p = a.source.path, q = z.source.path;
|
|
20
|
+
budget.chargeWork(10 + p.length + q.length + a.source.uri.length + z.source.uri.length + a.source.digest.length + z.source.digest.length
|
|
21
|
+
+ a.effectiveNamespace.length + z.effectiveNamespace.length + a.baseUri.length + z.baseUri.length);
|
|
22
|
+
if (a.source.uri === z.source.uri && a.source.digest === z.source.digest && a.effectiveNamespace === z.effectiveNamespace &&
|
|
23
|
+
a.baseUri === z.baseUri && a.chameleon === z.chameleon &&
|
|
24
|
+
(p === q || p.startsWith(q + '/'))) {
|
|
25
|
+
budget.chargeWork();
|
|
26
|
+
result.add(node.id);
|
|
27
|
+
break;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return result;
|
|
31
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { SemanticContext } from './semanticContext.js';
|
|
2
|
+
import type { SemanticParticleView } from './particleSemanticView.js';
|
|
3
|
+
import type { RelationFailure } from './schemaTypeRelations.js';
|
|
4
|
+
import type { ResourceLimitFailure } from './semanticBudget.js';
|
|
5
|
+
import type { SemanticTypeDependency } from './semanticTypeReference.js';
|
|
6
|
+
export type AttributionResult = Readonly<{
|
|
7
|
+
kind: 'checked';
|
|
8
|
+
value: boolean;
|
|
9
|
+
rule: 'cos-nonambig';
|
|
10
|
+
contextId: string;
|
|
11
|
+
component?: string;
|
|
12
|
+
obligations: readonly ['component-validity'];
|
|
13
|
+
typeDependencies: readonly SemanticTypeDependency[];
|
|
14
|
+
}> | RelationFailure | ResourceLimitFailure;
|
|
15
|
+
/** Counted iteration preserves each leaf incidence tag; shared child edges remain distinct. */
|
|
16
|
+
export declare function checkParticleAttribution(context: SemanticContext, view: SemanticParticleView): AttributionResult;
|
|
17
|
+
//# sourceMappingURL=particleAttribution.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"particleAttribution.d.ts","sourceRoot":"","sources":["../../src/compiler/particleAttribution.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,sBAAsB,CAAC;AAE1D,OAAO,KAAK,EAAmB,oBAAoB,EAAC,MAAM,2BAA2B,CAAC;AAEtF,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,0BAA0B,CAAC;AAG9D,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,qBAAqB,CAAC;AAI9D,OAAO,KAAK,EAAC,sBAAsB,EAAC,MAAM,4BAA4B,CAAC;AAEvE,MAAM,MAAM,iBAAiB,GAAG,QAAQ,CAAC;IAAC,IAAI,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,cAAc,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IACjH,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,SAAS,CAAC,oBAAoB,CAAC,CAAC;IAAC,gBAAgB,EAAE,SAAS,sBAAsB,EAAE,CAAA;CAAC,CAAC,GAAG,eAAe,GAAG,oBAAoB,CAAC;AAGnK,+FAA+F;AAC/F,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,oBAAoB,GAAG,iBAAiB,CAyRhH"}
|