@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.
Files changed (355) hide show
  1. package/README.md +49 -1
  2. package/dist/app/generateApp.d.ts.map +1 -1
  3. package/dist/app/generateApp.js +8 -6
  4. package/dist/cli.js +49 -5
  5. package/dist/client/checkedDirectRuntime.d.ts +59 -0
  6. package/dist/client/checkedDirectRuntime.d.ts.map +1 -0
  7. package/dist/client/checkedDirectRuntime.js +23 -0
  8. package/dist/client/directClientRuntime.d.ts +49 -0
  9. package/dist/client/directClientRuntime.d.ts.map +1 -0
  10. package/dist/client/directClientRuntime.js +112 -0
  11. package/dist/client/directClientVersion.d.ts +4 -0
  12. package/dist/client/directClientVersion.d.ts.map +1 -0
  13. package/dist/client/directClientVersion.js +3 -0
  14. package/dist/client/generateDirectClient.d.ts +14 -0
  15. package/dist/client/generateDirectClient.d.ts.map +1 -0
  16. package/dist/client/generateDirectClient.js +136 -0
  17. package/dist/compiler/buildCanonicalGraph.d.ts +7 -0
  18. package/dist/compiler/buildCanonicalGraph.d.ts.map +1 -0
  19. package/dist/compiler/buildCanonicalGraph.js +381 -0
  20. package/dist/compiler/canonicalGraph.d.ts +198 -0
  21. package/dist/compiler/canonicalGraph.d.ts.map +1 -0
  22. package/dist/compiler/canonicalGraph.js +37 -0
  23. package/dist/compiler/catalogErrors.d.ts +18 -0
  24. package/dist/compiler/catalogErrors.d.ts.map +1 -0
  25. package/dist/compiler/catalogErrors.js +86 -0
  26. package/dist/compiler/catalogProvenance.d.ts +15 -0
  27. package/dist/compiler/catalogProvenance.d.ts.map +1 -0
  28. package/dist/compiler/catalogProvenance.js +229 -0
  29. package/dist/compiler/checkedAssessment.d.ts +91 -0
  30. package/dist/compiler/checkedAssessment.d.ts.map +1 -0
  31. package/dist/compiler/checkedAssessment.js +300 -0
  32. package/dist/compiler/checkedSourcePreparation.d.ts +35 -0
  33. package/dist/compiler/checkedSourcePreparation.d.ts.map +1 -0
  34. package/dist/compiler/checkedSourcePreparation.js +131 -0
  35. package/dist/compiler/complexTypeContent.d.ts +59 -0
  36. package/dist/compiler/complexTypeContent.d.ts.map +1 -0
  37. package/dist/compiler/complexTypeContent.js +558 -0
  38. package/dist/compiler/composeCanonicalGraph.d.ts +69 -0
  39. package/dist/compiler/composeCanonicalGraph.d.ts.map +1 -0
  40. package/dist/compiler/composeCanonicalGraph.js +252 -0
  41. package/dist/compiler/dataOwnership.d.ts +22 -0
  42. package/dist/compiler/dataOwnership.d.ts.map +1 -0
  43. package/dist/compiler/dataOwnership.js +157 -0
  44. package/dist/compiler/datatypeValues.d.ts +47 -0
  45. package/dist/compiler/datatypeValues.d.ts.map +1 -0
  46. package/dist/compiler/datatypeValues.js +275 -0
  47. package/dist/compiler/directCodec.d.ts +59 -0
  48. package/dist/compiler/directCodec.d.ts.map +1 -0
  49. package/dist/compiler/directCodec.js +192 -0
  50. package/dist/compiler/directExecutionPolicy.d.ts +10 -0
  51. package/dist/compiler/directExecutionPolicy.d.ts.map +1 -0
  52. package/dist/compiler/directExecutionPolicy.js +17 -0
  53. package/dist/compiler/directOperation.d.ts +72 -0
  54. package/dist/compiler/directOperation.d.ts.map +1 -0
  55. package/dist/compiler/directOperation.js +282 -0
  56. package/dist/compiler/directSoap.d.ts +42 -0
  57. package/dist/compiler/directSoap.d.ts.map +1 -0
  58. package/dist/compiler/directSoap.js +298 -0
  59. package/dist/compiler/directSoapSource.d.ts +15 -0
  60. package/dist/compiler/directSoapSource.d.ts.map +1 -0
  61. package/dist/compiler/directSoapSource.js +86 -0
  62. package/dist/compiler/directSourceCapsule.d.ts +97 -0
  63. package/dist/compiler/directSourceCapsule.d.ts.map +1 -0
  64. package/dist/compiler/directSourceCapsule.js +305 -0
  65. package/dist/compiler/directStructure.d.ts +51 -0
  66. package/dist/compiler/directStructure.d.ts.map +1 -0
  67. package/dist/compiler/directStructure.js +252 -0
  68. package/dist/compiler/directStructurePlan.d.ts +16 -0
  69. package/dist/compiler/directStructurePlan.d.ts.map +1 -0
  70. package/dist/compiler/directStructurePlan.js +58 -0
  71. package/dist/compiler/directValues.d.ts +69 -0
  72. package/dist/compiler/directValues.d.ts.map +1 -0
  73. package/dist/compiler/directValues.js +282 -0
  74. package/dist/compiler/finiteRe01Verification.d.ts +140 -0
  75. package/dist/compiler/finiteRe01Verification.d.ts.map +1 -0
  76. package/dist/compiler/finiteRe01Verification.js +830 -0
  77. package/dist/compiler/graphTraversal.d.ts +11 -0
  78. package/dist/compiler/graphTraversal.d.ts.map +1 -0
  79. package/dist/compiler/graphTraversal.js +37 -0
  80. package/dist/compiler/hypotheticalScopedIdentity.d.ts +23 -0
  81. package/dist/compiler/hypotheticalScopedIdentity.d.ts.map +1 -0
  82. package/dist/compiler/hypotheticalScopedIdentity.js +81 -0
  83. package/dist/compiler/occurrenceAnalysis.d.ts +65 -0
  84. package/dist/compiler/occurrenceAnalysis.d.ts.map +1 -0
  85. package/dist/compiler/occurrenceAnalysis.js +300 -0
  86. package/dist/compiler/originalSourceMembership.d.ts +6 -0
  87. package/dist/compiler/originalSourceMembership.d.ts.map +1 -0
  88. package/dist/compiler/originalSourceMembership.js +31 -0
  89. package/dist/compiler/particleAttribution.d.ts +17 -0
  90. package/dist/compiler/particleAttribution.d.ts.map +1 -0
  91. package/dist/compiler/particleAttribution.js +474 -0
  92. package/dist/compiler/particleDeclarationConsistency.d.ts +24 -0
  93. package/dist/compiler/particleDeclarationConsistency.d.ts.map +1 -0
  94. package/dist/compiler/particleDeclarationConsistency.js +197 -0
  95. package/dist/compiler/particleExtension.d.ts +22 -0
  96. package/dist/compiler/particleExtension.d.ts.map +1 -0
  97. package/dist/compiler/particleExtension.js +119 -0
  98. package/dist/compiler/particleLocalAssessment.d.ts +20 -0
  99. package/dist/compiler/particleLocalAssessment.d.ts.map +1 -0
  100. package/dist/compiler/particleLocalAssessment.js +92 -0
  101. package/dist/compiler/particleRestriction.d.ts +24 -0
  102. package/dist/compiler/particleRestriction.d.ts.map +1 -0
  103. package/dist/compiler/particleRestriction.js +489 -0
  104. package/dist/compiler/particleSemanticView.d.ts +50 -0
  105. package/dist/compiler/particleSemanticView.d.ts.map +1 -0
  106. package/dist/compiler/particleSemanticView.js +297 -0
  107. package/dist/compiler/particleWildcardRelation.d.ts +88 -0
  108. package/dist/compiler/particleWildcardRelation.d.ts.map +1 -0
  109. package/dist/compiler/particleWildcardRelation.js +143 -0
  110. package/dist/compiler/re01CandidateCorrespondence.d.ts +64 -0
  111. package/dist/compiler/re01CandidateCorrespondence.d.ts.map +1 -0
  112. package/dist/compiler/re01CandidateCorrespondence.js +572 -0
  113. package/dist/compiler/re01TypeProperties.d.ts +71 -0
  114. package/dist/compiler/re01TypeProperties.d.ts.map +1 -0
  115. package/dist/compiler/re01TypeProperties.js +120 -0
  116. package/dist/compiler/re01TypePropertyValidation.d.ts +23 -0
  117. package/dist/compiler/re01TypePropertyValidation.d.ts.map +1 -0
  118. package/dist/compiler/re01TypePropertyValidation.js +161 -0
  119. package/dist/compiler/resolveCanonicalGraph.d.ts +38 -0
  120. package/dist/compiler/resolveCanonicalGraph.d.ts.map +1 -0
  121. package/dist/compiler/resolveCanonicalGraph.js +170 -0
  122. package/dist/compiler/scalarSchemaAssessment.d.ts +425 -0
  123. package/dist/compiler/scalarSchemaAssessment.d.ts.map +1 -0
  124. package/dist/compiler/scalarSchemaAssessment.js +5198 -0
  125. package/dist/compiler/schemaAttributeGroupProperties.d.ts +17 -0
  126. package/dist/compiler/schemaAttributeGroupProperties.d.ts.map +1 -0
  127. package/dist/compiler/schemaAttributeGroupProperties.js +53 -0
  128. package/dist/compiler/schemaAttributeProperties.d.ts +10 -0
  129. package/dist/compiler/schemaAttributeProperties.d.ts.map +1 -0
  130. package/dist/compiler/schemaAttributeProperties.js +11 -0
  131. package/dist/compiler/schemaAttributeUses.d.ts +90 -0
  132. package/dist/compiler/schemaAttributeUses.d.ts.map +1 -0
  133. package/dist/compiler/schemaAttributeUses.js +725 -0
  134. package/dist/compiler/schemaBinaryWordReconstruction.d.ts +10 -0
  135. package/dist/compiler/schemaBinaryWordReconstruction.d.ts.map +1 -0
  136. package/dist/compiler/schemaBinaryWordReconstruction.js +33 -0
  137. package/dist/compiler/schemaBuiltinFacets.d.ts +14 -0
  138. package/dist/compiler/schemaBuiltinFacets.d.ts.map +1 -0
  139. package/dist/compiler/schemaBuiltinFacets.js +51 -0
  140. package/dist/compiler/schemaCalendarImages.d.ts +8 -0
  141. package/dist/compiler/schemaCalendarImages.d.ts.map +1 -0
  142. package/dist/compiler/schemaCalendarImages.js +204 -0
  143. package/dist/compiler/schemaCalendarLanguage.d.ts +11 -0
  144. package/dist/compiler/schemaCalendarLanguage.d.ts.map +1 -0
  145. package/dist/compiler/schemaCalendarLanguage.js +227 -0
  146. package/dist/compiler/schemaComponentEquality.d.ts +28 -0
  147. package/dist/compiler/schemaComponentEquality.d.ts.map +1 -0
  148. package/dist/compiler/schemaComponentEquality.js +446 -0
  149. package/dist/compiler/schemaConstructionAssessment.d.ts +46 -0
  150. package/dist/compiler/schemaConstructionAssessment.d.ts.map +1 -0
  151. package/dist/compiler/schemaConstructionAssessment.js +663 -0
  152. package/dist/compiler/schemaDatatypeValues.d.ts +4 -0
  153. package/dist/compiler/schemaDatatypeValues.d.ts.map +1 -0
  154. package/dist/compiler/schemaDatatypeValues.js +2 -0
  155. package/dist/compiler/schemaDecimalLanguage.d.ts +7 -0
  156. package/dist/compiler/schemaDecimalLanguage.d.ts.map +1 -0
  157. package/dist/compiler/schemaDecimalLanguage.js +102 -0
  158. package/dist/compiler/schemaDeclarationPrimitives.d.ts +34 -0
  159. package/dist/compiler/schemaDeclarationPrimitives.d.ts.map +1 -0
  160. package/dist/compiler/schemaDeclarationPrimitives.js +194 -0
  161. package/dist/compiler/schemaDocumentSyntax.d.ts +55 -0
  162. package/dist/compiler/schemaDocumentSyntax.d.ts.map +1 -0
  163. package/dist/compiler/schemaDocumentSyntax.js +294 -0
  164. package/dist/compiler/schemaDurationLanguage.d.ts +11 -0
  165. package/dist/compiler/schemaDurationLanguage.d.ts.map +1 -0
  166. package/dist/compiler/schemaDurationLanguage.js +170 -0
  167. package/dist/compiler/schemaElementProperties.d.ts +16 -0
  168. package/dist/compiler/schemaElementProperties.d.ts.map +1 -0
  169. package/dist/compiler/schemaElementProperties.js +23 -0
  170. package/dist/compiler/schemaEndpointWordCapacity.d.ts +36 -0
  171. package/dist/compiler/schemaEndpointWordCapacity.d.ts.map +1 -0
  172. package/dist/compiler/schemaEndpointWordCapacity.js +39 -0
  173. package/dist/compiler/schemaExactCalendar.d.ts +73 -0
  174. package/dist/compiler/schemaExactCalendar.d.ts.map +1 -0
  175. package/dist/compiler/schemaExactCalendar.js +264 -0
  176. package/dist/compiler/schemaFacetAnnotation.d.ts +32 -0
  177. package/dist/compiler/schemaFacetAnnotation.d.ts.map +1 -0
  178. package/dist/compiler/schemaFacetAnnotation.js +199 -0
  179. package/dist/compiler/schemaGeneratedScalarShape.d.ts +35 -0
  180. package/dist/compiler/schemaGeneratedScalarShape.d.ts.map +1 -0
  181. package/dist/compiler/schemaGeneratedScalarShape.js +176 -0
  182. package/dist/compiler/schemaIdentityConstraints.d.ts +73 -0
  183. package/dist/compiler/schemaIdentityConstraints.d.ts.map +1 -0
  184. package/dist/compiler/schemaIdentityConstraints.js +362 -0
  185. package/dist/compiler/schemaIeeeLanguage.d.ts +43 -0
  186. package/dist/compiler/schemaIeeeLanguage.d.ts.map +1 -0
  187. package/dist/compiler/schemaIeeeLanguage.js +759 -0
  188. package/dist/compiler/schemaIntegerImages.d.ts +11 -0
  189. package/dist/compiler/schemaIntegerImages.d.ts.map +1 -0
  190. package/dist/compiler/schemaIntegerImages.js +113 -0
  191. package/dist/compiler/schemaLexicalPredicates.d.ts +29 -0
  192. package/dist/compiler/schemaLexicalPredicates.d.ts.map +1 -0
  193. package/dist/compiler/schemaLexicalPredicates.js +63 -0
  194. package/dist/compiler/schemaNotationProperties.d.ts +32 -0
  195. package/dist/compiler/schemaNotationProperties.d.ts.map +1 -0
  196. package/dist/compiler/schemaNotationProperties.js +84 -0
  197. package/dist/compiler/schemaNumericImageConditions.d.ts +24 -0
  198. package/dist/compiler/schemaNumericImageConditions.d.ts.map +1 -0
  199. package/dist/compiler/schemaNumericImageConditions.js +66 -0
  200. package/dist/compiler/schemaParticleWildcardProperties.d.ts +20 -0
  201. package/dist/compiler/schemaParticleWildcardProperties.d.ts.map +1 -0
  202. package/dist/compiler/schemaParticleWildcardProperties.js +43 -0
  203. package/dist/compiler/schemaPattern.d.ts +1062 -0
  204. package/dist/compiler/schemaPattern.d.ts.map +1 -0
  205. package/dist/compiler/schemaPattern.js +581 -0
  206. package/dist/compiler/schemaRegularLanguage.d.ts +67 -0
  207. package/dist/compiler/schemaRegularLanguage.d.ts.map +1 -0
  208. package/dist/compiler/schemaRegularLanguage.js +1166 -0
  209. package/dist/compiler/schemaScalarContext.d.ts +81 -0
  210. package/dist/compiler/schemaScalarContext.d.ts.map +1 -0
  211. package/dist/compiler/schemaScalarContext.js +78 -0
  212. package/dist/compiler/schemaScalarKernel.d.ts +182 -0
  213. package/dist/compiler/schemaScalarKernel.d.ts.map +1 -0
  214. package/dist/compiler/schemaScalarKernel.js +391 -0
  215. package/dist/compiler/schemaScalarWitnesses.d.ts +6 -0
  216. package/dist/compiler/schemaScalarWitnesses.d.ts.map +1 -0
  217. package/dist/compiler/schemaScalarWitnesses.js +118 -0
  218. package/dist/compiler/schemaSimpleTypeProperties.d.ts +95 -0
  219. package/dist/compiler/schemaSimpleTypeProperties.d.ts.map +1 -0
  220. package/dist/compiler/schemaSimpleTypeProperties.js +103 -0
  221. package/dist/compiler/schemaSourceGrammar.d.ts +27 -0
  222. package/dist/compiler/schemaSourceGrammar.d.ts.map +1 -0
  223. package/dist/compiler/schemaSourceGrammar.js +290 -0
  224. package/dist/compiler/schemaSourceLexical.d.ts +4 -0
  225. package/dist/compiler/schemaSourceLexical.d.ts.map +1 -0
  226. package/dist/compiler/schemaSourceLexical.js +12 -0
  227. package/dist/compiler/schemaSourceValues.d.ts +51 -0
  228. package/dist/compiler/schemaSourceValues.d.ts.map +1 -0
  229. package/dist/compiler/schemaSourceValues.js +225 -0
  230. package/dist/compiler/schemaSourceWildcards.d.ts +28 -0
  231. package/dist/compiler/schemaSourceWildcards.d.ts.map +1 -0
  232. package/dist/compiler/schemaSourceWildcards.js +247 -0
  233. package/dist/compiler/schemaSymbolicSequences.d.ts +16 -0
  234. package/dist/compiler/schemaSymbolicSequences.d.ts.map +1 -0
  235. package/dist/compiler/schemaSymbolicSequences.js +99 -0
  236. package/dist/compiler/schemaSymbolicValueSets.d.ts +32 -0
  237. package/dist/compiler/schemaSymbolicValueSets.d.ts.map +1 -0
  238. package/dist/compiler/schemaSymbolicValueSets.js +149 -0
  239. package/dist/compiler/schemaSyntaxAssessment.d.ts +25 -0
  240. package/dist/compiler/schemaSyntaxAssessment.d.ts.map +1 -0
  241. package/dist/compiler/schemaSyntaxAssessment.js +361 -0
  242. package/dist/compiler/schemaTemporalAliases.d.ts +6 -0
  243. package/dist/compiler/schemaTemporalAliases.d.ts.map +1 -0
  244. package/dist/compiler/schemaTemporalAliases.js +195 -0
  245. package/dist/compiler/schemaTokenImages.d.ts +9 -0
  246. package/dist/compiler/schemaTokenImages.d.ts.map +1 -0
  247. package/dist/compiler/schemaTokenImages.js +142 -0
  248. package/dist/compiler/schemaTypeIdentity.d.ts +39 -0
  249. package/dist/compiler/schemaTypeIdentity.d.ts.map +1 -0
  250. package/dist/compiler/schemaTypeIdentity.js +78 -0
  251. package/dist/compiler/schemaTypeRelations.d.ts +38 -0
  252. package/dist/compiler/schemaTypeRelations.d.ts.map +1 -0
  253. package/dist/compiler/schemaTypeRelations.js +576 -0
  254. package/dist/compiler/schemaUri.d.ts +13 -0
  255. package/dist/compiler/schemaUri.d.ts.map +1 -0
  256. package/dist/compiler/schemaUri.js +103 -0
  257. package/dist/compiler/schemaValueContext.d.ts +26 -0
  258. package/dist/compiler/schemaValueContext.d.ts.map +1 -0
  259. package/dist/compiler/schemaValueContext.js +1 -0
  260. package/dist/compiler/schemaValueImages.d.ts +10 -0
  261. package/dist/compiler/schemaValueImages.d.ts.map +1 -0
  262. package/dist/compiler/schemaValueImages.js +142 -0
  263. package/dist/compiler/schemaValueSequences.d.ts +15 -0
  264. package/dist/compiler/schemaValueSequences.d.ts.map +1 -0
  265. package/dist/compiler/schemaValueSequences.js +19 -0
  266. package/dist/compiler/semanticBudget.d.ts +50 -0
  267. package/dist/compiler/semanticBudget.d.ts.map +1 -0
  268. package/dist/compiler/semanticBudget.js +178 -0
  269. package/dist/compiler/semanticCatalog.d.ts +122 -0
  270. package/dist/compiler/semanticCatalog.d.ts.map +1 -0
  271. package/dist/compiler/semanticCatalog.js +160 -0
  272. package/dist/compiler/semanticContext.d.ts +172 -0
  273. package/dist/compiler/semanticContext.d.ts.map +1 -0
  274. package/dist/compiler/semanticContext.js +1168 -0
  275. package/dist/compiler/semanticTypeDependencies.d.ts +8 -0
  276. package/dist/compiler/semanticTypeDependencies.d.ts.map +1 -0
  277. package/dist/compiler/semanticTypeDependencies.js +64 -0
  278. package/dist/compiler/semanticTypeReference.d.ts +24 -0
  279. package/dist/compiler/semanticTypeReference.d.ts.map +1 -0
  280. package/dist/compiler/semanticTypeReference.js +36 -0
  281. package/dist/compiler/shapeResolver.d.ts +1 -0
  282. package/dist/compiler/shapeResolver.d.ts.map +1 -1
  283. package/dist/compiler/shapeResolver.js +7 -9
  284. package/dist/compiler/sourceSchemaBinding.d.ts +26 -0
  285. package/dist/compiler/sourceSchemaBinding.d.ts.map +1 -0
  286. package/dist/compiler/sourceSchemaBinding.js +39 -0
  287. package/dist/compiler/structuralCompanions.d.ts +16 -0
  288. package/dist/compiler/structuralCompanions.d.ts.map +1 -0
  289. package/dist/compiler/structuralCompanions.js +232 -0
  290. package/dist/compiler/validateSemanticGraph.d.ts +5 -0
  291. package/dist/compiler/validateSemanticGraph.d.ts.map +1 -0
  292. package/dist/compiler/validateSemanticGraph.js +376 -0
  293. package/dist/compiler/wildcardAlgebra.d.ts +26 -0
  294. package/dist/compiler/wildcardAlgebra.d.ts.map +1 -0
  295. package/dist/compiler/wildcardAlgebra.js +155 -0
  296. package/dist/gateway/generateGateway.d.ts.map +1 -1
  297. package/dist/gateway/generateGateway.js +2 -2
  298. package/dist/index.d.ts +3 -0
  299. package/dist/index.d.ts.map +1 -1
  300. package/dist/index.js +2 -0
  301. package/dist/loader/orderedSyntax.d.ts +77 -0
  302. package/dist/loader/orderedSyntax.d.ts.map +1 -0
  303. package/dist/loader/orderedSyntax.js +202 -0
  304. package/dist/loader/resolutionDepth.d.ts +7 -0
  305. package/dist/loader/resolutionDepth.d.ts.map +1 -0
  306. package/dist/loader/resolutionDepth.js +65 -0
  307. package/dist/loader/schemaInput.d.ts +53 -0
  308. package/dist/loader/schemaInput.d.ts.map +1 -0
  309. package/dist/loader/schemaInput.js +212 -0
  310. package/dist/loader/schemaResources.d.ts +59 -0
  311. package/dist/loader/schemaResources.d.ts.map +1 -0
  312. package/dist/loader/schemaResources.js +292 -0
  313. package/dist/openapi/generateOpenAPI.d.ts.map +1 -1
  314. package/dist/openapi/generateOpenAPI.js +2 -2
  315. package/dist/test/generateTests.d.ts.map +1 -1
  316. package/dist/test/generateTests.js +2 -2
  317. package/dist/util/xmlWhitespace.d.ts +3 -0
  318. package/dist/util/xmlWhitespace.d.ts.map +1 -0
  319. package/dist/util/xmlWhitespace.js +4 -0
  320. package/docs/README.md +14 -1
  321. package/docs/architecture.md +9 -0
  322. package/docs/cli-reference.md +21 -1
  323. package/docs/content-model-analysis.md +92 -0
  324. package/docs/content-model-baseline.md +121 -0
  325. package/docs/content-model-catalog.md +116 -0
  326. package/docs/content-model-companions.md +90 -0
  327. package/docs/content-model-composition.md +103 -0
  328. package/docs/content-model-decisions.md +79 -0
  329. package/docs/content-model-gateway-feasibility.md +169 -0
  330. package/docs/content-model-graph.md +121 -0
  331. package/docs/content-model-loading.md +163 -0
  332. package/docs/content-model-matching.md +85 -0
  333. package/docs/content-model-readiness.md +144 -0
  334. package/docs/content-model-resolution.md +81 -0
  335. package/docs/content-model-s02-handoff.md +98 -0
  336. package/docs/content-model-s06-au-01.md +425 -0
  337. package/docs/content-model-s06-dt-01.md +386 -0
  338. package/docs/content-model-s06-pw-01.md +350 -0
  339. package/docs/content-model-s06-re-01-resolver-implementation.md +869 -0
  340. package/docs/content-model-s06-re-01-resolver.md +513 -0
  341. package/docs/content-model-s06-re-01-scalar-witnesses.md +1423 -0
  342. package/docs/content-model-s06-re-01-support-reconstruction.md +6337 -0
  343. package/docs/content-model-s06-re-01.md +7477 -0
  344. package/docs/content-model-s06-research-handoff.md +909 -0
  345. package/docs/content-model-shipped-fix.md +83 -0
  346. package/docs/content-model-soap-feasibility.md +165 -0
  347. package/docs/decisions/002-streamable-responses.md +2 -0
  348. package/docs/decisions/003-content-model-contracts.md +280 -0
  349. package/docs/direct-values.md +311 -0
  350. package/docs/reference-validation.md +243 -0
  351. package/docs/releases/v1.1.5.md +38 -0
  352. package/docs/roadmap/README.md +2 -2
  353. package/docs/supported-patterns.md +13 -5
  354. package/package.json +26 -13
  355. package/src/generation/preambles/direct-client/typescript.preamble +3 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemaPattern.d.ts","sourceRoot":"","sources":["../../src/compiler/schemaPattern.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,OAAO,KAAK,EAAuB,oBAAoB,EAAC,MAAM,yBAAyB,CAAC;AAIxF,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC;IAAC,IAAI,EAAE,WAAW,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAC,GACxE;IAAC,IAAI,EAAE,UAAU,CAAC;IAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAA;CAAC,GAAG;IAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAA;CAAC,GAC/F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,EAAE,CAAC,EAAE,oBAAoB,CAAC,KAAK,CAAC;;;;;;;;;;;;;;;;;;;;;;kBAZlE,oBAAoB;eAAS,SAAS,WAAW,EAAE;cAAQ,MAAM;iBAClE,aAAa;sBAAgB,MAAM;;;kBADlC,oBAAoB;eAAS,SAAS,WAAW,EAAE;cAAQ,MAAM;iBAClE,aAAa;sBAAgB,MAAM;eA+TW,MAAM,mBAAiB,OAAO;;kBAhU3E,oBAAoB;eAAS,SAAS,WAAW,EAAE;cAAQ,MAAM;iBAClE,aAAa;sBAAgB,MAAM;;cA6JnC,gBAAgB;eAAS,SAAS,CAAC,MAAM,CAAC;;cAAW,kBAAkB;;;kBA9JtE,oBAAoB;eAAS,SAAS,WAAW,EAAE;cAAQ,MAAM;iBAClE,aAAa;sBAAgB,MAAM;6BA8NyB,MAAM,KAAG,SAAS,CAAC,MAAM,CAAC;;kBA/NrF,oBAAoB;eAAS,SAAS,WAAW,EAAE;cAAQ,MAAM;iBAClE,aAAa;sBAAgB,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAW+E"}
