sysmledgraph 0.7.0

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 (309) hide show
  1. package/README.md +71 -0
  2. package/dist/bin/cli.d.ts +6 -0
  3. package/dist/bin/cli.d.ts.map +1 -0
  4. package/dist/bin/cli.js +61 -0
  5. package/dist/bin/cli.js.map +1 -0
  6. package/dist/mcp/index.d.ts +3 -0
  7. package/dist/mcp/index.d.ts.map +1 -0
  8. package/dist/mcp/index.js +8 -0
  9. package/dist/mcp/index.js.map +1 -0
  10. package/dist/src/cli/commands.d.ts +22 -0
  11. package/dist/src/cli/commands.d.ts.map +1 -0
  12. package/dist/src/cli/commands.js +87 -0
  13. package/dist/src/cli/commands.js.map +1 -0
  14. package/dist/src/discovery/find-sysml.d.ts +16 -0
  15. package/dist/src/discovery/find-sysml.d.ts.map +1 -0
  16. package/dist/src/discovery/find-sysml.js +30 -0
  17. package/dist/src/discovery/find-sysml.js.map +1 -0
  18. package/dist/src/discovery/load-order.d.ts +11 -0
  19. package/dist/src/discovery/load-order.d.ts.map +1 -0
  20. package/dist/src/discovery/load-order.js +85 -0
  21. package/dist/src/discovery/load-order.js.map +1 -0
  22. package/dist/src/graph/connection.d.ts +6 -0
  23. package/dist/src/graph/connection.d.ts.map +1 -0
  24. package/dist/src/graph/connection.js +7 -0
  25. package/dist/src/graph/connection.js.map +1 -0
  26. package/dist/src/graph/graph-store.d.ts +37 -0
  27. package/dist/src/graph/graph-store.d.ts.map +1 -0
  28. package/dist/src/graph/graph-store.js +108 -0
  29. package/dist/src/graph/graph-store.js.map +1 -0
  30. package/dist/src/graph/schema.d.ts +13 -0
  31. package/dist/src/graph/schema.d.ts.map +1 -0
  32. package/dist/src/graph/schema.js +21 -0
  33. package/dist/src/graph/schema.js.map +1 -0
  34. package/dist/src/index.d.ts +14 -0
  35. package/dist/src/index.d.ts.map +1 -0
  36. package/dist/src/index.js +14 -0
  37. package/dist/src/index.js.map +1 -0
  38. package/dist/src/indexer/indexer.d.ts +20 -0
  39. package/dist/src/indexer/indexer.d.ts.map +1 -0
  40. package/dist/src/indexer/indexer.js +56 -0
  41. package/dist/src/indexer/indexer.js.map +1 -0
  42. package/dist/src/indexer/pipeline-phases.d.ts +8 -0
  43. package/dist/src/indexer/pipeline-phases.d.ts.map +1 -0
  44. package/dist/src/indexer/pipeline-phases.js +14 -0
  45. package/dist/src/indexer/pipeline-phases.js.map +1 -0
  46. package/dist/src/mcp/resources/context.d.ts +6 -0
  47. package/dist/src/mcp/resources/context.d.ts.map +1 -0
  48. package/dist/src/mcp/resources/context.js +45 -0
  49. package/dist/src/mcp/resources/context.js.map +1 -0
  50. package/dist/src/mcp/resources/schema.d.ts +6 -0
  51. package/dist/src/mcp/resources/schema.d.ts.map +1 -0
  52. package/dist/src/mcp/resources/schema.js +14 -0
  53. package/dist/src/mcp/resources/schema.js.map +1 -0
  54. package/dist/src/mcp/server.d.ts +8 -0
  55. package/dist/src/mcp/server.d.ts.map +1 -0
  56. package/dist/src/mcp/server.js +175 -0
  57. package/dist/src/mcp/server.js.map +1 -0
  58. package/dist/src/mcp/tools/clean-index.d.ts +12 -0
  59. package/dist/src/mcp/tools/clean-index.d.ts.map +1 -0
  60. package/dist/src/mcp/tools/clean-index.js +22 -0
  61. package/dist/src/mcp/tools/clean-index.js.map +1 -0
  62. package/dist/src/mcp/tools/context.d.ts +14 -0
  63. package/dist/src/mcp/tools/context.d.ts.map +1 -0
  64. package/dist/src/mcp/tools/context.js +51 -0
  65. package/dist/src/mcp/tools/context.js.map +1 -0
  66. package/dist/src/mcp/tools/cypher.d.ts +13 -0
  67. package/dist/src/mcp/tools/cypher.d.ts.map +1 -0
  68. package/dist/src/mcp/tools/cypher.js +25 -0
  69. package/dist/src/mcp/tools/cypher.js.map +1 -0
  70. package/dist/src/mcp/tools/generate-map.d.ts +13 -0
  71. package/dist/src/mcp/tools/generate-map.d.ts.map +1 -0
  72. package/dist/src/mcp/tools/generate-map.js +96 -0
  73. package/dist/src/mcp/tools/generate-map.js.map +1 -0
  74. package/dist/src/mcp/tools/impact.d.ts +14 -0
  75. package/dist/src/mcp/tools/impact.d.ts.map +1 -0
  76. package/dist/src/mcp/tools/impact.js +47 -0
  77. package/dist/src/mcp/tools/impact.js.map +1 -0
  78. package/dist/src/mcp/tools/index-db-graph.d.ts +14 -0
  79. package/dist/src/mcp/tools/index-db-graph.d.ts.map +1 -0
  80. package/dist/src/mcp/tools/index-db-graph.js +32 -0
  81. package/dist/src/mcp/tools/index-db-graph.js.map +1 -0
  82. package/dist/src/mcp/tools/list-indexed.d.ts +9 -0
  83. package/dist/src/mcp/tools/list-indexed.d.ts.map +1 -0
  84. package/dist/src/mcp/tools/list-indexed.js +14 -0
  85. package/dist/src/mcp/tools/list-indexed.js.map +1 -0
  86. package/dist/src/mcp/tools/query.d.ts +14 -0
  87. package/dist/src/mcp/tools/query.d.ts.map +1 -0
  88. package/dist/src/mcp/tools/query.js +47 -0
  89. package/dist/src/mcp/tools/query.js.map +1 -0
  90. package/dist/src/mcp/tools/rename.d.ts +19 -0
  91. package/dist/src/mcp/tools/rename.d.ts.map +1 -0
  92. package/dist/src/mcp/tools/rename.js +46 -0
  93. package/dist/src/mcp/tools/rename.js.map +1 -0
  94. package/dist/src/parser/lsp-client.d.ts +52 -0
  95. package/dist/src/parser/lsp-client.d.ts.map +1 -0
  96. package/dist/src/parser/lsp-client.js +230 -0
  97. package/dist/src/parser/lsp-client.js.map +1 -0
  98. package/dist/src/parser/lsp-server-path.d.ts +10 -0
  99. package/dist/src/parser/lsp-server-path.d.ts.map +1 -0
  100. package/dist/src/parser/lsp-server-path.js +29 -0
  101. package/dist/src/parser/lsp-server-path.js.map +1 -0
  102. package/dist/src/parser/symbols.d.ts +13 -0
  103. package/dist/src/parser/symbols.d.ts.map +1 -0
  104. package/dist/src/parser/symbols.js +150 -0
  105. package/dist/src/parser/symbols.js.map +1 -0
  106. package/dist/src/parser/sysml-mcp-client.d.ts +109 -0
  107. package/dist/src/parser/sysml-mcp-client.d.ts.map +1 -0
  108. package/dist/src/parser/sysml-mcp-client.js +185 -0
  109. package/dist/src/parser/sysml-mcp-client.js.map +1 -0
  110. package/dist/src/storage/clean.d.ts +15 -0
  111. package/dist/src/storage/clean.d.ts.map +1 -0
  112. package/dist/src/storage/clean.js +44 -0
  113. package/dist/src/storage/clean.js.map +1 -0
  114. package/dist/src/storage/list.d.ts +9 -0
  115. package/dist/src/storage/list.d.ts.map +1 -0
  116. package/dist/src/storage/list.js +12 -0
  117. package/dist/src/storage/list.js.map +1 -0
  118. package/dist/src/storage/location.d.ts +22 -0
  119. package/dist/src/storage/location.d.ts.map +1 -0
  120. package/dist/src/storage/location.js +36 -0
  121. package/dist/src/storage/location.js.map +1 -0
  122. package/dist/src/storage/registry.d.ts +14 -0
  123. package/dist/src/storage/registry.d.ts.map +1 -0
  124. package/dist/src/storage/registry.js +59 -0
  125. package/dist/src/storage/registry.js.map +1 -0
  126. package/dist/src/symbol-to-graph/mapping.d.ts +17 -0
  127. package/dist/src/symbol-to-graph/mapping.d.ts.map +1 -0
  128. package/dist/src/symbol-to-graph/mapping.js +102 -0
  129. package/dist/src/symbol-to-graph/mapping.js.map +1 -0
  130. package/dist/src/types.d.ts +40 -0
  131. package/dist/src/types.d.ts.map +1 -0
  132. package/dist/src/types.js +35 -0
  133. package/dist/src/types.js.map +1 -0
  134. package/dist/src/worker/client.d.ts +21 -0
  135. package/dist/src/worker/client.d.ts.map +1 -0
  136. package/dist/src/worker/client.js +126 -0
  137. package/dist/src/worker/client.js.map +1 -0
  138. package/dist/src/worker/gateway.d.ts +79 -0
  139. package/dist/src/worker/gateway.d.ts.map +1 -0
  140. package/dist/src/worker/gateway.js +93 -0
  141. package/dist/src/worker/gateway.js.map +1 -0
  142. package/dist/src/worker/graph-worker.d.ts +7 -0
  143. package/dist/src/worker/graph-worker.d.ts.map +1 -0
  144. package/dist/src/worker/graph-worker.js +91 -0
  145. package/dist/src/worker/graph-worker.js.map +1 -0
  146. package/dist/src/worker/protocol.d.ts +21 -0
  147. package/dist/src/worker/protocol.d.ts.map +1 -0
  148. package/dist/src/worker/protocol.js +9 -0
  149. package/dist/src/worker/protocol.js.map +1 -0
  150. package/docs/INSTALL.md +16 -0
  151. package/docs/MCP_CLIENT_TEMPLATE_ANALYSIS.md +196 -0
  152. package/docs/MCP_INTERACTION_GUIDE.md +201 -0
  153. package/docs/MCP_SERVER_FOR_CURSOR.md +124 -0
  154. package/docs/PLAN.md +58 -0
  155. package/docs/PLAN_INDEPENDENT_LSP.md +145 -0
  156. package/docs/SKILL_DESIGN_PATTERNS.md +305 -0
  157. package/docs/TOOLS.md +317 -0
  158. package/lsp/README.md +41 -0
  159. package/lsp/node_modules/.bin/sysml-mcp +12 -0
  160. package/lsp/node_modules/.bin/sysml-mcp.cmd +9 -0
  161. package/lsp/node_modules/.bin/sysml-mcp.ps1 +16 -0
  162. package/lsp/node_modules/.package-lock.json +22 -0
  163. package/lsp/node_modules/sysml-v2-lsp/CHANGELOG.md +188 -0
  164. package/lsp/node_modules/sysml-v2-lsp/LICENSE +21 -0
  165. package/lsp/node_modules/sysml-v2-lsp/README.md +172 -0
  166. package/lsp/node_modules/sysml-v2-lsp/dist/server/mcpServer.js +167 -0
  167. package/lsp/node_modules/sysml-v2-lsp/dist/server/server.js +142 -0
  168. package/lsp/node_modules/sysml-v2-lsp/index.cjs +23 -0
  169. package/lsp/node_modules/sysml-v2-lsp/package.json +131 -0
  170. package/lsp/node_modules/sysml-v2-lsp/sysml.library/.project +17 -0
  171. package/lsp/node_modules/sysml-v2-lsp/sysml.library/.settings/org.eclipse.jdt.core.prefs +11 -0
  172. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Analysis/.meta.json +10 -0
  173. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Analysis/.project.json +27 -0
  174. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Analysis/AnalysisTooling.sysml +34 -0
  175. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Analysis/SampledFunctions.sysml +119 -0
  176. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Analysis/StateSpaceRepresentation.sysml +143 -0
  177. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Analysis/TradeStudies.sysml +171 -0
  178. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Cause and Effect/.meta.json +8 -0
  179. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Cause and Effect/.project.json +23 -0
  180. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Cause and Effect/CausationConnections.sysml +83 -0
  181. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Cause and Effect/CauseAndEffect.sysml +81 -0
  182. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Geometry/.meta.json +8 -0
  183. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Geometry/.project.json +27 -0
  184. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Geometry/ShapeItems.sysml +899 -0
  185. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Geometry/SpatialItems.sysml +168 -0
  186. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Metadata/.meta.json +10 -0
  187. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Metadata/.project.json +19 -0
  188. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Metadata/ImageMetadata.sysml +78 -0
  189. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Metadata/ModelingMetadata.sysml +143 -0
  190. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Metadata/ParametersOfInterestMetadata.sysml +39 -0
  191. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Metadata/RiskMetadata.sysml +100 -0
  192. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Quantities and Units/.meta.json +29 -0
  193. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Quantities and Units/.project.json +23 -0
  194. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Quantities and Units/ISQ.sysml +42 -0
  195. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Quantities and Units/ISQAcoustics.sysml +439 -0
  196. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Quantities and Units/ISQAtomicNuclear.sysml +2726 -0
  197. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Quantities and Units/ISQBase.sysml +206 -0
  198. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Quantities and Units/ISQCharacteristicNumbers.sysml +1991 -0
  199. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Quantities and Units/ISQChemistryMolecular.sysml +1353 -0
  200. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Quantities and Units/ISQCondensedMatter.sysml +1223 -0
  201. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Quantities and Units/ISQElectromagnetism.sysml +2333 -0
  202. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Quantities and Units/ISQInformation.sysml +958 -0
  203. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Quantities and Units/ISQLight.sysml +1537 -0
  204. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Quantities and Units/ISQMechanics.sysml +1564 -0
  205. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Quantities and Units/ISQSpaceTime.sysml +1169 -0
  206. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Quantities and Units/ISQThermodynamics.sysml +1256 -0
  207. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Quantities and Units/MeasurementRefCalculations.sysml +30 -0
  208. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Quantities and Units/MeasurementReferences.sysml +526 -0
  209. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Quantities and Units/Quantities.sysml +107 -0
  210. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Quantities and Units/QuantityCalculations.sysml +70 -0
  211. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Quantities and Units/SI.sysml +378 -0
  212. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Quantities and Units/SIPrefixes.sysml +48 -0
  213. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Quantities and Units/TensorCalculations.sysml +50 -0
  214. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Quantities and Units/Time.sysml +274 -0
  215. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Quantities and Units/USCustomaryUnits.sysml +260 -0
  216. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Quantities and Units/VectorCalculations.sysml +62 -0
  217. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Requirement Derivation/.meta.json +8 -0
  218. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Requirement Derivation/.project.json +19 -0
  219. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Requirement Derivation/DerivationConnections.sysml +63 -0
  220. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Requirement Derivation/RequirementDerivation.sysml +39 -0
  221. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Data Type Library/.meta.json +9 -0
  222. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Data Type Library/.project.json +11 -0
  223. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Data Type Library/Collections.kerml +147 -0
  224. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Data Type Library/ScalarValues.kerml +23 -0
  225. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Data Type Library/VectorValues.kerml +64 -0
  226. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Function Library/.meta.json +23 -0
  227. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Function Library/.project.json +15 -0
  228. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Function Library/BaseFunctions.kerml +80 -0
  229. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Function Library/BooleanFunctions.kerml +22 -0
  230. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Function Library/CollectionFunctions.kerml +68 -0
  231. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Function Library/ComplexFunctions.kerml +47 -0
  232. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Function Library/ControlFunctions.kerml +117 -0
  233. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Function Library/DataFunctions.kerml +43 -0
  234. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Function Library/IntegerFunctions.kerml +43 -0
  235. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Function Library/NaturalFunctions.kerml +27 -0
  236. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Function Library/NumericalFunctions.kerml +43 -0
  237. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Function Library/OccurrenceFunctions.kerml +154 -0
  238. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Function Library/RationalFunctions.kerml +49 -0
  239. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Function Library/RealFunctions.kerml +56 -0
  240. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Function Library/ScalarFunctions.kerml +33 -0
  241. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Function Library/SequenceFunctions.kerml +111 -0
  242. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Function Library/StringFunctions.kerml +25 -0
  243. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Function Library/TrigFunctions.kerml +35 -0
  244. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Function Library/VectorFunctions.kerml +273 -0
  245. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Semantic Library/.meta.json +22 -0
  246. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Semantic Library/.project.json +15 -0
  247. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Semantic Library/Base.kerml +95 -0
  248. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Semantic Library/Clocks.kerml +156 -0
  249. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Semantic Library/ControlPerformances.kerml +135 -0
  250. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Semantic Library/FeatureReferencingPerformances.kerml +190 -0
  251. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Semantic Library/KerML.kerml +483 -0
  252. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Semantic Library/Links.kerml +67 -0
  253. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Semantic Library/Metaobjects.kerml +58 -0
  254. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Semantic Library/Objects.kerml +212 -0
  255. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Semantic Library/Observation.kerml +161 -0
  256. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Semantic Library/Occurrences.kerml +992 -0
  257. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Semantic Library/Performances.kerml +293 -0
  258. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Semantic Library/SpatialFrames.kerml +197 -0
  259. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Semantic Library/StatePerformances.kerml +145 -0
  260. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Semantic Library/Transfers.kerml +281 -0
  261. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Semantic Library/TransitionPerformances.kerml +66 -0
  262. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Semantic Library/Triggers.kerml +188 -0
  263. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Systems Library/.meta.json +27 -0
  264. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Systems Library/.project.json +19 -0
  265. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Systems Library/Actions.sysml +552 -0
  266. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Systems Library/Allocations.sysml +29 -0
  267. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Systems Library/AnalysisCases.sysml +38 -0
  268. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Systems Library/Attributes.sysml +25 -0
  269. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Systems Library/Calculations.sysml +37 -0
  270. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Systems Library/Cases.sysml +71 -0
  271. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Systems Library/Connections.sysml +60 -0
  272. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Systems Library/Constraints.sysml +44 -0
  273. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Systems Library/Flows.sysml +126 -0
  274. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Systems Library/Interfaces.sysml +89 -0
  275. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Systems Library/Items.sysml +153 -0
  276. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Systems Library/Metadata.sysml +32 -0
  277. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Systems Library/Parts.sysml +81 -0
  278. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Systems Library/Ports.sysml +54 -0
  279. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Systems Library/Requirements.sysml +194 -0
  280. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Systems Library/StandardViewDefinitions.sysml +123 -0
  281. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Systems Library/States.sysml +103 -0
  282. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Systems Library/SysML.sysml +539 -0
  283. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Systems Library/UseCases.sysml +57 -0
  284. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Systems Library/VerificationCases.sysml +103 -0
  285. package/lsp/node_modules/sysml-v2-lsp/sysml.library/Systems Library/Views.sysml +164 -0
  286. package/lsp/package-lock.json +30 -0
  287. package/lsp/package.json +15 -0
  288. package/lsp/test-server.mjs +120 -0
  289. package/package.json +61 -0
  290. package/scripts/access-sysml-mcp.mjs +45 -0
  291. package/scripts/check-sysml-v2-lsp-version.mjs +39 -0
  292. package/scripts/clean.mjs +14 -0
  293. package/scripts/compare-mcp-vs-lsp-symbols.mjs +76 -0
  294. package/scripts/debug-index.mjs +23 -0
  295. package/scripts/debug-lsp-symbols.mjs +62 -0
  296. package/scripts/deploy-skills.mjs +43 -0
  297. package/scripts/example-sysml-mcp.mjs +27 -0
  298. package/scripts/export-graph.mjs +80 -0
  299. package/scripts/generate-map.mjs +110 -0
  300. package/scripts/index-and-map.mjs +43 -0
  301. package/scripts/index-and-query.mjs +39 -0
  302. package/scripts/query-one.mjs +34 -0
  303. package/scripts/setup-lsp.mjs +36 -0
  304. package/scripts/test-lsp.mjs +55 -0
  305. package/scripts/test-mcp-debug.mjs +32 -0
  306. package/scripts/test-mcp-sysml.mjs +75 -0
  307. package/scripts/test-mcp-tools.mjs +185 -0
  308. package/scripts/test-sysml-mcp-from-node_modules.mjs +56 -0
  309. package/scripts/validate-sysml-file.mjs +69 -0
