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.
- package/README.md +71 -0
- package/dist/bin/cli.d.ts +6 -0
- package/dist/bin/cli.d.ts.map +1 -0
- package/dist/bin/cli.js +61 -0
- package/dist/bin/cli.js.map +1 -0
- package/dist/mcp/index.d.ts +3 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +8 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/src/cli/commands.d.ts +22 -0
- package/dist/src/cli/commands.d.ts.map +1 -0
- package/dist/src/cli/commands.js +87 -0
- package/dist/src/cli/commands.js.map +1 -0
- package/dist/src/discovery/find-sysml.d.ts +16 -0
- package/dist/src/discovery/find-sysml.d.ts.map +1 -0
- package/dist/src/discovery/find-sysml.js +30 -0
- package/dist/src/discovery/find-sysml.js.map +1 -0
- package/dist/src/discovery/load-order.d.ts +11 -0
- package/dist/src/discovery/load-order.d.ts.map +1 -0
- package/dist/src/discovery/load-order.js +85 -0
- package/dist/src/discovery/load-order.js.map +1 -0
- package/dist/src/graph/connection.d.ts +6 -0
- package/dist/src/graph/connection.d.ts.map +1 -0
- package/dist/src/graph/connection.js +7 -0
- package/dist/src/graph/connection.js.map +1 -0
- package/dist/src/graph/graph-store.d.ts +37 -0
- package/dist/src/graph/graph-store.d.ts.map +1 -0
- package/dist/src/graph/graph-store.js +108 -0
- package/dist/src/graph/graph-store.js.map +1 -0
- package/dist/src/graph/schema.d.ts +13 -0
- package/dist/src/graph/schema.d.ts.map +1 -0
- package/dist/src/graph/schema.js +21 -0
- package/dist/src/graph/schema.js.map +1 -0
- package/dist/src/index.d.ts +14 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +14 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/indexer/indexer.d.ts +20 -0
- package/dist/src/indexer/indexer.d.ts.map +1 -0
- package/dist/src/indexer/indexer.js +56 -0
- package/dist/src/indexer/indexer.js.map +1 -0
- package/dist/src/indexer/pipeline-phases.d.ts +8 -0
- package/dist/src/indexer/pipeline-phases.d.ts.map +1 -0
- package/dist/src/indexer/pipeline-phases.js +14 -0
- package/dist/src/indexer/pipeline-phases.js.map +1 -0
- package/dist/src/mcp/resources/context.d.ts +6 -0
- package/dist/src/mcp/resources/context.d.ts.map +1 -0
- package/dist/src/mcp/resources/context.js +45 -0
- package/dist/src/mcp/resources/context.js.map +1 -0
- package/dist/src/mcp/resources/schema.d.ts +6 -0
- package/dist/src/mcp/resources/schema.d.ts.map +1 -0
- package/dist/src/mcp/resources/schema.js +14 -0
- package/dist/src/mcp/resources/schema.js.map +1 -0
- package/dist/src/mcp/server.d.ts +8 -0
- package/dist/src/mcp/server.d.ts.map +1 -0
- package/dist/src/mcp/server.js +175 -0
- package/dist/src/mcp/server.js.map +1 -0
- package/dist/src/mcp/tools/clean-index.d.ts +12 -0
- package/dist/src/mcp/tools/clean-index.d.ts.map +1 -0
- package/dist/src/mcp/tools/clean-index.js +22 -0
- package/dist/src/mcp/tools/clean-index.js.map +1 -0
- package/dist/src/mcp/tools/context.d.ts +14 -0
- package/dist/src/mcp/tools/context.d.ts.map +1 -0
- package/dist/src/mcp/tools/context.js +51 -0
- package/dist/src/mcp/tools/context.js.map +1 -0
- package/dist/src/mcp/tools/cypher.d.ts +13 -0
- package/dist/src/mcp/tools/cypher.d.ts.map +1 -0
- package/dist/src/mcp/tools/cypher.js +25 -0
- package/dist/src/mcp/tools/cypher.js.map +1 -0
- package/dist/src/mcp/tools/generate-map.d.ts +13 -0
- package/dist/src/mcp/tools/generate-map.d.ts.map +1 -0
- package/dist/src/mcp/tools/generate-map.js +96 -0
- package/dist/src/mcp/tools/generate-map.js.map +1 -0
- package/dist/src/mcp/tools/impact.d.ts +14 -0
- package/dist/src/mcp/tools/impact.d.ts.map +1 -0
- package/dist/src/mcp/tools/impact.js +47 -0
- package/dist/src/mcp/tools/impact.js.map +1 -0
- package/dist/src/mcp/tools/index-db-graph.d.ts +14 -0
- package/dist/src/mcp/tools/index-db-graph.d.ts.map +1 -0
- package/dist/src/mcp/tools/index-db-graph.js +32 -0
- package/dist/src/mcp/tools/index-db-graph.js.map +1 -0
- package/dist/src/mcp/tools/list-indexed.d.ts +9 -0
- package/dist/src/mcp/tools/list-indexed.d.ts.map +1 -0
- package/dist/src/mcp/tools/list-indexed.js +14 -0
- package/dist/src/mcp/tools/list-indexed.js.map +1 -0
- package/dist/src/mcp/tools/query.d.ts +14 -0
- package/dist/src/mcp/tools/query.d.ts.map +1 -0
- package/dist/src/mcp/tools/query.js +47 -0
- package/dist/src/mcp/tools/query.js.map +1 -0
- package/dist/src/mcp/tools/rename.d.ts +19 -0
- package/dist/src/mcp/tools/rename.d.ts.map +1 -0
- package/dist/src/mcp/tools/rename.js +46 -0
- package/dist/src/mcp/tools/rename.js.map +1 -0
- package/dist/src/parser/lsp-client.d.ts +52 -0
- package/dist/src/parser/lsp-client.d.ts.map +1 -0
- package/dist/src/parser/lsp-client.js +230 -0
- package/dist/src/parser/lsp-client.js.map +1 -0
- package/dist/src/parser/lsp-server-path.d.ts +10 -0
- package/dist/src/parser/lsp-server-path.d.ts.map +1 -0
- package/dist/src/parser/lsp-server-path.js +29 -0
- package/dist/src/parser/lsp-server-path.js.map +1 -0
- package/dist/src/parser/symbols.d.ts +13 -0
- package/dist/src/parser/symbols.d.ts.map +1 -0
- package/dist/src/parser/symbols.js +150 -0
- package/dist/src/parser/symbols.js.map +1 -0
- package/dist/src/parser/sysml-mcp-client.d.ts +109 -0
- package/dist/src/parser/sysml-mcp-client.d.ts.map +1 -0
- package/dist/src/parser/sysml-mcp-client.js +185 -0
- package/dist/src/parser/sysml-mcp-client.js.map +1 -0
- package/dist/src/storage/clean.d.ts +15 -0
- package/dist/src/storage/clean.d.ts.map +1 -0
- package/dist/src/storage/clean.js +44 -0
- package/dist/src/storage/clean.js.map +1 -0
- package/dist/src/storage/list.d.ts +9 -0
- package/dist/src/storage/list.d.ts.map +1 -0
- package/dist/src/storage/list.js +12 -0
- package/dist/src/storage/list.js.map +1 -0
- package/dist/src/storage/location.d.ts +22 -0
- package/dist/src/storage/location.d.ts.map +1 -0
- package/dist/src/storage/location.js +36 -0
- package/dist/src/storage/location.js.map +1 -0
- package/dist/src/storage/registry.d.ts +14 -0
- package/dist/src/storage/registry.d.ts.map +1 -0
- package/dist/src/storage/registry.js +59 -0
- package/dist/src/storage/registry.js.map +1 -0
- package/dist/src/symbol-to-graph/mapping.d.ts +17 -0
- package/dist/src/symbol-to-graph/mapping.d.ts.map +1 -0
- package/dist/src/symbol-to-graph/mapping.js +102 -0
- package/dist/src/symbol-to-graph/mapping.js.map +1 -0
- package/dist/src/types.d.ts +40 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.js +35 -0
- package/dist/src/types.js.map +1 -0
- package/dist/src/worker/client.d.ts +21 -0
- package/dist/src/worker/client.d.ts.map +1 -0
- package/dist/src/worker/client.js +126 -0
- package/dist/src/worker/client.js.map +1 -0
- package/dist/src/worker/gateway.d.ts +79 -0
- package/dist/src/worker/gateway.d.ts.map +1 -0
- package/dist/src/worker/gateway.js +93 -0
- package/dist/src/worker/gateway.js.map +1 -0
- package/dist/src/worker/graph-worker.d.ts +7 -0
- package/dist/src/worker/graph-worker.d.ts.map +1 -0
- package/dist/src/worker/graph-worker.js +91 -0
- package/dist/src/worker/graph-worker.js.map +1 -0
- package/dist/src/worker/protocol.d.ts +21 -0
- package/dist/src/worker/protocol.d.ts.map +1 -0
- package/dist/src/worker/protocol.js +9 -0
- package/dist/src/worker/protocol.js.map +1 -0
- package/docs/INSTALL.md +16 -0
- package/docs/MCP_CLIENT_TEMPLATE_ANALYSIS.md +196 -0
- package/docs/MCP_INTERACTION_GUIDE.md +201 -0
- package/docs/MCP_SERVER_FOR_CURSOR.md +124 -0
- package/docs/PLAN.md +58 -0
- package/docs/PLAN_INDEPENDENT_LSP.md +145 -0
- package/docs/SKILL_DESIGN_PATTERNS.md +305 -0
- package/docs/TOOLS.md +317 -0
- package/lsp/README.md +41 -0
- package/lsp/node_modules/.bin/sysml-mcp +12 -0
- package/lsp/node_modules/.bin/sysml-mcp.cmd +9 -0
- package/lsp/node_modules/.bin/sysml-mcp.ps1 +16 -0
- package/lsp/node_modules/.package-lock.json +22 -0
- package/lsp/node_modules/sysml-v2-lsp/CHANGELOG.md +188 -0
- package/lsp/node_modules/sysml-v2-lsp/LICENSE +21 -0
- package/lsp/node_modules/sysml-v2-lsp/README.md +172 -0
- package/lsp/node_modules/sysml-v2-lsp/dist/server/mcpServer.js +167 -0
- package/lsp/node_modules/sysml-v2-lsp/dist/server/server.js +142 -0
- package/lsp/node_modules/sysml-v2-lsp/index.cjs +23 -0
- package/lsp/node_modules/sysml-v2-lsp/package.json +131 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/.project +17 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/.settings/org.eclipse.jdt.core.prefs +11 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Analysis/.meta.json +10 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Analysis/.project.json +27 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Analysis/AnalysisTooling.sysml +34 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Analysis/SampledFunctions.sysml +119 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Analysis/StateSpaceRepresentation.sysml +143 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Analysis/TradeStudies.sysml +171 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Cause and Effect/.meta.json +8 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Cause and Effect/.project.json +23 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Cause and Effect/CausationConnections.sysml +83 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Cause and Effect/CauseAndEffect.sysml +81 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Geometry/.meta.json +8 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Geometry/.project.json +27 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Geometry/ShapeItems.sysml +899 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Geometry/SpatialItems.sysml +168 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Metadata/.meta.json +10 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Metadata/.project.json +19 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Metadata/ImageMetadata.sysml +78 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Metadata/ModelingMetadata.sysml +143 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Metadata/ParametersOfInterestMetadata.sysml +39 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Metadata/RiskMetadata.sysml +100 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Quantities and Units/.meta.json +29 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Quantities and Units/.project.json +23 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Quantities and Units/ISQ.sysml +42 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Quantities and Units/ISQAcoustics.sysml +439 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Quantities and Units/ISQAtomicNuclear.sysml +2726 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Quantities and Units/ISQBase.sysml +206 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Quantities and Units/ISQCharacteristicNumbers.sysml +1991 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Quantities and Units/ISQChemistryMolecular.sysml +1353 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Quantities and Units/ISQCondensedMatter.sysml +1223 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Quantities and Units/ISQElectromagnetism.sysml +2333 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Quantities and Units/ISQInformation.sysml +958 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Quantities and Units/ISQLight.sysml +1537 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Quantities and Units/ISQMechanics.sysml +1564 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Quantities and Units/ISQSpaceTime.sysml +1169 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Quantities and Units/ISQThermodynamics.sysml +1256 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Quantities and Units/MeasurementRefCalculations.sysml +30 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Quantities and Units/MeasurementReferences.sysml +526 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Quantities and Units/Quantities.sysml +107 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Quantities and Units/QuantityCalculations.sysml +70 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Quantities and Units/SI.sysml +378 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Quantities and Units/SIPrefixes.sysml +48 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Quantities and Units/TensorCalculations.sysml +50 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Quantities and Units/Time.sysml +274 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Quantities and Units/USCustomaryUnits.sysml +260 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Quantities and Units/VectorCalculations.sysml +62 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Requirement Derivation/.meta.json +8 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Requirement Derivation/.project.json +19 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Requirement Derivation/DerivationConnections.sysml +63 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Domain Libraries/Requirement Derivation/RequirementDerivation.sysml +39 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Data Type Library/.meta.json +9 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Data Type Library/.project.json +11 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Data Type Library/Collections.kerml +147 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Data Type Library/ScalarValues.kerml +23 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Data Type Library/VectorValues.kerml +64 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Function Library/.meta.json +23 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Function Library/.project.json +15 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Function Library/BaseFunctions.kerml +80 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Function Library/BooleanFunctions.kerml +22 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Function Library/CollectionFunctions.kerml +68 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Function Library/ComplexFunctions.kerml +47 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Function Library/ControlFunctions.kerml +117 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Function Library/DataFunctions.kerml +43 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Function Library/IntegerFunctions.kerml +43 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Function Library/NaturalFunctions.kerml +27 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Function Library/NumericalFunctions.kerml +43 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Function Library/OccurrenceFunctions.kerml +154 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Function Library/RationalFunctions.kerml +49 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Function Library/RealFunctions.kerml +56 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Function Library/ScalarFunctions.kerml +33 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Function Library/SequenceFunctions.kerml +111 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Function Library/StringFunctions.kerml +25 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Function Library/TrigFunctions.kerml +35 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Function Library/VectorFunctions.kerml +273 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Semantic Library/.meta.json +22 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Semantic Library/.project.json +15 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Semantic Library/Base.kerml +95 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Semantic Library/Clocks.kerml +156 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Semantic Library/ControlPerformances.kerml +135 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Semantic Library/FeatureReferencingPerformances.kerml +190 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Semantic Library/KerML.kerml +483 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Semantic Library/Links.kerml +67 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Semantic Library/Metaobjects.kerml +58 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Semantic Library/Objects.kerml +212 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Semantic Library/Observation.kerml +161 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Semantic Library/Occurrences.kerml +992 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Semantic Library/Performances.kerml +293 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Semantic Library/SpatialFrames.kerml +197 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Semantic Library/StatePerformances.kerml +145 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Semantic Library/Transfers.kerml +281 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Semantic Library/TransitionPerformances.kerml +66 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Kernel Libraries/Kernel Semantic Library/Triggers.kerml +188 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Systems Library/.meta.json +27 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Systems Library/.project.json +19 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Systems Library/Actions.sysml +552 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Systems Library/Allocations.sysml +29 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Systems Library/AnalysisCases.sysml +38 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Systems Library/Attributes.sysml +25 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Systems Library/Calculations.sysml +37 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Systems Library/Cases.sysml +71 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Systems Library/Connections.sysml +60 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Systems Library/Constraints.sysml +44 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Systems Library/Flows.sysml +126 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Systems Library/Interfaces.sysml +89 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Systems Library/Items.sysml +153 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Systems Library/Metadata.sysml +32 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Systems Library/Parts.sysml +81 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Systems Library/Ports.sysml +54 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Systems Library/Requirements.sysml +194 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Systems Library/StandardViewDefinitions.sysml +123 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Systems Library/States.sysml +103 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Systems Library/SysML.sysml +539 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Systems Library/UseCases.sysml +57 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Systems Library/VerificationCases.sysml +103 -0
- package/lsp/node_modules/sysml-v2-lsp/sysml.library/Systems Library/Views.sysml +164 -0
- package/lsp/package-lock.json +30 -0
- package/lsp/package.json +15 -0
- package/lsp/test-server.mjs +120 -0
- package/package.json +61 -0
- package/scripts/access-sysml-mcp.mjs +45 -0
- package/scripts/check-sysml-v2-lsp-version.mjs +39 -0
- package/scripts/clean.mjs +14 -0
- package/scripts/compare-mcp-vs-lsp-symbols.mjs +76 -0
- package/scripts/debug-index.mjs +23 -0
- package/scripts/debug-lsp-symbols.mjs +62 -0
- package/scripts/deploy-skills.mjs +43 -0
- package/scripts/example-sysml-mcp.mjs +27 -0
- package/scripts/export-graph.mjs +80 -0
- package/scripts/generate-map.mjs +110 -0
- package/scripts/index-and-map.mjs +43 -0
- package/scripts/index-and-query.mjs +39 -0
- package/scripts/query-one.mjs +34 -0
- package/scripts/setup-lsp.mjs +36 -0
- package/scripts/test-lsp.mjs +55 -0
- package/scripts/test-mcp-debug.mjs +32 -0
- package/scripts/test-mcp-sysml.mjs +75 -0
- package/scripts/test-mcp-tools.mjs +185 -0
- package/scripts/test-sysml-mcp-from-node_modules.mjs +56 -0
- package/scripts/validate-sysml-file.mjs +69 -0
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
standard library package SequenceFunctions {
|
|
2
|
+
doc
|
|
3
|
+
/*
|
|
4
|
+
* This package defines functions that operate on general sequences of values. (For functions that
|
|
5
|
+
* operate on Collection values, see CollectionFunctions.)
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
private import Base::Anything;
|
|
9
|
+
private import Occurrences::SelfSameLifeLink;
|
|
10
|
+
private import ScalarValues::*;
|
|
11
|
+
private import ControlFunctions::*;
|
|
12
|
+
|
|
13
|
+
function '#' specializes BaseFunctions::'#' { in seq: Anything[0..*] ordered nonunique; in index: Positive[1];
|
|
14
|
+
return : Anything[0..1];
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function equals{ in x: Anything[0..*] ordered nonunique; in y: Anything[0..*] ordered nonunique;
|
|
18
|
+
return : Boolean[1] =
|
|
19
|
+
size(x) == size(y) and
|
|
20
|
+
(1..size(x))->forAll {in i; x#(i) == y#(i)};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function same{ in x: Anything[0..*] ordered nonunique; in y: Anything[0..*] ordered nonunique;
|
|
24
|
+
return : Boolean[1] =
|
|
25
|
+
size(x) == size(y) and
|
|
26
|
+
(1..size(x))->forAll {in i; x#(i) === y#(i)};
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function size{ in seq: Anything[0..*] nonunique;
|
|
30
|
+
return : Natural[1] = if isEmpty(seq)? 0 else size(tail(seq)) + 1;
|
|
31
|
+
}
|
|
32
|
+
function isEmpty{ in seq: Anything[0..*] nonunique;
|
|
33
|
+
return : Boolean[1] = seq == null;
|
|
34
|
+
}
|
|
35
|
+
function notEmpty{ in seq: Anything[0..*] nonunique;
|
|
36
|
+
return : Boolean[1] = not isEmpty(seq);
|
|
37
|
+
}
|
|
38
|
+
function includes{ in seq1: Anything[0..*] nonunique; in seq2: Anything[0..*] nonunique;
|
|
39
|
+
return : Boolean[1] = seq2->forAll {in x; seq1->exists{in y; x == y}};
|
|
40
|
+
}
|
|
41
|
+
function includesOnly{ in seq1: Anything[0..*] nonunique; in seq2: Anything[0..*] nonunique;
|
|
42
|
+
return : Boolean[1] = seq1->includes(seq2) and seq2->includes(seq1);
|
|
43
|
+
}
|
|
44
|
+
function excludes{ in seq1: Anything[0..*] nonunique; in seq2: Anything[0..*] nonunique;
|
|
45
|
+
return : Boolean[1] = seq2->forAll {in x; seq1->excludes(x)};
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function union{ in seq1: Anything[0..*] ordered nonunique; in seq2: Anything[0..*] ordered nonunique;
|
|
49
|
+
return : Anything[0..*] ordered nonunique = (seq1, seq2);
|
|
50
|
+
}
|
|
51
|
+
function intersection{ in seq1: Anything[0..*] ordered nonunique; in seq2: Anything[0..*] ordered nonunique;
|
|
52
|
+
return : Anything[0..*] ordered nonunique = seq1->select {in x; seq2->includes(x)};
|
|
53
|
+
}
|
|
54
|
+
function including{ in seq: Anything[0..*] ordered nonunique; in values: Anything[0..*] ordered nonunique;
|
|
55
|
+
return : Anything[0..*] ordered nonunique = union(seq, values);
|
|
56
|
+
}
|
|
57
|
+
function includingAt{ in seq: Anything[0..*] ordered nonunique; in values: Anything[0..*] ordered nonunique;
|
|
58
|
+
in index: Positive[1];
|
|
59
|
+
return : Anything[0..*] ordered nonunique =
|
|
60
|
+
(seq->subsequence(1, index - 1), values, seq->subsequence(index + 1));
|
|
61
|
+
}
|
|
62
|
+
function excluding{ in seq: Anything[0..*] ordered nonunique; in values: Anything[0..*];
|
|
63
|
+
return : Anything[0..*] ordered nonunique = seq->reject {in x; values->includes(x)};
|
|
64
|
+
}
|
|
65
|
+
function excludingAt{ in seq: Anything[0..*] ordered nonunique;
|
|
66
|
+
in startIndex: Positive[1]; in endIndex: Positive[1] default startIndex;
|
|
67
|
+
return : Anything[0..*] ordered nonunique =
|
|
68
|
+
(seq->subsequence(1, startIndex - 1), seq->subsequence(endIndex + 1));
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function subsequence{ in seq: Anything[0..*] ordered nonunique;
|
|
72
|
+
in startIndex: Positive[1]; in endIndex: Positive[1] default size(seq);
|
|
73
|
+
return : Anything[0..*] = (startIndex..endIndex)->collect {in i; seq#(i)};
|
|
74
|
+
}
|
|
75
|
+
function head{ in seq: Anything[0..*] ordered nonunique;
|
|
76
|
+
return : Anything[0..1] = seq#(1);
|
|
77
|
+
}
|
|
78
|
+
function tail{ in seq: Anything[0..*] ordered nonunique;
|
|
79
|
+
return : Anything[0..*] ordered nonunique = subsequence(seq, 2);
|
|
80
|
+
}
|
|
81
|
+
function last{ in seq: Anything[0..*] ordered nonunique;
|
|
82
|
+
return : Anything[0..1] = seq#(size(seq));
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
behavior add { inout seq: Anything[0..*] ordered nonunique; in values: Anything[0..*] ordered nonunique;
|
|
86
|
+
private feature newSeq = seq->including(values);
|
|
87
|
+
feature redefines endShot: add {
|
|
88
|
+
binding seq = newSeq;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
behavior addAt { inout seq: Anything[0..*] ordered nonunique; in values: Anything[0..*] ordered nonunique;
|
|
92
|
+
in index: Positive[1];
|
|
93
|
+
private feature newSeq = seq->includingAt(values, index);
|
|
94
|
+
feature redefines endShot: addAt {
|
|
95
|
+
binding seq = newSeq;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
behavior remove{ inout seq: Anything[0..*] ordered nonunique; in values: Anything[0..*];
|
|
99
|
+
private feature newSeq = seq->excluding(values);
|
|
100
|
+
feature redefines endShot: remove {
|
|
101
|
+
binding seq = newSeq;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
behavior removeAt{ inout seq: Anything[0..*] ordered nonunique;
|
|
105
|
+
in startIndex: Positive[1]; in endIndex: Positive[1] default startIndex;
|
|
106
|
+
private feature newSeq = seq->excludingAt(startIndex, endIndex);
|
|
107
|
+
feature redefines endShot: removeAt {
|
|
108
|
+
binding seq = newSeq;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
standard library package StringFunctions {
|
|
2
|
+
doc
|
|
3
|
+
/*
|
|
4
|
+
* This package defines functions on String values, including those corresponding to string concatenation
|
|
5
|
+
* and comparison operators in the KerML expression notation.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
public import ScalarValues::*;
|
|
9
|
+
|
|
10
|
+
function '+' specializes ScalarFunctions::'+' { in x: String[1]; in y:String[1]; return : String[1]; }
|
|
11
|
+
|
|
12
|
+
function Length{ in x: String[1]; return : Natural[1]; }
|
|
13
|
+
function Substring{ in x: String[1]; in lower: Integer[1]; in upper: Integer[1]; return : String[1]; }
|
|
14
|
+
|
|
15
|
+
function '<' specializes ScalarFunctions::'<' { in x: String[1]; in y: String[1]; return : Boolean[1]; }
|
|
16
|
+
function '>' specializes ScalarFunctions::'>' { in x: String[1]; in y: String[1]; return : Boolean[1]; }
|
|
17
|
+
function '<=' specializes ScalarFunctions::'<=' { in x: String[1]; in y: String[1]; return : Boolean[1]; }
|
|
18
|
+
function '>=' specializes ScalarFunctions::'>=' { in x: String[1]; in y: String[1]; return : Boolean[1]; }
|
|
19
|
+
|
|
20
|
+
function '==' specializes DataFunctions::'==' { in x: String[0..1]; in y: String[0..1]; return : Boolean[1]; }
|
|
21
|
+
|
|
22
|
+
function ToString specializes BaseFunctions::ToString { in x: String[1];
|
|
23
|
+
return : String[1] = x;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
standard library package TrigFunctions {
|
|
2
|
+
doc
|
|
3
|
+
/*
|
|
4
|
+
* This package defines basic trigonometric functions on real numbers.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
public import ScalarValues::Real;
|
|
8
|
+
|
|
9
|
+
feature pi : Real;
|
|
10
|
+
inv piPrecision { RealFunctions::round(pi * 1E20) == 314159265358979323846.0 }
|
|
11
|
+
|
|
12
|
+
function deg { in theta_rad : Real[1];
|
|
13
|
+
return : Real[1] = theta_rad * 180 / pi;
|
|
14
|
+
}
|
|
15
|
+
function rad { in theta_deg : Real;
|
|
16
|
+
return : Real[1] = theta_deg * pi / 180;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
datatype UnitBoundedReal :> Real {
|
|
20
|
+
inv unitBound { -1.0 <= that & that <= 1.0 }
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function sin { in theta : Real[1]; return : UnitBoundedReal[1]; }
|
|
24
|
+
function cos { in theta : Real[1]; return : UnitBoundedReal[1]; }
|
|
25
|
+
function tan { in theta : Real[1];
|
|
26
|
+
return : Real = sin(theta) / cos(theta);
|
|
27
|
+
}
|
|
28
|
+
function cot { in theta : Real;
|
|
29
|
+
return : Real = cos(theta) / sin(theta);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function arcsin { in x : UnitBoundedReal[1]; return : Real[1]; }
|
|
33
|
+
function arccos { in x : UnitBoundedReal[1]; return : Real[1]; }
|
|
34
|
+
function arctan { in x : Real[1]; return : Real[1]; }
|
|
35
|
+
}
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
standard library package VectorFunctions {
|
|
2
|
+
doc
|
|
3
|
+
/*
|
|
4
|
+
* This package defines abstract functions on VectorValues corresponding to the algebraic operations
|
|
5
|
+
* provided by a vector space with inner product. It also includes concrete implementations of these
|
|
6
|
+
* functions specifically for CartesianVectorValues.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
private import ScalarValues::NumericalValue;
|
|
10
|
+
private import ScalarValues::Positive;
|
|
11
|
+
private import ScalarValues::Real;
|
|
12
|
+
private import ScalarValues::Boolean;
|
|
13
|
+
private import NumericalFunctions::*;
|
|
14
|
+
private import RealFunctions::sqrt;
|
|
15
|
+
private import TrigFunctions::arccos;
|
|
16
|
+
private import SequenceFunctions::size;
|
|
17
|
+
private import ControlFunctions::*;
|
|
18
|
+
|
|
19
|
+
public import VectorValues::*;
|
|
20
|
+
|
|
21
|
+
/* Generic arithmetic functions for all VectorValues. */
|
|
22
|
+
|
|
23
|
+
abstract function isZeroVector {
|
|
24
|
+
doc
|
|
25
|
+
/*
|
|
26
|
+
* Return whether a VectorValue is a zero vector.
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
in v: VectorValue[1];
|
|
30
|
+
return : Boolean[1];
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
abstract function '+' specializes DataFunctions::'+' {
|
|
34
|
+
doc
|
|
35
|
+
/*
|
|
36
|
+
* With two arguments, returns the sum of two VectorValues. With one argument, returns that VectorValue.
|
|
37
|
+
*/
|
|
38
|
+
|
|
39
|
+
in v: VectorValue[1];
|
|
40
|
+
in w: VectorValue[0..1];
|
|
41
|
+
return u: VectorValue[1];
|
|
42
|
+
inv zeroAddition { w == null or isZeroVector(w) implies u == w }
|
|
43
|
+
inv commutivity { w != null implies u == w + v }
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
abstract function '-' specializes DataFunctions::'-' {
|
|
47
|
+
doc
|
|
48
|
+
/*
|
|
49
|
+
* With two arguments, returns the difference of two VectorValues. With one arguments, returns the inverse
|
|
50
|
+
* of the given VectorValue, that is, the VectorValue that, when added to the original VectorValue, results in
|
|
51
|
+
* the zeroVector.
|
|
52
|
+
*/
|
|
53
|
+
|
|
54
|
+
in v: VectorValue[1];
|
|
55
|
+
in w: VectorValue[0..1];
|
|
56
|
+
return u: VectorValue[1];
|
|
57
|
+
inv negation { w == null implies isZeroVector(v + u) }
|
|
58
|
+
inv difference { w != null implies v + u == w }
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
abstract function sum0 {
|
|
62
|
+
doc
|
|
63
|
+
/*
|
|
64
|
+
* Return the sum of a collection of VectorValues. If the collection is empty, return a given zero vector.
|
|
65
|
+
*/
|
|
66
|
+
|
|
67
|
+
in coll: VectorValue[*] nonunique;
|
|
68
|
+
in zero: VectorValue[1];
|
|
69
|
+
inv precondition { isZeroVector(zero) }
|
|
70
|
+
return s: VectorValue[1] = coll->reduce '+' ?? zero;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/* Functions specific to NumericalVectorValues. */
|
|
74
|
+
|
|
75
|
+
function VectorOf {
|
|
76
|
+
doc
|
|
77
|
+
/*
|
|
78
|
+
* Construct a NumericalVectorValue whose elements are a non-empty list of component NumericalValues.
|
|
79
|
+
* The dimension of the NumericalVectorValue is equal to the number of components.
|
|
80
|
+
*/
|
|
81
|
+
|
|
82
|
+
in components: NumericalValue[1..*] ordered nonunique;
|
|
83
|
+
return : NumericalVectorValue[1] {
|
|
84
|
+
:>> dimension = size(components);
|
|
85
|
+
:>> elements = components;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
abstract function scalarVectorMult specializes DataFunctions::'*' {
|
|
90
|
+
doc
|
|
91
|
+
/*
|
|
92
|
+
* Scalar product of a NumericalValue and a NumericalVectorValue.
|
|
93
|
+
*/
|
|
94
|
+
|
|
95
|
+
in x: NumericalValue[1];
|
|
96
|
+
in v: NumericalVectorValue[1];
|
|
97
|
+
return w: NumericalVectorValue[1];
|
|
98
|
+
inv scaling { norm(w) == x * norm(v) }
|
|
99
|
+
inv zeroLength { isZeroVector(w) implies isZero(norm(w))}
|
|
100
|
+
}
|
|
101
|
+
alias '*' for scalarVectorMult;
|
|
102
|
+
|
|
103
|
+
abstract function vectorScalarMult specializes DataFunctions::'*' {
|
|
104
|
+
doc
|
|
105
|
+
/*
|
|
106
|
+
* Scalar product of a NumericalVectorValue and a NumericalValue, which has the same value as the scalar product of the
|
|
107
|
+
* NumericalValue and the NumericalVectorValue.
|
|
108
|
+
*/
|
|
109
|
+
|
|
110
|
+
in v: NumericalVectorValue[1];
|
|
111
|
+
in x: NumericalValue[1];
|
|
112
|
+
return w: NumericalVectorValue[1] default scalarVectorMult(x, v);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
abstract function vectorScalarDiv specializes DataFunctions::'/' {
|
|
116
|
+
doc
|
|
117
|
+
/*
|
|
118
|
+
* Scalar quotient of a NumericalVectorValue and a NumericalValue, defined as the scalar product of the inverse of the
|
|
119
|
+
* NumericalValue and the NumericalVectorValue.
|
|
120
|
+
*/
|
|
121
|
+
|
|
122
|
+
in v: NumericalVectorValue[1];
|
|
123
|
+
in x: NumericalValue[1];
|
|
124
|
+
return w: NumericalVectorValue[1] = scalarVectorMult(1.0 / x, v);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
abstract function inner specializes DataFunctions::'*' {
|
|
128
|
+
doc
|
|
129
|
+
/*
|
|
130
|
+
* Inner product of two NumericalVectorValues.
|
|
131
|
+
*/
|
|
132
|
+
|
|
133
|
+
in v: NumericalVectorValue[1];
|
|
134
|
+
in w: NumericalVectorValue[1];
|
|
135
|
+
return x: NumericalValue[1];
|
|
136
|
+
inv commmutivity { x == inner(w, v) }
|
|
137
|
+
inv zeroInner { isZeroVector(v) or isZeroVector(w) implies isZero(x)}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
abstract function norm {
|
|
141
|
+
doc
|
|
142
|
+
/*
|
|
143
|
+
* The norm (magnitude) of a NumericalVectorValue, as a NumericalValue.
|
|
144
|
+
*/
|
|
145
|
+
|
|
146
|
+
in v: NumericalVectorValue[1];
|
|
147
|
+
return l : NumericalValue[1];
|
|
148
|
+
inv squareNorm { l * l == inner(v,v) }
|
|
149
|
+
inv lengthZero { isZero(l) == isZeroVector(v) }
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
abstract function angle {
|
|
153
|
+
doc
|
|
154
|
+
/*
|
|
155
|
+
* The angle between two NumericalVectorValues, as a NumericalValue.
|
|
156
|
+
*/
|
|
157
|
+
|
|
158
|
+
in v: NumericalVectorValue[1];
|
|
159
|
+
in w: NumericalVectorValue[1];
|
|
160
|
+
return theta: NumericalValue[1];
|
|
161
|
+
inv commutivity { theta == angle(w, v) }
|
|
162
|
+
inv lengthInsensitive { theta == angle(w / norm(w), v / norm(v)) }
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/* Specialized functions with concrete definitions for CartesianVectorValues. */
|
|
166
|
+
|
|
167
|
+
function CartesianVectorOf {
|
|
168
|
+
doc
|
|
169
|
+
/*
|
|
170
|
+
* Construct a CartesianVectorValue whose elements are a non-empty list of Real components.
|
|
171
|
+
* The dimension of the NumericalVectorValue is equal to the number of components.
|
|
172
|
+
*/
|
|
173
|
+
|
|
174
|
+
in components: Real[*] ordered nonunique;
|
|
175
|
+
return : CartesianVectorValue[1] {
|
|
176
|
+
:>> dimension = size(components);
|
|
177
|
+
:>> elements = components;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
function CartesianThreeVectorOf specializes CartesianVectorOf {
|
|
181
|
+
in components: Real[3] ordered nonunique;
|
|
182
|
+
return : CartesianThreeVectorValue[1] {
|
|
183
|
+
feature :>> CartesianVectorOf::result::dimension, CartesianThreeVectorValue::dimension;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
feature cartesianZeroVector: CartesianVectorValue[3] =
|
|
188
|
+
(
|
|
189
|
+
CartesianVectorOf(0.0),
|
|
190
|
+
CartesianVectorOf((0.0, 0.0)),
|
|
191
|
+
CartesianThreeVectorOf((0.0, 0.0, 0.0))
|
|
192
|
+
) {
|
|
193
|
+
doc
|
|
194
|
+
/*
|
|
195
|
+
* Cartesian zero vectors of 1, 2 and 3 dimensions.
|
|
196
|
+
*/
|
|
197
|
+
}
|
|
198
|
+
feature cartesian3DZeroVector: CartesianThreeVectorValue[1] =
|
|
199
|
+
cartesianZeroVector#(3);
|
|
200
|
+
|
|
201
|
+
function isCartesianZeroVector specializes isZeroVector {
|
|
202
|
+
doc
|
|
203
|
+
/*
|
|
204
|
+
* A CartesianVectorValue is a zero vector if all its elements are zero.
|
|
205
|
+
*/
|
|
206
|
+
|
|
207
|
+
in v: CartesianVectorValue[1];
|
|
208
|
+
return : Boolean[1] = v.elements->forAll{in x; x == 0.0};
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
function 'cartesian+' specializes '+' {
|
|
212
|
+
in v: CartesianVectorValue[1];
|
|
213
|
+
in w: CartesianVectorValue[0..1];
|
|
214
|
+
inv precondition { w != null implies v.dimension == w.dimension }
|
|
215
|
+
return u: CartesianVectorValue[1] =
|
|
216
|
+
if w == null? v
|
|
217
|
+
else CartesianVectorOf(
|
|
218
|
+
(1..w.dimension)->collect{in i : Positive; v#(i) + w#(i)}
|
|
219
|
+
);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
function 'cartesian-' specializes '-' {
|
|
223
|
+
in v: CartesianVectorValue[1];
|
|
224
|
+
in w: CartesianVectorValue[0..1];
|
|
225
|
+
inv precondition { w != null implies v.dimension == w.dimension }
|
|
226
|
+
return u: CartesianVectorValue[1] =
|
|
227
|
+
CartesianVectorOf(
|
|
228
|
+
if w == null? CartesianVectorOf(v.elements->collect{in x : Real; -x})
|
|
229
|
+
else CartesianVectorOf(
|
|
230
|
+
(1..v.dimension)->collect{in i : Positive; v#(i) - w#(i)}
|
|
231
|
+
)
|
|
232
|
+
);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
function cartesianScalarVectorMult specializes scalarVectorMult {
|
|
236
|
+
in x: Real[1];
|
|
237
|
+
in v: CartesianVectorValue[1];
|
|
238
|
+
return w: CartesianVectorValue[1] =
|
|
239
|
+
CartesianVectorOf(
|
|
240
|
+
v.elements->collect{in y : Real; x * y}
|
|
241
|
+
);
|
|
242
|
+
}
|
|
243
|
+
function cartesianVectorScalarMult specializes vectorScalarMult {
|
|
244
|
+
in v: CartesianVectorValue[1];
|
|
245
|
+
in x: Real[1];
|
|
246
|
+
return w: CartesianVectorValue[1] = cartesianScalarVectorMult(x, v);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
function cartesianInner specializes inner {
|
|
250
|
+
in v: CartesianVectorValue[1];
|
|
251
|
+
in w : CartesianVectorValue[1];
|
|
252
|
+
inv precondition { v.dimension == w.dimension }
|
|
253
|
+
return x: Real[1] =
|
|
254
|
+
(1..v.dimension)->collect{in i : Positive; v#(i) * w#(i)}->reduce RealFunctions::'+';
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
function cartesianNorm specializes norm {
|
|
258
|
+
in v: CartesianVectorValue[1];
|
|
259
|
+
return l : NumericalValue[1] = sqrt(cartesianInner(v, v));
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
function cartesianAngle specializes angle {
|
|
263
|
+
in v: CartesianVectorValue[1]; in w: CartesianVectorValue[1];
|
|
264
|
+
inv precondition { v.dimension == w.dimension }
|
|
265
|
+
return theta: Real[1] = arccos(cartesianInner(v, w) / (norm(v) * norm(w)));
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
function sum {
|
|
269
|
+
in coll: CartesianThreeVectorValue[*];
|
|
270
|
+
return : CartesianThreeVectorValue[1] = sum0(coll, cartesian3DZeroVector);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"index": {
|
|
3
|
+
"Base": "Base.kerml",
|
|
4
|
+
"Clocks": "Clocks.kerml",
|
|
5
|
+
"ControlPerformances": "ControlPerformances.kerml",
|
|
6
|
+
"FeatureReferencingPerformances": "FeatureReferencingPerformances.kerml",
|
|
7
|
+
"KerML": "KerML.kerml",
|
|
8
|
+
"Links": "Links.kerml",
|
|
9
|
+
"Metaobjects": "Metaobjects.kerml",
|
|
10
|
+
"Objects": "Objects.kerml",
|
|
11
|
+
"Observation": "Observation.kerml",
|
|
12
|
+
"Occurrences": "Occurrences.kerml",
|
|
13
|
+
"Performances": "Performances.kerml",
|
|
14
|
+
"SpatialFrames": "SpatialFrames.kerml",
|
|
15
|
+
"StatePerformances": "StatePerformances.kerml",
|
|
16
|
+
"Transfers": "Transfers.kerml",
|
|
17
|
+
"TransitionPerformances": "TransitionPerformances.kerml",
|
|
18
|
+
"Triggers": "Triggers.kerml"
|
|
19
|
+
},
|
|
20
|
+
"created": "2025-03-13T00:00:00Z",
|
|
21
|
+
"metamodel": "https://www.omg.org/spec/KerML/20250201"
|
|
22
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Kernel Semantic Library",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Standard semantic library for the Kernel Modeling Language (KerML)",
|
|
5
|
+
"usage": [
|
|
6
|
+
{
|
|
7
|
+
"resource": "https://www.omg.org/spec/KerML/20250201/Data-Type-Library.kpar",
|
|
8
|
+
"versionConstraint": "1.0.0"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"resource": "https://www.omg.org/spec/KerML/20250201/Function-Library.kpar",
|
|
12
|
+
"versionConstraint": "1.0.0"
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
standard library package Base {
|
|
2
|
+
doc
|
|
3
|
+
/*
|
|
4
|
+
* This package defines the classifiers and features that provide the bases for the typing
|
|
5
|
+
* of all elements in the language.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
abstract classifier Anything {
|
|
9
|
+
doc
|
|
10
|
+
/*
|
|
11
|
+
* Anything is the top level generalized type in the language.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
feature self: Anything[1] subsets things chains things.that {
|
|
15
|
+
doc
|
|
16
|
+
/*
|
|
17
|
+
* The source of a SelfLink of this thing to itself. self is thus a feature that
|
|
18
|
+
* relates everything to itself. It is also the value of the nested "that" feature
|
|
19
|
+
* of all other things featured by this thing.
|
|
20
|
+
*/
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
abstract datatype DataValue specializes Anything {
|
|
25
|
+
doc
|
|
26
|
+
/*
|
|
27
|
+
* Value is the most general classifier of entities that are values that do not change
|
|
28
|
+
* over time.
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
feature self: DataValue redefines Anything::self;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
abstract feature things: Anything [1..*] nonunique {
|
|
35
|
+
doc
|
|
36
|
+
/*
|
|
37
|
+
* things is the top-level feature in the language.
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
feature that : Anything[1] {
|
|
41
|
+
doc
|
|
42
|
+
/*
|
|
43
|
+
* For each value of things, the "featuring instance" of that value.
|
|
44
|
+
* This is enforced by declaring Anything::self to be the chaining of things.that,
|
|
45
|
+
* restricting it the single value of self.
|
|
46
|
+
*/
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
abstract feature dataValues: DataValue[0..*] nonunique subsets things {
|
|
51
|
+
doc
|
|
52
|
+
/*
|
|
53
|
+
* dataValues is a specialization of things restricted to type DataValue.
|
|
54
|
+
*/
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
abstract feature naturals: ScalarValues::Natural[0..*] subsets dataValues {
|
|
58
|
+
doc
|
|
59
|
+
/*
|
|
60
|
+
* naturals is a specialization of dataValues restricted to type Natural.
|
|
61
|
+
* It is the root feature of all multiplicities, which map from a feature to
|
|
62
|
+
* the set of Natural numbers representing allowable cardinalities of the feature.
|
|
63
|
+
*/
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
multiplicity exactlyOne [1..1] {
|
|
67
|
+
doc
|
|
68
|
+
/*
|
|
69
|
+
* exactlyOne is a multiplicity range requiring a cardinality of exactly one.
|
|
70
|
+
*/
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
multiplicity zeroOrOne [0..1] {
|
|
74
|
+
doc
|
|
75
|
+
/*
|
|
76
|
+
* zeroOrOne is a multiplicity range requiring a cardinality of zero or one.
|
|
77
|
+
*/
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
multiplicity oneToMany [1..*] {
|
|
81
|
+
doc
|
|
82
|
+
/*
|
|
83
|
+
* oneToMany is a multiplicity range allowing any cardinality of one or more.
|
|
84
|
+
*/
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
multiplicity zeroToMany [0..*] {
|
|
88
|
+
doc
|
|
89
|
+
/*
|
|
90
|
+
* zeroToMany is a multiplicity range allowing any cardinality of zero or more
|
|
91
|
+
* (that is, no restriction).
|
|
92
|
+
*/
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
}
|