@@ -0,0 +1,581 @@
1
+ import { XML_NAME_RANGES } from '../loader/orderedSyntax.js';
2
+ import { schemaRegularLanguages } from './schemaRegularLanguage.js';
3
+ export function schemaPatterns(c) { return createSchemaPatterns(c, false); }
4
+ /** Closed assessment-schema consumer; this does not widen the application profile. */
5
+ export function fixedS4SPatterns(c) { return createSchemaPatterns(c, true); }
6
+ /** Private original builtin facet-component consumer; caller patterns keep their profile. */
7
+ export function intrinsicBuiltinPatterns(c) { return createSchemaPatterns(c, true, true); }
8
+ function createSchemaPatterns(c, fixedSchemaNames, intrinsicNames = false) {
9
+ // Separate privately captured records: mutating an exposed plan cannot
10
+ // manufacture literal-language authority or alter these compiled facts.
11
+ const literalPrograms = new WeakMap();
12
+ const regular = schemaRegularLanguages(c), regularPrograms = new WeakMap();
13
+ const compile = (lexical, owner) => {
14
+ c.text(lexical.value, owner);
15
+ const source = lexical.value, atoms = [], literals = [];
16
+ const add = (atom, literal, explicitClass = false) => {
17
+ c.step(owner, 3 + (atom.kind === 'sequence' || atom.kind === 'choice' ? atom.children.length : 0));
18
+ atoms.push(atom);
19
+ literals.push(atom.kind === 'character' ? literal === undefined
20
+ ? explicitClass ? { kind: 'class', expression: atom.expression } : { kind: 'outside' }
21
+ : { kind: 'literal', value: literal }
22
+ : atom.kind === 'repeat' ? { ...atom } : { kind: atom.kind, children: [...atom.children] });
23
+ return atoms.length - 1;
24
+ };
25
+ const invalid = () => c.fail(owner, "pattern-valid-restriction", "Malformed XSD regular expression", lexical.context.source);
26
+ const unsupported = () => c.unsupported(owner, "pattern-subset", "XSD regex construct requires a separately evidenced equivalent implementation", lexical.context.source);
27
+ let i = 0, escapedLiteral;
28
+ const escaped = (inClass = false) => {
29
+ escapedLiteral = undefined;
30
+ i++;
31
+ const char = source[i++];
32
+ if (char === undefined)
33
+ return invalid();
34
+ if (char === "n") {
35
+ escapedLiteral = '\n';
36
+ return "\\n";
37
+ }
38
+ if (char === "r") {
39
+ escapedLiteral = '\r';
40
+ return "\\r";
41
+ }
42
+ if (char === "t") {
43
+ escapedLiteral = '\t';
44
+ return "\\t";
45
+ }
46
+ if ("\\|.-^?*+{}()[]".includes(char)) {
47
+ escapedLiteral = char;
48
+ return char === '-' && !inClass ? '-' : `\\${char}`;
49
+ }
50
+ if (char === "s")
51
+ return "[ \\t\\n\\r]";
52
+ if (char === "S")
53
+ return "[^ \\t\\n\\r]";
54
+ if (char === "d")
55
+ return "\\p{Nd}";
56
+ if (char === "D")
57
+ return "\\P{Nd}";
58
+ if (char === "p" || char === "P") {
59
+ if (source[i++] !== "{")
60
+ return invalid();
61
+ const start = i;
62
+ while (i < source.length && source[i] !== "}") {
63
+ c.step(owner);
64
+ i++;
65
+ }
66
+ if (source[i++] !== "}")
67
+ return invalid();
68
+ const category = source.slice(start, i - 1);
69
+ if (category.startsWith("Is"))
70
+ return unsupported();
71
+ if (!/^(?:L[ultmo]?|M[nce]?|N[dlo]?|P[cdseifo]?|Z[slp]?|S[mcko]?|C[cfon]?)$/.test(category))
72
+ return invalid();
73
+ return `\\${char}{${category}}`;
74
+ }
75
+ if ("iIcC".includes(char)) {
76
+ if (!fixedSchemaNames)
77
+ return unsupported();
78
+ const range = char === 'i' || char === 'I' ? XML_NAME_RANGES.start : XML_NAME_RANGES.character;
79
+ c.step(owner, range.length + 3);
80
+ return `[${char === 'I' || char === 'C' ? '^' : ''}${range}]`;
81
+ }
82
+ if ("wW".includes(char))
83
+ return unsupported();
84
+ return invalid();
85
+ };
86
+ const characterClass = () => {
87
+ if (intrinsicNames) {
88
+ c.step(owner, 20);
89
+ const start = source.startsWith("[\\i-[:]]", i), character = source.startsWith("[\\c-[:]]", i);
90
+ if (start || character) {
91
+ const range = start ? XML_NAME_RANGES.start : XML_NAME_RANGES.character;
92
+ c.step(owner, range.length + 12);
93
+ i += 8;
94
+ return `(?!:)[${range}]`;
95
+ }
96
+ }
97
+ i++;
98
+ let body = "", negative = false;
99
+ if (source[i] === "^") {
100
+ negative = true;
101
+ i++;
102
+ }
103
+ let count = 0, canEndRange = false, rangeEnd = false;
104
+ while (i < source.length && source[i] !== "]") {
105
+ c.step(owner);
106
+ const char = source[i];
107
+ if (char === "[" || char === "-" && source[i + 1] === "[")
108
+ return unsupported();
109
+ if (char === "-") {
110
+ if (count === 0 || source[i + 1] === "]") {
111
+ body += "\\-";
112
+ i++;
113
+ count++;
114
+ canEndRange = false;
115
+ continue;
116
+ }
117
+ if (!canEndRange || rangeEnd)
118
+ return invalid();
119
+ body += "-";
120
+ i++;
121
+ canEndRange = false;
122
+ rangeEnd = true;
123
+ continue;
124
+ }
125
+ if (char === "\\") {
126
+ const escape = escaped(true);
127
+ // Nested character-class escapes need set algebra. Do not copy a
128
+ // non-equivalent ECMAScript class into a verified plan.
129
+ if (escape.startsWith("["))
130
+ return unsupported();
131
+ if (rangeEnd && /\\[pP]\{/.test(escape))
132
+ return invalid();
133
+ body += escape;
134
+ canEndRange = !/\\[pP]\{/.test(escape) && !rangeEnd;
135
+ }
136
+ else {
137
+ const point = source.codePointAt(i), literal = String.fromCodePoint(point);
138
+ body += literal === "^" ? "\\^" : literal;
139
+ i += point > 0xffff ? 2 : 1;
140
+ canEndRange = !rangeEnd;
141
+ }
142
+ if (rangeEnd) {
143
+ rangeEnd = false;
144
+ canEndRange = false;
145
+ }
146
+ count++;
147
+ }
148
+ if (!count || source[i++] !== "]")
149
+ return invalid();
150
+ const result = `[${negative ? "^" : ""}${body}]`;
151
+ c.text(result, owner);
152
+ try {
153
+ new RegExp(result, "u");
154
+ }
155
+ catch {
156
+ return invalid();
157
+ }
158
+ return result;
159
+ };
160
+ const frames = [{ branches: [], pieces: [] }];
161
+ const closeBranch = (frame) => { c.step(owner, frame.pieces.length); frame.branches.push(add({ kind: "sequence", children: frame.pieces })); frame.pieces = []; };
162
+ const quantified = (atom) => {
163
+ const char = source[i];
164
+ let min = "1", max = "1";
165
+ if (char === "?" || char === "*" || char === "+") {
166
+ i++;
167
+ min = char === "+" ? "1" : "0";
168
+ max = char === "?" ? "1" : "unbounded";
169
+ }
170
+ else if (char === "{") {
171
+ i++;
172
+ const start = i;
173
+ while (/\d/.test(source[i] ?? "") && i < source.length) {
174
+ c.step(owner);
175
+ i++;
176
+ }
177
+ if (i === start)
178
+ return invalid();
179
+ min = source.slice(start, i).replace(/^0+(?=\d)/, "");
180
+ max = min;
181
+ if (source[i] === ",") {
182
+ i++;
183
+ const next = i;
184
+ while (/\d/.test(source[i] ?? "") && i < source.length) {
185
+ c.step(owner);
186
+ i++;
187
+ }
188
+ max = next === i ? "unbounded" : source.slice(next, i).replace(/^0+(?=\d)/, "");
189
+ }
190
+ if (source[i++] !== "}")
191
+ return invalid();
192
+ if (c.algebra.compare(min, max) > 0)
193
+ return invalid();
194
+ }
195
+ return min === "1" && max === "1" ? atom : add({ kind: "repeat", child: atom, min, max });
196
+ };
197
+ while (i < source.length) {
198
+ c.step(owner);
199
+ const frame = frames.at(-1), char = source[i];
200
+ if (char === "(") {
201
+ i++;
202
+ c.step(owner);
203
+ frames.push({ branches: [], pieces: [] });
204
+ continue;
205
+ }
206
+ if (char === "|") {
207
+ i++;
208
+ closeBranch(frame);
209
+ continue;
210
+ }
211
+ if (char === ")") {
212
+ if (frames.length === 1)
213
+ return invalid();
214
+ i++;
215
+ closeBranch(frame);
216
+ c.step(owner, frame.branches.length);
217
+ const atom = add({ kind: "choice", children: frame.branches });
218
+ frames.pop();
219
+ frames.at(-1).pieces.push(quantified(atom));
220
+ continue;
221
+ }
222
+ if ("?*+{}]".includes(char))
223
+ return invalid();
224
+ let expression, literal;
225
+ if (char === "[")
226
+ expression = characterClass();
227
+ else if (char === "\\") {
228
+ expression = escaped();
229
+ literal = escapedLiteral;
230
+ }
231
+ else if (char === ".") {
232
+ i++;
233
+ expression = "[^\\r\\n]";
234
+ }
235
+ else {
236
+ const point = source.codePointAt(i);
237
+ i += point > 0xffff ? 2 : 1;
238
+ literal = String.fromCodePoint(point);
239
+ expression = literal.replace(/[\\^$.*+?()[\]{}|]/g, "\\$&");
240
+ }
241
+ c.text(expression, owner);
242
+ frame.pieces.push(quantified(add({ kind: "character", expression }, literal, char === '[')));
243
+ }
244
+ if (frames.length !== 1)
245
+ return invalid();
246
+ closeBranch(frames[0]);
247
+ c.step(owner, frames[0].branches.length);
248
+ const root = add({ kind: "choice", children: frames[0].branches });
249
+ c.step(owner, 3);
250
+ const pattern = { language: "xsd10-whole-string", atoms, root, unicode: "code-points", runtimeOwner: "#184" };
251
+ literalPrograms.set(pattern, { atoms: literals, root, sourceLength: source.length });
252
+ c.step(owner, atoms.length * 4 + 2);
253
+ const privateAtoms = atoms.map(atom => {
254
+ if (atom.kind === 'choice' || atom.kind === 'sequence') {
255
+ c.step(owner, atom.children.length + 3);
256
+ return { ...atom, children: [...atom.children] };
257
+ }
258
+ return { ...atom };
259
+ });
260
+ regularPrograms.set(pattern, { atoms: privateAtoms, root });
261
+ return pattern;
262
+ };
263
+ /** Exact finite literal fragment, used only to propose concretely checked operands. */
264
+ const literalLanguage = (pattern, owner) => {
265
+ c.step(owner);
266
+ const program = literalPrograms.get(pattern);
267
+ if (!program)
268
+ throw new TypeError('Literal language requires a pattern issued by this factory');
269
+ c.step(owner, program.atoms.length * 2 + 2);
270
+ const finite = [], emptyOnly = [];
271
+ for (const atom of program.atoms) {
272
+ c.step(owner, 3);
273
+ let known = false, empty = false;
274
+ if (atom.kind === 'literal')
275
+ known = true;
276
+ else if (atom.kind === 'sequence' || atom.kind === 'choice') {
277
+ c.step(owner, atom.children.length * 2);
278
+ known = atom.children.every(child => finite[child]);
279
+ empty = atom.children.every(child => emptyOnly[child]);
280
+ }
281
+ else if (atom.kind === 'repeat') {
282
+ c.text(atom.max, owner);
283
+ empty = atom.max === '0' || emptyOnly[atom.child];
284
+ known = empty || atom.max !== 'unbounded' && finite[atom.child];
285
+ }
286
+ finite.push(known);
287
+ emptyOnly.push(empty);
288
+ }
289
+ if (!finite[program.root])
290
+ return { kind: 'outside-fragment' };
291
+ function* words() {
292
+ c.step(owner, 4);
293
+ const states = [{ pending: [{ kind: 'node', node: program.root }], word: '' }];
294
+ while (states.length) {
295
+ c.step(owner);
296
+ const state = states.pop();
297
+ while (state.pending.length) {
298
+ c.step(owner);
299
+ const task = state.pending.pop();
300
+ if (task.kind === 'repeat') {
301
+ c.step(owner, task.digits * 4 + 6);
302
+ if (task.max === 0n)
303
+ continue;
304
+ const next = { ...task, min: task.min > 0n ? task.min - 1n : 0n, max: task.max - 1n };
305
+ if (task.min > 0n)
306
+ state.pending.push(next, { kind: 'node', node: task.child });
307
+ else {
308
+ c.step(owner, state.pending.length + 4);
309
+ states.push({ word: state.word, pending: [...state.pending, next, { kind: 'node', node: task.child }] });
310
+ }
311
+ continue;
312
+ }
313
+ if (emptyOnly[task.node])
314
+ continue;
315
+ const atom = program.atoms[task.node];
316
+ if (atom.kind === 'literal') {
317
+ c.step(owner, state.word.length + atom.value.length + 1);
318
+ state.word += atom.value;
319
+ }
320
+ else if (atom.kind === 'sequence') {
321
+ c.step(owner, atom.children.length * 2);
322
+ for (let index = atom.children.length - 1; index >= 0; index--)
323
+ state.pending.push({ kind: 'node', node: atom.children[index] });
324
+ }
325
+ else if (atom.kind === 'choice') {
326
+ for (let index = atom.children.length - 1; index > 0; index--) {
327
+ c.step(owner, state.pending.length + 4);
328
+ states.push({ word: state.word, pending: [...state.pending, { kind: 'node', node: atom.children[index] }] });
329
+ }
330
+ c.step(owner);
331
+ state.pending.push({ kind: 'node', node: atom.children[0] });
332
+ }
333
+ else if (atom.kind === 'repeat') {
334
+ c.text(atom.min, owner);
335
+ c.text(atom.max, owner);
336
+ c.step(owner, atom.min.length * atom.min.length + atom.max.length * atom.max.length + 3);
337
+ state.pending.push({ kind: 'repeat', child: atom.child, min: BigInt(atom.min), max: BigInt(atom.max), digits: atom.max.length });
338
+ }
339
+ else
340
+ throw new TypeError('Private finite literal program contains an outside-fragment atom');
341
+ }
342
+ c.text(state.word, owner);
343
+ yield state.word;
344
+ }
345
+ }
346
+ c.step(owner);
347
+ return { kind: 'finite-literal', words: words() };
348
+ };
349
+ /** Sound proposals for the private literal/class grammar; no exhaustion claim. */
350
+ function* positiveWords(pattern, owner, hints) {
351
+ c.step(owner);
352
+ const program = literalPrograms.get(pattern);
353
+ if (!program)
354
+ throw new TypeError('Positive words require a pattern issued by this factory');
355
+ c.step(owner, 12);
356
+ let states = [{ pending: [{ kind: 'node', node: program.root }], word: '' }];
357
+ const deferred = [];
358
+ const classChoices = new Map();
359
+ const classRegexes = new Map();
360
+ const scannedClasses = new Set();
361
+ let cursor = 0, exploringClasses = false;
362
+ const enqueue = (state, tasks = [], suffix = '') => {
363
+ c.step(owner, state.pending.length + tasks.length + state.word.length + suffix.length + 8);
364
+ states.push({ pending: [...state.pending, ...tasks], word: state.word + suffix });
365
+ };
366
+ while (cursor < states.length || (!exploringClasses && deferred.length)) {
367
+ if (cursor === states.length) {
368
+ c.step(owner);
369
+ states = deferred;
370
+ cursor = 0;
371
+ exploringClasses = true;
372
+ }
373
+ c.step(owner);
374
+ const state = states[cursor];
375
+ states[cursor++] = undefined;
376
+ const task = state.pending.pop();
377
+ if (!task) {
378
+ c.text(state.word, owner);
379
+ yield state.word;
380
+ continue;
381
+ }
382
+ if (task.kind === 'repeat') {
383
+ c.step(owner, task.digits * 4 + 6);
384
+ if (task.min === 0n)
385
+ enqueue(state);
386
+ if (task.max !== 0n) {
387
+ const next = { kind: 'repeat', child: task.child,
388
+ min: task.min > 0n ? task.min - 1n : 0n, max: task.max - 1n, digits: task.digits };
389
+ enqueue(state, [next, { kind: 'node', node: task.child }]);
390
+ }
391
+ continue;
392
+ }
393
+ const atom = program.atoms[task.node];
394
+ if (atom.kind === 'literal') {
395
+ enqueue(state, [], atom.value);
396
+ continue;
397
+ }
398
+ if (atom.kind === 'class') {
399
+ let choices = classChoices.get(task.node);
400
+ if (!choices) {
401
+ c.text(atom.expression, owner);
402
+ c.step(owner, atom.expression.length + 8);
403
+ const regex = new RegExp(`^(?:${atom.expression})(?![\\s\\S])`, 'u');
404
+ classRegexes.set(task.node, regex);
405
+ c.step(owner, 4);
406
+ const found = [], seen = new Set();
407
+ for (let index = 0; index < hints.length;) {
408
+ c.step(owner, 4);
409
+ const point = hints.codePointAt(index), char = String.fromCodePoint(point);
410
+ index += char.length;
411
+ if (regex.test(char) && !seen.has(char)) {
412
+ c.step(owner, 3);
413
+ seen.add(char);
414
+ found.push(char);
415
+ }
416
+ }
417
+ // Common single-character witnesses are cheap enough to try before
418
+ // a class-free branch, even when that branch has many words.
419
+ if (!found.length)
420
+ for (let point = 0x20; point <= 0x7e; point++) {
421
+ c.step(owner, 3);
422
+ const char = String.fromCodePoint(point);
423
+ if (regex.test(char)) {
424
+ c.step(owner, 2);
425
+ found.push(char);
426
+ break;
427
+ }
428
+ }
429
+ choices = found;
430
+ c.step(owner, choices.length + 2);
431
+ classChoices.set(task.node, choices);
432
+ }
433
+ // A full Unicode scan can consume the allowance before a finite
434
+ // alternative is reached. Keep the charged state for a later pass.
435
+ if (!choices.length && !exploringClasses) {
436
+ c.step(owner, state.pending.length + state.word.length + 8);
437
+ state.pending.push(task);
438
+ deferred.push(state);
439
+ continue;
440
+ }
441
+ if (!choices.length && !scannedClasses.has(task.node)) {
442
+ const regex = classRegexes.get(task.node);
443
+ for (let point = 0x7f; point <= 0x10ffff; point++) {
444
+ c.step(owner, 3);
445
+ const char = String.fromCodePoint(point);
446
+ if (regex.test(char)) {
447
+ c.step(owner, 2);
448
+ choices = [char];
449
+ break;
450
+ }
451
+ }
452
+ scannedClasses.add(task.node);
453
+ classChoices.set(task.node, choices);
454
+ }
455
+ for (const char of choices)
456
+ enqueue(state, [], char);
457
+ continue;
458
+ }
459
+ if (atom.kind === 'sequence') {
460
+ c.step(owner, atom.children.length * 2 + 2);
461
+ const tasks = [];
462
+ for (let index = atom.children.length - 1; index >= 0; index--)
463
+ tasks.push({ kind: 'node', node: atom.children[index] });
464
+ enqueue(state, tasks);
465
+ }
466
+ else if (atom.kind === 'choice') {
467
+ c.step(owner, atom.children.length * 2 + 2);
468
+ for (const node of atom.children)
469
+ enqueue(state, [{ kind: 'node', node }]);
470
+ }
471
+ else if (atom.kind === 'repeat') {
472
+ c.text(atom.min, owner);
473
+ c.text(atom.max, owner);
474
+ c.step(owner, atom.min.length * atom.min.length + atom.max.length * atom.max.length + 3);
475
+ // This input-derived prefix is proposal scope, never a negative
476
+ // language bound. The exact assessor checks every emitted spelling.
477
+ const max = atom.max === 'unbounded'
478
+ ? BigInt(atom.min) + BigInt(program.sourceLength) + BigInt(hints.length)
479
+ : BigInt(atom.max);
480
+ enqueue(state, [{ kind: 'repeat', child: atom.child, min: BigInt(atom.min), max,
481
+ digits: Math.max(atom.min.length, atom.max.length, String(program.sourceLength).length, String(hints.length).length) + 1 }]);
482
+ }
483
+ // Other admitted characters have no producer here. Their absence is
484
+ // unresolved by the caller, never a proof that the language is empty.
485
+ }
486
+ }
487
+ // Bounded relation evaluation only for schema-declared operand literals.
488
+ // It never expands a finite repetition or runs an unbounded JS regex.
489
+ const acceptsOperand = (pattern, value, owner) => {
490
+ c.text(value, owner);
491
+ const chars = [];
492
+ for (const char of value) {
493
+ c.step(owner);
494
+ chars.push(char);
495
+ }
496
+ const relations = [];
497
+ const identity = () => {
498
+ const result = [];
499
+ for (let i = 0; i <= chars.length; i++) {
500
+ c.step(owner);
501
+ result.push(new Set([i]));
502
+ }
503
+ return result;
504
+ };
505
+ const compose = (a, b) => {
506
+ const result = [];
507
+ for (let i = 0; i < a.length; i++) {
508
+ c.step(owner);
509
+ const row = new Set();
510
+ for (const middle of a[i])
511
+ for (const end of b[middle]) {
512
+ c.step(owner);
513
+ row.add(end);
514
+ }
515
+ result.push(row);
516
+ }
517
+ return result;
518
+ };
519
+ const union = (target, source) => {
520
+ for (let i = 0; i < target.length; i++)
521
+ for (const end of source[i]) {
522
+ c.step(owner);
523
+ target[i].add(end);
524
+ }
525
+ };
526
+ for (const atom of pattern.atoms) {
527
+ c.step(owner);
528
+ let result;
529
+ if (atom.kind === "character") {
530
+ c.text(atom.expression, owner);
531
+ const character = new RegExp(`^(?:${atom.expression})(?![\\s\\S])`, "u");
532
+ result = [];
533
+ for (let i = 0; i <= chars.length; i++) {
534
+ c.step(owner);
535
+ result.push(new Set(i < chars.length && character.test(chars[i]) ? [i + 1] : []));
536
+ }
537
+ }
538
+ else if (atom.kind === "sequence") {
539
+ result = identity();
540
+ for (const child of atom.children)
541
+ result = compose(result, relations[child]);
542
+ }
543
+ else if (atom.kind === "choice") {
544
+ result = [];
545
+ for (let i = 0; i <= chars.length; i++) {
546
+ c.step(owner);
547
+ result.push(new Set());
548
+ }
549
+ for (const child of atom.children)
550
+ union(result, relations[child]);
551
+ }
552
+ else {
553
+ const child = relations[atom.child], nullable = child[0].has(0);
554
+ result = [];
555
+ for (let i = 0; i <= chars.length; i++) {
556
+ c.step(owner);
557
+ result.push(new Set());
558
+ }
559
+ let repeated = identity();
560
+ const cap = c.algebra.compare(atom.max, chars.length.toString()) < 0 ? Number(atom.max) : chars.length;
561
+ for (let count = 0; count <= cap; count++) {
562
+ c.step(owner);
563
+ if (nullable || c.algebra.compare(count.toString(), atom.min) >= 0)
564
+ union(result, repeated);
565
+ if (count !== cap)
566
+ repeated = compose(repeated, child);
567
+ }
568
+ }
569
+ relations.push(result);
570
+ }
571
+ return relations[pattern.root][0].has(chars.length);
572
+ };
573
+ const language = (pattern, owner, authority = regular) => {
574
+ c.step(owner);
575
+ const program = regularPrograms.get(pattern);
576
+ if (!program)
577
+ throw new TypeError('Regular language requires a pattern issued by this factory');
578
+ return authority.fromPattern(program.atoms, program.root, owner);
579
+ };
580
+ return { compile, acceptsOperand, literalLanguage, positiveWords, language, regular };
581
+ }
@@ -0,0 +1,67 @@
1
+ /** Finite automata over XML code points. Empty search is a complete language result. */
2
+ import type { PatternAtom } from './schemaPattern.js';
3
+ import type { SchemaPatternContext } from './schemaValueContext.js';
4
+ type Range = readonly [number, number];
5
+ export type RegularLanguage = Readonly<{
6
+ kind: 'private-regular-language';
7
+ }>;
8
+ export type RegularAutomaton = Readonly<{
9
+ states: readonly Readonly<{
10
+ accepting: boolean;
11
+ transitions: readonly Readonly<{
12
+ to: number;
13
+ lo: number;
14
+ hi: number;
15
+ }>[];
16
+ }>[];
17
+ start: number;
18
+ }>;
19
+ export declare function schemaRegularLanguages<Owner>(c: SchemaPatternContext<Owner>): {
20
+ fromPattern: (atoms: readonly PatternAtom[], root: number, owner: Owner) => RegularLanguage;
21
+ intersect: (languages: readonly RegularLanguage[], owner: Owner) => Readonly<{
22
+ kind: "private-regular-language";
23
+ }>;
24
+ union: (languages: readonly RegularLanguage[], owner: Owner) => Readonly<{
25
+ kind: "private-regular-language";
26
+ }>;
27
+ negate: (language: RegularLanguage, owner: Owner) => RegularLanguage;
28
+ witness: (language: RegularLanguage, owner: Owner) => string | undefined;
29
+ finiteWords: (language: RegularLanguage, owner: Owner) => {
30
+ kind: "infinite";
31
+ } | {
32
+ kind: "finite";
33
+ words: Generator<string>;
34
+ };
35
+ automaton: (language: RegularLanguage, owner: Owner) => RegularAutomaton;
36
+ fromAutomaton: (program: RegularAutomaton, owner: Owner) => RegularLanguage;
37
+ fromNfa: (program: Readonly<{
38
+ edges: readonly (readonly Readonly<{
39
+ to: number;
40
+ ranges?: readonly Range[];
41
+ }>[])[];
42
+ start: number;
43
+ end: number;
44
+ }>, owner: Owner) => RegularLanguage;
45
+ substitutionGraph: (count: number, start: number, end: number, labels: readonly {
46
+ from: number;
47
+ to: number;
48
+ language: RegularLanguage;
49
+ }[], owner: Owner) => RegularLanguage;
50
+ jsonStringImage: (language: RegularLanguage, owner: Owner) => RegularLanguage;
51
+ paths: (program: RegularAutomaton, starts: readonly number[], ends: ReadonlySet<number>, owner: Owner) => RegularLanguage;
52
+ quotient: (source: RegularLanguage, prefix: RegularLanguage, suffix: RegularLanguage, owner: Owner) => RegularLanguage;
53
+ reverse: (language: RegularLanguage, owner: Owner) => RegularLanguage;
54
+ concatenate: (languages: readonly RegularLanguage[], owner: Owner) => RegularLanguage;
55
+ repeat: (language: RegularLanguage, min: number, max: number | "unbounded", owner: Owner) => RegularLanguage;
56
+ whitespacePreimage: (language: RegularLanguage, mode: "preserve" | "replace" | "collapse", owner: Owner) => RegularLanguage;
57
+ whitespaceImage: (language: RegularLanguage, mode: "preserve" | "replace" | "collapse", owner: Owner) => RegularLanguage;
58
+ characterImage: (language: RegularLanguage, changes: readonly {
59
+ lo: number;
60
+ hi: number;
61
+ shift?: number;
62
+ remove?: boolean;
63
+ }[], owner: Owner) => RegularLanguage;
64
+ words: (language: RegularLanguage, owner: Owner) => Generator<string>;
65
+ };
66
+ export {};
67
+ //# sourceMappingURL=schemaRegularLanguage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemaRegularLanguage.d.ts","sourceRoot":"","sources":["../../src/compiler/schemaRegularLanguage.ts"],"names":[],"mappings":"AAAA,wFAAwF;AACxF,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,yBAAyB,CAAC;AAElE,KAAK,KAAK,GAAG,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAGvC,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC;IAAC,IAAI,EAAE,0BAA0B,CAAA;CAAC,CAAC,CAAC;AAC3E,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CAAC;IAAC,MAAM,EAAE,SAAS,QAAQ,CAAC;QAAC,SAAS,EAAE,OAAO,CAAC;QACrF,WAAW,EAAE,SAAS,QAAQ,CAAC;YAAC,EAAE,EAAE,MAAM,CAAC;YAAC,EAAE,EAAE,MAAM,CAAC;YAAC,EAAE,EAAE,MAAM,CAAA;SAAC,CAAC,EAAE,CAAA;KAAC,CAAC,EAAE,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAC,CAAC,CAAC;AAK9F,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,CAAC,EAAE,oBAAoB,CAAC,KAAK,CAAC;yBAuG9C,SAAS,WAAW,EAAE,QAAQ,MAAM,SAAS,KAAK,KAAG,eAAe;2BAijBpD,SAAS,eAAe,EAAE,SAAS,KAAK;cA/pBxC,0BAA0B;;uBAgqBjD,SAAS,eAAe,EAAE,SAAS,KAAK;cAhqBjB,0BAA0B;;uBAyK5C,eAAe,SAAS,KAAK,KAAG,eAAe;wBAiJ9C,eAAe,SAAS,KAAK,KAAG,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