@@ -0,0 +1,992 @@
1
+ standard library package Occurrences {
2
+ doc
3
+ /*
4
+ * This package defines modeling constructs for anything existing or occurring in time and space, with
5
+ * associations between them that assert temporal and spatial relationships.
6
+ */
7
+
8
+ private import Base::Anything;
9
+ private import Base::things;
10
+ private import Base::DataValue;
11
+ private import ScalarValues::Natural;
12
+ private import ScalarValues::Boolean;
13
+ private import Links::*;
14
+ private import Clocks::*;
15
+ private import Collections::Set;
16
+ private import Collections::OrderedSet;
17
+ private import CollectionFunctions::contains;
18
+ private import SequenceFunctions::isEmpty;
19
+ private import SequenceFunctions::notEmpty;
20
+ private import SequenceFunctions::includes;
21
+ private import SequenceFunctions::union;
22
+
23
+ abstract class Occurrence specializes Anything disjoint from DataValue {
24
+ doc
25
+ /*
26
+ * Occurrence is the most general classifier of entities that have identity and
27
+ * occur over time and space.
28
+ *
29
+ * The features of Occurrence specify the semantics of associations between occurrences that
30
+ * assert complete inclusion and exclusion in time or space, or both, which includes
31
+ * portions of an occurrence (having the same identity). Portions include slices and shots
32
+ * over time and space.
33
+ */
34
+
35
+ private import SequenceFunctions::*;
36
+
37
+ feature portionOfLife: Life[1] subsets portionOf default self;
38
+
39
+ feature self: Occurrence[1] redefines Anything::self subsets timeSlices, spaceSlices, spaceTimeCoincidentOccurrences, sameLifeOccurrences;
40
+ feature sameLifeOccurrences: Occurrence[1..*] subsets things;
41
+
42
+ feature this : Occurrence[1] default self {
43
+ doc
44
+ /*
45
+ * The "context" Occurrence within which this Occurrence takes place. By default, it is this
46
+ * Occurrence itself. However, this is overridden for ownedPerformances of Objects and
47
+ * subperformances of Performances.
48
+ */
49
+ }
50
+ connector :HappensDuring from [1] self to [1] this;
51
+
52
+ feature localClock : Clock[1] default universalClock {
53
+ doc
54
+ /*
55
+ * A local Clock to be used as the corresponding time reference for this Occurrence
56
+ * and, by default, all ownedOccurrences. By default this is the singleton universalClock.
57
+ */
58
+ }
59
+
60
+ composite feature suboccurrences: Occurrence[0..*] subsets occurrences {
61
+ doc
62
+ /*
63
+ * Composite suboccurrences of this Occurrence.
64
+ */
65
+
66
+ feature redefines localClock default (that as Occurrence).localClock {
67
+ doc
68
+ /*
69
+ * The localClock of a suboccurrence defaults to the localClock of its containing
70
+ * Occurrence.
71
+ */
72
+ }
73
+
74
+ feature redefines incomingTransferSort default (that as Occurrence).incomingTransferSort;
75
+ }
76
+
77
+ /* Occurrences may be suboccurrences of no more than one other occurrence. */
78
+ feature superoccurrence: Occurrence[0..1] subsets occurrences inverse of suboccurrences;
79
+
80
+ feature withoutOccurrences: Occurrence[0..*] unions successors, predecessors, outsideOfOccurrences
81
+ inverse of withoutOccurrences {
82
+ doc
83
+ /*
84
+ * Occurrences that are completely separate either in time or space or both.
85
+ */
86
+
87
+ /* withoutOccurrences is irreflexive. */
88
+ inv { (that as Occurrence) != (that.that as Occurrence) }
89
+ }
90
+
91
+ feature predecessors: Occurrence[0..*] subsets withoutOccurrences {
92
+ doc
93
+ /*
94
+ * Occurrences that end before this occurrence starts.
95
+ */
96
+ }
97
+
98
+ feature successors: Occurrence[0..*] subsets withoutOccurrences inverse of predecessors {
99
+ doc
100
+ /*
101
+ * Occurrences that start after this occurrence ends.
102
+ */
103
+
104
+ /* successors is transitive. */
105
+ feature earlierOccurrence: Occurrence[1] subsets that;
106
+ feature laterOccurrence: Occurrence[1] subsets self;
107
+ subset laterOccurrence.successors subsets earlierOccurrence.successors;
108
+ }
109
+
110
+ feature immediatePredecessors: Occurrence[0..*] subsets predecessors {
111
+ doc
112
+ /*
113
+ * Occurrences that end just before this occurrence starts, with no
114
+ * possibility of other occurrences happening in the time between them.
115
+ */
116
+ }
117
+
118
+ feature immediateSuccessors: Occurrence[0..*] subsets successors inverse of immediatePredecessors {
119
+ doc
120
+ /*
121
+ * Occurrences that start just after this occurrence ends, with no
122
+ * possibility of other occurrences happening in the time between them.
123
+ */
124
+
125
+ disjoint earlierOccurrence.successors from laterOccurrence.predecessors;
126
+ }
127
+
128
+ feature timeEnclosedOccurrences: Occurrence[1..*] subsets occurrences {
129
+ doc
130
+ /*
131
+ * Occurrences that start no earlier than and end no later than
132
+ * this occurrence, including at least this occurrence.
133
+ */
134
+
135
+ /*
136
+ * timeEnclosedOccurrences and successors constrain each other. All successors of
137
+ * (occurrences happening after) time enclosing occurrences (inverse of
138
+ * timeEnclosedOccurrences) are also successors of their timeEnclosedOccurrences.
139
+ * And predecessors of (occurrences happening before) time enclosing occurrences
140
+ * are predecessors of their timeEnclosedOccurrences.
141
+ */
142
+ feature longerOccurrence: Occurrence[1] subsets that;
143
+ feature shorterOccurrence: Occurrence[1] subsets self;
144
+ subset longerOccurrence.predecessors subsets shorterOccurrence.predecessors;
145
+ subset longerOccurrence.successors subsets shorterOccurrence.successors;
146
+
147
+ /* timeEnclosedOccurrences is transitive. */
148
+ subset shorterOccurrence.timeEnclosedOccurrences subsets longerOccurrence.timeEnclosedOccurrences;
149
+ }
150
+
151
+ feature all timeCoincidentOccurrences: Occurrence[1..*] subsets timeEnclosedOccurrences inverse of timeCoincidentOccurrences {
152
+ doc
153
+ /*
154
+ * Occurrences that start at the same time and end at the same time as this occurrence,
155
+ * including at least this occurrence.
156
+ */
157
+
158
+ feature thatOccurrence: Occurrence[1] subsets longerOccurrence;
159
+ feature thisOccurrence: Occurrence[1] subsets shorterOccurrence;
160
+
161
+ /* timeCoincidentOccurrences occurrences happen during each other. */
162
+ connector :HappensDuring
163
+ from [1] shorterOccurrence references thisOccurrence
164
+ to [1] longerOccurrence references thatOccurrence;
165
+
166
+ /* timeCoincidentOccurrences is transitive */
167
+ subset thatOccurrence.timeCoincidentOccurrences
168
+ subsets thisOccurrence.timeCoincidentOccurrences;
169
+ }
170
+
171
+ feature spaceEnclosedOccurrences: Occurrence[1..*] subsets occurrences {
172
+ doc
173
+ /*
174
+ * Occurrences that this one completely includes in space (not necessarily in time),
175
+ * including this one.
176
+ */
177
+
178
+ feature largerSpace: Occurrence[1] subsets that;
179
+ feature smallerSpace: Occurrence[1] subsets self;
180
+
181
+ /* spaceEnclosedOccurrences is transitive. */
182
+ subset smallerSpace.spaceEnclosedOccurrences subsets largerSpace.spaceEnclosedOccurrences;
183
+
184
+ /* smallerSpace are outside occurrences that are outside their largerSpace */
185
+ subset smallerSpace.outsideOfOccurrences subsets largerSpace.outsideOfOccurrences;
186
+ }
187
+
188
+ feature all spaceTimeEnclosedOccurrences: Occurrence[1..*] subsets timeEnclosedOccurrences, spaceEnclosedOccurrences
189
+ intersects timeEnclosedOccurrences, spaceEnclosedOccurrences {
190
+ doc
191
+ /*
192
+ * Occurrences that this one completely includes in both space and time,
193
+ * including this one.
194
+ */
195
+
196
+ /* spaceTimeEnclosedOccurrences is transitive */
197
+ subset largerSpace.spaceTimeEnclosedOccurrences subsets smallerSpace.spaceTimeEnclosedOccurrences;
198
+ }
199
+
200
+ feature all spaceTimeEnclosedPoints : Occurrence[1..*] subsets spaceTimeEnclosedOccurrences {
201
+ doc
202
+ /*
203
+ * All space time enclosed occurrences that take up zero time and space.
204
+ */
205
+
206
+ redefines innerSpaceDimension = 0;
207
+ binding [1] startShot = [1] endShot;
208
+ }
209
+
210
+ feature spaceTimeCoincidentOccurrences: Occurrence[1..*]
211
+ subsets timeCoincidentOccurrences, spaceEnclosedOccurrences, spaceTimeEnclosedOccurrences
212
+ intersects timeCoincidentOccurrences, spaceEnclosedOccurrences inverse of spaceTimeCoincidentOccurrences {
213
+ doc
214
+ /*
215
+ * Occurrences that this one completely includes in both space and time,
216
+ * and vice-versa, including this one.
217
+ */
218
+
219
+ feature redefines thatOccurrence subsets largerSpace;
220
+ feature redefines thisOccurrence subsets smallerSpace;
221
+
222
+ /* spaceTimeCoincidentOccurrences occurrences are inside of each other. */
223
+ connector :InsideOf
224
+ from [1] largerSpace references thatOccurrence
225
+ to [1] smallerSpace references thisOccurrence;
226
+
227
+ /* spaceTimeCoincidentOccurrences is transitive */
228
+ subset thatOccurrence.spaceTimeCoincidentOccurrences
229
+ subsets thisOccurrence.spaceTimeCoincidentOccurrences;
230
+ }
231
+
232
+ feature outsideOfOccurrences: Occurrence[0..*] subsets withoutOccurrences inverse of outsideOfOccurrences {
233
+ doc
234
+ /*
235
+ * Occurrences that do not overlap in space (not necessarily in time, see successors).
236
+ */
237
+ }
238
+
239
+ feature justOutsideOfOccurrences: Occurrence[0..*] subsets outsideOfOccurrences inverse of justOutsideOfOccurrences {
240
+ doc
241
+ /*
242
+ * Occurrences that have no space between some of their space slices and some space slices of this occurrence.
243
+ */
244
+
245
+ feature separateSpaceToo: Occurrence[1] subsets that;
246
+ feature separateSpace: Occurrence[1] subsets self;
247
+
248
+ connector :MatesWith [1..*]
249
+ from [0..*] separateSpaceToo references separateSpaceToo.spaceSlices
250
+ to [0..*] separateSpace references separateSpace.spaceSlices;
251
+ }
252
+
253
+ feature matingOccurrences: Occurrence[1..*] subsets justOutsideOfOccurrences inverse of matingOccurrences {
254
+ doc
255
+ /*
256
+ * Occurrences that have no space between them and this one.
257
+ */
258
+
259
+ feature matingSpaceToo: Occurrence[1] subsets that;
260
+ feature matingSpace: Occurrence[1] subsets self;
261
+ feature matingOccurrence: Occurrence [1] {
262
+ portion feature redefines spaceBoundary [1];
263
+ inv { contains(unionsOf, union(matingSpaceToo, matingSpace)) }
264
+ portion feature redefines spaceInterior [0];
265
+ }
266
+ }
267
+
268
+ feature innerSpaceDimension : Natural [1] {
269
+ doc
270
+ /*
271
+ * The number of variables needed to identify space points in this occurrence, from 0
272
+ * to 3, without regard to higher dimensional spaces it might be embedded in.
273
+ */
274
+ }
275
+
276
+ inv { innerSpaceDimension <= 3 }
277
+
278
+ feature outerSpaceDimension : Natural [0..1] {
279
+ doc
280
+ /*
281
+ * For occurrences of innerSpaceDimension 1 or 2, the number of variables needed to
282
+ * identify their space points in higher dimensions they might be embedded in, from
283
+ * the innerSpaceDimension to 3. An outerSpaceDimension equal to innerSpaceDimension
284
+ * indicates the occurrence is spatially straight (innerSpaceDimension 1 embedded in
285
+ * 2 or 3 dimensions) or flat (innerSpaceDimension 2 embedded in 3 dimensions).
286
+ */
287
+ }
288
+ inv { notEmpty(outerSpaceDimension) implies
289
+ (outerSpaceDimension >= innerSpaceDimension & outerSpaceDimension <= 3) }
290
+
291
+ portion feature all portions: Occurrence[1..*] subsets spaceTimeEnclosedOccurrences {
292
+ doc
293
+ /*
294
+ * All spaceTimeEnclosedOccurrences that have the same portionOfLife (considered the same
295
+ * thing occurring).
296
+ */
297
+
298
+ portion redefines portionOfLife = (that as Occurrence).portionOfLife;
299
+ }
300
+
301
+ feature portionOf : Occurrence[1..*] inverse of portions {
302
+ doc
303
+ /*
304
+ * Occurrences of which this occurrence is a portion, including at
305
+ * least this occurrence.
306
+ */
307
+ }
308
+
309
+ portion feature timeSlices: Occurrence[1..*] subsets portions {
310
+ doc
311
+ /*
312
+ * Portions of an occurrence taking up all of its space over some period of time,
313
+ * including at least this occurrence.
314
+ */
315
+ }
316
+
317
+ feature timeSliceOf : Occurrence[1..*] subsets portionOf inverse of timeSlices {
318
+ doc
319
+ /*
320
+ * Occurrences of which this occurrence is a time slice, including at least this
321
+ * occurrence.
322
+ */
323
+
324
+ feature timeSliceOccurrence: Occurrence[1] subsets that;
325
+ feature timeSlicedOccurrence: Occurrence[1] subsets self;
326
+
327
+ /* timeSliceOf is transitive */
328
+ subset timeSlicedOccurrence.timeSliceOf subsets timeSliceOccurrence.timeSliceOf;
329
+ }
330
+
331
+ portion feature all snapshots: Occurrence[1..*] subsets timeSlices {
332
+ doc
333
+ /*
334
+ * Time slices of an occurrence that happen at a single instant of time
335
+ * (i.e., have no duration).
336
+ */
337
+ binding [1] startShot = [1] endShot;
338
+ }
339
+ inv { snapshots == union(startShot, union(middleTimeSlice.snapshots, endShot)) }
340
+
341
+ feature snapshotOf : Occurrence[0..*] subsets timeSliceOf inverse of snapshots {
342
+ doc
343
+ /*
344
+ * Occurrences of which this occurrence is a snapshot.
345
+ */
346
+ }
347
+
348
+ portion feature startShot: Occurrence[1] subsets snapshots {
349
+ doc
350
+ /*
351
+ * The snapshot representing the start of the occurrence in time.
352
+ */
353
+ }
354
+
355
+ portion feature middleTimeSlice: Occurrence[0..1] subsets timeSlices {
356
+ doc
357
+ /*
358
+ * A time slice that takes all the time between the start shot and end shot. There
359
+ * is none when the startShot and endShot are the same.
360
+ */
361
+ }
362
+ inv { isEmpty((that as Occurrence).middleTimeSlice) == ((that as Occurrence).startShot == (that as Occurrence).endShot) }
363
+
364
+ connector :HappensJustBefore
365
+ from [1] earlierOccurrence references startShot
366
+ to [0..1] laterOccurrence references middleTimeSlice {
367
+ doc
368
+ /*
369
+ * The startShot happens immediately before the middle time slice.
370
+ */
371
+ }
372
+
373
+ portion feature endShot: Occurrence[1] subsets snapshots {
374
+ doc
375
+ /*
376
+ * The snapshot at the end of the occurrence in time.
377
+ */
378
+
379
+ /* suboccurrences at the end of an Occurrence must also end. */
380
+ feature subendshot : Occurrence [0..*] chains self.suboccurrences.endShot {
381
+ feature superendshot : Occurrence [1] subsets that;
382
+ subset superendshot subsets self.timeCoincidentOccurrences; }
383
+ }
384
+
385
+ connector :HappensJustBefore
386
+ from [0..1] earlierOccurrence references middleTimeSlice
387
+ to [1] laterOccurrence references endShot {
388
+ doc
389
+ /*
390
+ * The endShot happens after the middle time slice.
391
+ */
392
+ }
393
+
394
+ portion feature spaceSlices: Occurrence[1..*] subsets portions {
395
+ doc
396
+ /*
397
+ * Portions of this occurrence that extend for exactly the same time and some or all
398
+ * the space, relative to spatial location of this occurrence, including at least
399
+ * this occurrence.
400
+ */
401
+ }
402
+
403
+ feature spaceSliceOf: Occurrence[1..*] subsets portionOf inverse of spaceSlices {
404
+ doc
405
+ /*
406
+ * Occurrences of which this occurrence is a space slice, including at least this
407
+ * occurrence.
408
+ */
409
+
410
+ feature spaceSliceOccurrence: Occurrence[1] subsets that;
411
+ feature spaceSlicedOccurrence: Occurrence[1] subsets self;
412
+ inv { spaceSliceOccurrence.innerSpaceDimension <= spaceSlicedOccurrence.innerSpaceDimension }
413
+
414
+ /* spaceSliceOf is transitive */
415
+ subset spaceSlicedOccurrence.spaceSliceOf subsets spaceSliceOccurrence.spaceSliceOf;
416
+ }
417
+
418
+ portion feature spaceShots: Occurrence[1..*] subsets spaceSlices {
419
+ doc
420
+ /*
421
+ * All spaceSlices of this occurrence that are of a lower inner space dimension than it.
422
+ */
423
+ }
424
+
425
+ feature all spaceShotOf: Occurrence[0..*] subsets spaceSliceOf inverse of spaceShots {
426
+ doc
427
+ /*
428
+ * All occurrences of which this occurrence is a space shot.
429
+ */
430
+
431
+ feature spaceShotOccurrence: Occurrence[1] subsets that;
432
+ feature spaceShottedOccurrence: Occurrence[1] subsets self;
433
+ inv { spaceShotOccurrence.innerSpaceDimension < spaceShottedOccurrence.innerSpaceDimension }
434
+
435
+ /* spaceShotOf is transitive */
436
+ subset spaceShottedOccurrence.spaceShotOf subsets spaceShotOccurrence.spaceShotOf;
437
+ }
438
+
439
+ feature unionsOf: Set[0..*] {
440
+ doc
441
+ /*
442
+ * Sets of occurrences, where the time and space taken by all the occurrences in each
443
+ * set together is the same as taken by this occurrence (all four dimensional points in
444
+ * the occurrences of each set are at the same time and space as those of this
445
+ * occurrence).
446
+ */
447
+
448
+ feature redefines elements: Occurrence[0..*];
449
+ feature union: Occurrence[0..1];
450
+
451
+ connector :Within
452
+ from [0..*] smallerOccurrence references elements
453
+ to [1] largerOccurrence references union;
454
+ connector :Within
455
+ from [0..*] smallerOccurrence references union.spaceTimeEnclosedPoints
456
+ to [1..*] largerOccurrence references elements;
457
+ }
458
+ binding [0..1] unionsOf.union = [1] self;
459
+
460
+ feature intersectionsOf: Set[0..*] {
461
+ doc
462
+ /*
463
+ * Sets of occurrences, where the time and space taken in common between the occurrences
464
+ * in each set is at the same as taken by this occurrence (all four dimensional points
465
+ * common to the occurrences in each set are at the same time and space as those in this
466
+ * occurrence).
467
+ */
468
+
469
+ feature redefines elements: Occurrence[0..*] {
470
+ feature all notIntersection: Occurrence[0..*] subsets spaceTimeEnclosedPoints;
471
+ }
472
+ feature intersection: Occurrence[0..1];
473
+
474
+ connector :Within
475
+ from [1] smallerOccurrence references intersection
476
+ to [0..*] largerOccurrence references elements;
477
+ connector :Without
478
+ from [0..*] separateOccurrenceToo references elements.notIntersection
479
+ to [1] separateOccurrence references intersection;
480
+ connector :Without
481
+ from [0..*] separateOccurrenceToo references elements.notIntersection
482
+ to [1..*] separateOccurrence references elements;
483
+ }
484
+ binding [0..1] intersectionsOf.intersection = [1] self;
485
+
486
+ feature differencesOf: OrderedSet[0..*] {
487
+ doc
488
+ /*
489
+ * Ordered sets of occurrences, where the time and space taken by first occurrence in
490
+ * each set that is not in the time and space taken by the remaining occurrences is the
491
+ * same as taken by this occurrence (all four dimensional points in the minuend that are
492
+ * not in any subtrahend are at the same time and space as those in this occurrence).
493
+ */
494
+ feature redefines elements: Occurrence[0..*];
495
+ feature difference: Occurrence[0..1];
496
+ feature minuend: Occurrence [0..1] subsets elements, interdiff.elements = head(elements);
497
+ feature subtrahend: Occurrence[*] subsets elements = tail(elements);
498
+ feature interdiff: Set [0..1] {
499
+ feature redefines elements: Occurrence[1..*];
500
+ feature all notSubtrahend: Occurrence [0..*] subsets elements;
501
+ }
502
+
503
+ connector :Without
504
+ from [0..*] separateOccurrenceToo references interdiff.notSubtrahend
505
+ to [1..*] separateOccurrence references subtrahend;
506
+
507
+ inv { isEmpty(difference) == isEmpty(interdiff) }
508
+ inv { notEmpty(difference) implies (difference.intersectionsOf == interdiff) }
509
+ }
510
+ binding [0..1] differencesOf.difference = [1] self;
511
+
512
+ portion feature spaceInterior: Occurrence[0..1] subsets spaceSlices {
513
+ doc
514
+ /*
515
+ * A space slice of this occurrence that includes all its space shots except the
516
+ * space boundary, which must exist and be outsideOf it. The space interior must be
517
+ * of the same inner space dimension as this occurrence, except if it is zero,
518
+ * whereupon there is no space interior.
519
+ */
520
+ }
521
+
522
+ feature spaceInteriorOf: Occurrence[0..1] subsets spaceSliceOf inverse of spaceInterior {
523
+ doc
524
+ /*
525
+ * An Occurrence of which this one is the space interior.
526
+ */
527
+ }
528
+
529
+ inv { notEmpty(spaceInterior) implies spaceInterior.innerSpaceDimension == innerSpaceDimension }
530
+
531
+ portion feature spaceBoundary: Occurrence[0..1] subsets spaceShots {
532
+ doc
533
+ /*
534
+ * The space shot of this Occurrence that is not among those of its space interior,
535
+ * which must be outside it. It must not have a spaceBoundary. It can be divided
536
+ * into space slices that also have no spaceBoundary, where the outer one surrounds
537
+ * the inner ones.
538
+ */
539
+
540
+ inv { isClosed == true }
541
+
542
+ feature spaceBounder: Occurrence [1] subsets self;
543
+
544
+ feature outer: Occurrence [0..1] subsets spaceSlices {
545
+ feature redefines isClosed = true;
546
+ feature redefines innerSpaceDimension = spaceBounder.innerSpaceDimension;
547
+ }
548
+
549
+ feature inner: Occurrence [0..*] subsets spaceSlices {
550
+ feature redefines isClosed = true;
551
+ feature redefines innerSpaceDimension = spaceBounder.innerSpaceDimension;
552
+ }
553
+
554
+ inv { notEmpty(inner) implies notEmpty(outer) }
555
+ inv { notEmpty(outer) implies
556
+ contains(unionsOf, union(outer, inner)) }
557
+ }
558
+
559
+ feature spaceBoundaryOf: Occurrence[0..*] subsets spaceShotOf inverse of spaceBoundary {
560
+ doc
561
+ /*
562
+ * An Occurrence of which this one is the space boundary.
563
+ */
564
+
565
+ feature spaceBounderOf: Occurrence subsets self;
566
+ inv { spaceBounderOf.spaceBoundary == that.that }
567
+ }
568
+
569
+ inv { not isClosed implies contains((that as Occurrence).unionsOf, union(spaceBoundary, spaceInterior)) }
570
+ inv { innerSpaceDimension == 0 implies isEmpty(spaceBoundary) }
571
+
572
+ connector :SurroundedBy
573
+ from [0..*] surroundedSpace references spaceInterior
574
+ to [1] surroundingSpace references spaceBoundary.outer;
575
+
576
+ connector :SurroundedBy
577
+ from [0..*] surroundedSpace references spaceBoundary.inner
578
+ to [1] surroundingSpace references spaceInterior;
579
+
580
+ feature innerSpaceOccurrences: Occurrence [0..*] subsets outsideOfOccurrences {
581
+ doc
582
+ /*
583
+ * Occurrences that completely occupy the space surrounded by an inner space boundary of this occurrence.
584
+ */
585
+
586
+ feature redefines innerSpaceOccurrences [0];
587
+
588
+ /* innerSpace is the spaceInterior of hOccurrence, which is formed from an inner space boundary of outerSpace. */
589
+ feature outerSpace: Occurrence[1] subsets that;
590
+ feature innerSpace: Occurrence[1] subsets self;
591
+ feature hOccurrence: Occurrence [1];
592
+ connector hbi: WithinBoth [0..1] from [0..1] hOccurrence.spaceBoundary to [0..1] outerSpace.spaceBoundary.inner;
593
+ connector hbo: WithinBoth [0..1] from [0..1] hOccurrence.spaceBoundary to [0..1] outerSpace;
594
+ connector :WithinBoth from [1] hOccurrence.spaceInterior to [1] innerSpace;
595
+ inv { (isEmpty(hbi) == notEmpty(hbo)) & (notEmpty(hbo) == outerSpace.isClosed) }
596
+ }
597
+
598
+ feature surroundedByOccurrences: Occurrence [0..*] subsets outsideOfOccurrences {
599
+ doc
600
+ /*
601
+ * Occurrences that have inner spaces that completely include this occurrence.
602
+ */
603
+
604
+ feature surroundedSpace: Occurrence [1] subsets that;
605
+ feature surroundingSpace: Occurrence [1] subsets self;
606
+
607
+ connector :InsideOf
608
+ from [0..1] smallerOccurrence references surroundedSpace
609
+ to [1..*] largerOccurrence references surroundingSpace.innerSpaceOccurrences;
610
+ }
611
+
612
+ feature isClosed : Boolean [1] {
613
+ doc
614
+ /*
615
+ * Tells whether an occurrence has a spaceBoundary, true if it does, false otherwise.
616
+ */
617
+ }
618
+ inv { isClosed == isEmpty((that as Occurrence).spaceBoundary) }
619
+
620
+ var feature incomingTransfers: Transfers::Transfer[0..*] subsets Transfers::transfers {
621
+ doc
622
+ /*
623
+ * The incoming transfers received by this occurrence.
624
+ */
625
+
626
+ end feature redefines source;
627
+ end feature redefines target;
628
+ }
629
+
630
+ feature isDispatch : Boolean[1] default false {
631
+ doc
632
+ /*
633
+ * Determines whether transfers to the dispatch scope might be accepted more than once.
634
+ */
635
+ }
636
+ feature dispatchScope: Occurrence [1] default self;
637
+ connector :HappensDuring from [1] self to [1] dispatchScope;
638
+
639
+ feature isRunToCompletion: Boolean [1] default true {
640
+ doc
641
+ /*
642
+ * Determines whether transition performances might happen during state entry performances
643
+ * within the run to completion scope.
644
+ */
645
+ }
646
+ feature runToCompletionScope: Occurrence [1] default self;
647
+ connector :HappensDuring from [1] self to [1] runToCompletionScope;
648
+
649
+ feature incomingTransferSort : IncomingTransferSort [0..*] default earlierFirstIncomingTransferSort {
650
+ doc
651
+ /*
652
+ * Determines which transfer to accept when multiple are available and which of the unaccepted
653
+ * transfers are never to be accepted (dispatched).
654
+ */
655
+ }
656
+
657
+ var feature all incomingTransfersToSelf subsets incomingTransfers {
658
+ doc
659
+ /*
660
+ * The incoming transfers with this occurrence as the target.
661
+ */
662
+
663
+ end feature redefines source;
664
+ end feature redefines target = that;
665
+ }
666
+
667
+ var feature outgoingTransfers: Transfers::Transfer[0..*] subsets Transfers::transfers {
668
+ doc
669
+ /*
670
+ * The outgoing transfers sent from this occurrence.
671
+ */
672
+
673
+ end feature redefines source;
674
+ end feature redefines target;
675
+ }
676
+
677
+ var feature all outgoingTransfersFromSelf subsets outgoingTransfers {
678
+ doc
679
+ /*
680
+ * The outgoing transfers with this occurrence as the source.
681
+ */
682
+
683
+ end feature redefines source = that;
684
+ end feature redefines target;
685
+ }
686
+ }
687
+
688
+ abstract class all Life specializes Occurrence {
689
+ binding portionOf = self {
690
+ doc
691
+ /*
692
+ * Lives are only portions of themselves.
693
+ */
694
+ }
695
+ }
696
+
697
+ abstract feature occurrences: Occurrence[0..*] nonunique subsets things;
698
+
699
+ predicate IncomingTransferSort specializes Performances::BooleanEvaluation {
700
+ in t1: Transfers::Transfer [1];
701
+ in t2: Transfers::Transfer [1];
702
+ return t1First: Boolean [1];
703
+ }
704
+
705
+ bool earlierFirstIncomingTransferSort : IncomingTransferSort {
706
+ return t1First = includes(t1.endShot.successors, t2.endShot);
707
+ }
708
+
709
+ assoc all SelfSameLifeLink specializes BinaryLink {
710
+ doc
711
+ /*
712
+ * SelfSameLifeLink is a binary association that is equivalent to SelfLink if the
713
+ * linked things are DataValues, but asserts that the linked things are portions of
714
+ * the same Life if they are Occurrences.
715
+ */
716
+
717
+ end myselfSameLives [1..*] feature myselfSameLife: Anything redefines source;
718
+ end selfSameLives [1..*] feature selfSameLife: Anything redefines target;
719
+
720
+ feature all sourceOccurrence : Occurrence [0..1] subsets myselfSameLife;
721
+ feature all targetOccurrence : Occurrence [0..1] subsets selfSameLife, sourceOccurrence.sameLifeOccurrences;
722
+ binding oSelf of sourceOccurrence.portionOfLife = targetOccurrence.portionOfLife;
723
+
724
+ feature all sourceDataValue : DataValue [0..1] subsets myselfSameLife;
725
+ feature all targetDataValue : DataValue [0..1] subsets selfSameLife;
726
+ binding dSelf of sourceDataValue = targetDataValue;
727
+ }
728
+
729
+ subclassifier SelfLink specializes SelfSameLifeLink;
730
+
731
+ assoc HappensLink specializes BinaryLink disjoint from Occurrence {
732
+ doc
733
+ /*
734
+ * HappensLink is the most general associations that assert temporal relationships between a
735
+ * sourceOccurrence and a targetOccurrence. Because HappensLinks assert temporal
736
+ * relationships, they cannot also be Occurrences that happen in time. Therefore
737
+ * HappensLink is disjoint with LinkObject, that is, no HappensLink can also be a
738
+ * LinkObject.
739
+ */
740
+
741
+ end feature sourceOccurrence: Occurrence redefines BinaryLink::source;
742
+ end feature targetOccurrence: Occurrence redefines BinaryLink::target;
743
+ }
744
+
745
+ assoc all HappensDuring specializes HappensLink {
746
+ doc
747
+ /*
748
+ * HappensDuring asserts that the shorterOccurrence happens during the longerOccurrence.
749
+ * That is, the time interval of the shorterOccurrence is completely within that of the
750
+ * longerOccurrence, or every snapshot of the shorterOccurrence happens while (at the
751
+ * same time as) some snapshot of the longerOccurrence. Note that this means every
752
+ * Occurrence HappensDuring itself and that HappensDuring is transitive.
753
+ */
754
+
755
+ end feature shorterOccurrence: Occurrence redefines sourceOccurrence crosses longerOccurrence.timeEnclosedOccurrences;
756
+ end happensDuring [1..*] feature longerOccurrence: Occurrence redefines targetOccurrence;
757
+ }
758
+
759
+ assoc all HappensWhile specializes HappensDuring {
760
+ doc
761
+ /*
762
+ * HappensWhile asserts that two occurrences happen during each other, that is, they
763
+ * each start at the same time and end at the same time.
764
+ */
765
+
766
+ end feature thisOccurrence: Occurrence redefines shorterOccurrence crosses thatOccurrence.timeCoincidentOccurrences;
767
+ end happensWhile [1..*] subsets timeCoincidentOccurrences feature thatOccurrence: Occurrence redefines longerOccurrence;
768
+ }
769
+
770
+ assoc SpaceLink specializes BinaryLink disjoint from Occurrence {
771
+ doc
772
+ /*
773
+ * SpaceLink is the most general association that asserts spatial relationships between a
774
+ * sourceOccurrence and a targetOccurrence. Because SpaceLinks assert spatial
775
+ * relationships, they cannot also be Occurrences that happen in space. Therefore
776
+ * SpaceLink is disjoint with LinkObject, that is, no SpaceLink can also be a
777
+ * LinkObject.
778
+ */
779
+
780
+ end feature sourceOccurrence: Occurrence redefines BinaryLink::source;
781
+ end feature targetOccurrence: Occurrence redefines BinaryLink::target;
782
+ }
783
+
784
+ assoc all InsideOf specializes SpaceLink {
785
+ doc
786
+ /*
787
+ * InsideOf asserts that its largerSpace completely overlaps its smallerSpace in space (not
788
+ * necessarily in time, see HappensDuring). That is, all four dimensional points of the
789
+ * smallerSpace are in the spatial extent of the largerSpace. Note that this means every
790
+ * Occurrence is InsideOf itself and that InsideOf is transitive.
791
+ */
792
+
793
+ end feature smallerSpace: Occurrence redefines source crosses largerSpace.spaceEnclosedOccurrences;
794
+ end insideOf [1..*] feature largerSpace: Occurrence redefines target;
795
+ }
796
+
797
+ assoc all Within specializes HappensDuring, InsideOf intersects HappensDuring, InsideOf {
798
+ doc
799
+ /*
800
+ * Within asserts that its largerOccurrence completely overlaps its smallerOccurrence in
801
+ * time and space. That is, all four dimensional points of the smallerOccurrence happen
802
+ * during and are included in the space of the largerOccurrence. This means every occurrence
803
+ * is Within itself and Within is transitive.
804
+ */
805
+
806
+ end feature smallerOccurrence: Occurrence redefines shorterOccurrence, smallerSpace
807
+ crosses largerOccurrence.spaceTimeEnclosedOccurrences;
808
+ end within [1..*] feature largerOccurrence: Occurrence redefines longerOccurrence, largerSpace;
809
+ }
810
+
811
+ assoc all WithinBoth specializes Within, HappensWhile {
812
+ doc
813
+ /*
814
+ * WithinBoth asserts that two occurrences are Within each other, that is, they occupy the
815
+ * same four dimensional region. Note that this means every Occurrence is WithinBoth with
816
+ * itself and transitive.
817
+ */
818
+
819
+ end feature thisOccurrence redefines smallerOccurrence, HappensWhile::thisOccurrence
820
+ crosses thatOccurrence.spaceTimeCoincidentOccurrences;
821
+ end withinBoth subsets spaceTimeCoincidentOccurrences feature thatOccurrence redefines largerOccurrence, HappensWhile::thatOccurrence;
822
+ }
823
+
824
+ assoc all PortionOf specializes Within {
825
+ doc
826
+ /*
827
+ * PortionOf asserts one occurrence is a portion of another, including at least itself.
828
+ */
829
+
830
+ end feature portionOccurrence: Occurrence redefines smallerOccurrence crosses portionedOccurrence.portions;
831
+ end portionWithin subsets portionOf feature portionedOccurrence: Occurrence redefines largerOccurrence;
832
+ }
833
+
834
+ assoc all TimeSliceOf specializes PortionOf {
835
+ doc
836
+ /*
837
+ * TimeSliceOf asserts one occurrence is a time slice of another, including at least itself.
838
+ */
839
+
840
+ end feature timeSliceOccurrence: Occurrence redefines portionOccurrence crosses timeSlicedOccurrence.timeSlices;
841
+ end timeSliceWithin subsets timeSliceOf feature timeSlicedOccurrence: Occurrence redefines portionedOccurrence;
842
+ }
843
+
844
+ assoc all SnapshotOf specializes TimeSliceOf {
845
+ doc
846
+ /*
847
+ * SnapshotsOf asserts one occurrence is a snapshot of another.
848
+ */
849
+
850
+ end feature snapshotOccurrence: Occurrence redefines timeSliceOccurrence crosses snapshottedOccurrence.snapshots;
851
+ end snapshotWithin subsets snapshotOf feature snapshottedOccurrence: Occurrence redefines timeSlicedOccurrence;
852
+ }
853
+
854
+ assoc all SpaceSliceOf specializes PortionOf {
855
+ doc
856
+ /*
857
+ * SpaceSliceOf asserts that its spaceSliceOccurrence extends for exactly the same time and
858
+ * some or all the space of the spaceSlicedOccurrence and that the spaceSliceOccurrence is
859
+ * of the same of lower innerSpaceDimension than the spaceSliceOccurrence. Note that this
860
+ * means every occurrence is a SpaceSliceOf itself and SpaceSliceOf is transitive.
861
+ */
862
+
863
+ end feature spaceSliceOccurrence: Occurrence redefines portionOccurrence crosses spaceSlicedOccurrence.spaceSlices;
864
+ end spaceSliceWithin subsets spaceSliceOf feature spaceSlicedOccurrence: Occurrence redefines portionedOccurrence;
865
+ }
866
+
867
+ assoc all SpaceShotOf specializes SpaceSliceOf {
868
+ doc
869
+ /*
870
+ * SpaceShotOf asserts that its spaceShotOccurrence is of a lower inner space dimension than
871
+ * it spaceShottedOccurrence.
872
+ */
873
+
874
+ end feature spaceShotOccurrence: Occurrence redefines spaceSliceOccurrence crosses spaceShottedOccurrence.spaceShots;
875
+ end spaceShotWithin subsets spaceSliceOf feature spaceShottedOccurrence: Occurrence redefines spaceSlicedOccurrence;
876
+ }
877
+
878
+ assoc all Without specializes BinaryLink unions HappensBefore, OutsideOf {
879
+ doc
880
+ /*
881
+ * Without is the most general association that asserts complete separation (no overlap) in
882
+ * either space or time, or both, between two occurrences. That is, no four dimensional
883
+ * points are in both occurrences. Note that this means no Occurrence is Without itself.
884
+ */
885
+
886
+ end feature separateOccurrenceToo: Occurrence redefines BinaryLink::source
887
+ crosses separateOccurrence.withoutOccurrences;
888
+ end feature separateOccurrence: Occurrence redefines BinaryLink::target
889
+ crosses separateOccurrenceToo.withoutOccurrences;
890
+ }
891
+
892
+ assoc all HappensBefore specializes HappensLink, Without {
893
+ doc
894
+ /*
895
+ * HappensBefore asserts that the earlierOccurrence is completely separated in time (not
896
+ * necessarily in space, see OutsideOf), with the earlierOccurrence happening completely
897
+ * before the laterOccurrence. That is, no snapshot of the earlierOccurrence happens at the
898
+ * same time as any snapshot of the laterOccurrence, with all snapshots of earlierOccurrence
899
+ * happening before those the laterOccurrence, including the endShot of the earlierOccurrence
900
+ * and startShot of the laterOccurrence. Note that this means no Occurrence HappensBefore
901
+ * itself.
902
+ */
903
+
904
+ end feature earlierOccurrence: Occurrence redefines sourceOccurrence, separateOccurrenceToo
905
+ crosses laterOccurrence.predecessors;
906
+ end feature laterOccurrence: Occurrence redefines targetOccurrence, separateOccurrence
907
+ crosses earlierOccurrence.successors;
908
+ }
909
+
910
+ assoc all HappensJustBefore specializes HappensBefore {
911
+ doc
912
+ /*
913
+ * HappensJustBefore is HappensBefore asserting that there is no possibility of another
914
+ * occurrences happening in the time between the earlierOccurrence and laterOccurrence.
915
+ */
916
+
917
+ end feature redefines earlierOccurrence: Occurrence crosses laterOccurrence.immediatePredecessors;
918
+ end feature redefines laterOccurrence: Occurrence crosses earlierOccurrence.immediateSuccessors;
919
+ }
920
+
921
+ feature all happensBeforeLinks: HappensBefore[0..*] nonunique subsets binaryLinks {
922
+ doc
923
+ /*
924
+ * happensBeforeLinks is a specialization of binaryLinks restricted to type HappensBefore.
925
+ * It is the default subsetting for succession connectors.
926
+ */
927
+
928
+ end feature earlierOccurrence: Occurrence redefines HappensBefore::earlierOccurrence, binaryLinks::source;
929
+ end feature laterOccurrence: Occurrence redefines HappensBefore::laterOccurrence, binaryLinks::target;
930
+ }
931
+
932
+ assoc all OutsideOf specializes SpaceLink, Without {
933
+ doc
934
+ /*
935
+ * OutsideOf asserts that two occurrences do not overlap in space (not necessarily in time,
936
+ * see HappensBefore). That is, no four dimensional points of the occurrences are in the
937
+ * spatial extent of both of them. This means no Occurrence is OutsideOf itself.
938
+ */
939
+
940
+ end feature separateSpaceToo: Occurrence redefines sourceOccurrence, separateOccurrenceToo
941
+ crosses separateSpace.outsideOfOccurrences;
942
+ end feature separateSpace: Occurrence redefines targetOccurrence, separateOccurrence
943
+ crosses separateSpaceToo.outsideOfOccurrences;
944
+ }
945
+
946
+ assoc all JustOutsideOf specializes OutsideOf {
947
+ doc
948
+ /*
949
+ * JustOutsideOf is an OutsideOf asserting that two occurrences have some space slices with
950
+ * no space between them.
951
+ */
952
+
953
+ end feature redefines separateSpaceToo: Occurrence
954
+ crosses separateSpace.justOutsideOfOccurrences;
955
+ end feature redefines separateSpace: Occurrence
956
+ crosses separateSpaceToo.justOutsideOfOccurrences;
957
+ }
958
+
959
+ assoc all MatesWith specializes JustOutsideOf {
960
+ doc
961
+ /*
962
+ * MatesWith is an OutsideOf asserting that two occurrences have no space between them.
963
+ */
964
+
965
+ end feature matingSpaceToo: Occurrence redefines separateSpaceToo
966
+ crosses matingSpace.matingOccurrences;
967
+ end feature matingSpace: Occurrence redefines separateSpace
968
+ crosses matingSpaceToo.matingOccurrences;
969
+ }
970
+
971
+ assoc all InnerSpaceOf specializes OutsideOf {
972
+ doc
973
+ /*
974
+ * InnerSpaceOf is an OutsideOf asserting that the space surrounded by an inner space boundary
975
+ * of one occurrence (outer space) is completely occupied by another occurrence (inner space).
976
+ */
977
+
978
+ end feature outerSpace: Occurrence redefines separateSpaceToo;
979
+ end feature innerSpace: Occurrence redefines separateSpace crosses outerSpace.innerSpaceOccurrences;
980
+ }
981
+
982
+ assoc all SurroundedBy specializes OutsideOf {
983
+ doc
984
+ /*
985
+ * SurroundedBy is an OutsideOf asserting that one occurrence (surrounded space) is included
986
+ * in space by an inner space occurrence of another (surrounding space).
987
+ */
988
+
989
+ end feature surroundedSpace: Occurrence redefines separateSpaceToo;
990
+ end feature surroundingSpace: Occurrence redefines separateSpace crosses surroundedSpace.surroundedByOccurrences;
991
+ }
992
+ }