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,293 @@
|
|
|
1
|
+
standard library package Performances {
|
|
2
|
+
doc
|
|
3
|
+
/*
|
|
4
|
+
* This package defines classifiers and features that related to the typing of performances and evaluations.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
private import Base::Anything;
|
|
8
|
+
private import Base::things;
|
|
9
|
+
private import Occurrences::Occurrence;
|
|
10
|
+
private import Occurrences::occurrences;
|
|
11
|
+
private import Occurrences::HappensDuring;
|
|
12
|
+
private import Objects::Object;
|
|
13
|
+
private import Links::BinaryLink;
|
|
14
|
+
private import Metaobjects::Metaobject;
|
|
15
|
+
private import Transfers::Transfer;
|
|
16
|
+
private import Transfers::transfers;
|
|
17
|
+
private import Transfers::TransferBefore;
|
|
18
|
+
private import Transfers::transfersBefore;
|
|
19
|
+
private import ScalarValues::*;
|
|
20
|
+
private import SequenceFunctions::includes;
|
|
21
|
+
|
|
22
|
+
abstract behavior Performance specializes Occurrence disjoint from Object {
|
|
23
|
+
doc
|
|
24
|
+
/*
|
|
25
|
+
* Performance is the most general class of behavioral Occurrences that may be performed over time.
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
feature self: Performance redefines Occurrence::self;
|
|
29
|
+
|
|
30
|
+
feature involvedObjects: Object[0..*] {
|
|
31
|
+
doc
|
|
32
|
+
/*
|
|
33
|
+
* Objects that are involved in this Performance.
|
|
34
|
+
*/
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
feature performers: Object[0..*] subsets involvedObjects {
|
|
38
|
+
doc
|
|
39
|
+
/*
|
|
40
|
+
* Objects that enact this Performance.
|
|
41
|
+
*/
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
feature redefines isDispatch default true;
|
|
45
|
+
feature redefines dispatchScope default thisPerformance;
|
|
46
|
+
|
|
47
|
+
step enclosedPerformances: Performance[0..*] subsets performances, timeEnclosedOccurrences
|
|
48
|
+
intersects performances, timeEnclosedOccurrences {
|
|
49
|
+
doc
|
|
50
|
+
/*
|
|
51
|
+
* timeEnclosedOccurrences of this Performance that are also Performances.
|
|
52
|
+
*/
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
feature thisPerformance: Performance [1] default self {
|
|
56
|
+
doc
|
|
57
|
+
/*
|
|
58
|
+
* Defaults to the root of the subperformance composition tree.
|
|
59
|
+
*/
|
|
60
|
+
}
|
|
61
|
+
connector :HappensDuring from [1] self to [1] thisPerformance;
|
|
62
|
+
|
|
63
|
+
composite step subperformances: Performance[0..*] subsets enclosedPerformances, suboccurrences
|
|
64
|
+
intersects enclosedPerformances, suboccurrences {
|
|
65
|
+
doc
|
|
66
|
+
/*
|
|
67
|
+
* enclosedPerformances that are composite.
|
|
68
|
+
*/
|
|
69
|
+
|
|
70
|
+
feature redefines this default (that as Performance).this {
|
|
71
|
+
doc
|
|
72
|
+
/*
|
|
73
|
+
* The default "this" context of a subperformance is the same as that of its owning Performance.
|
|
74
|
+
* This means that the context for any Performance that is in a composition tree rooted
|
|
75
|
+
* in a Performance that is not itself owned by an Object is the root Performance. If the
|
|
76
|
+
* root Performance is an ownedPerformance of an Object, then that Object is the context.
|
|
77
|
+
*/
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
feature redefines thisPerformance default (that as Performance).thisPerformance;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
abstract function Evaluation specializes Performance {
|
|
85
|
+
doc
|
|
86
|
+
/*
|
|
87
|
+
* Evaluation is the most general class of functions that may be evaluated to compute
|
|
88
|
+
* a result.
|
|
89
|
+
*/
|
|
90
|
+
|
|
91
|
+
return result: Anything[0..*] nonunique;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
abstract predicate BooleanEvaluation specializes Evaluation {
|
|
95
|
+
doc
|
|
96
|
+
/*
|
|
97
|
+
* BooleanEvaluation is a specialization of Evaluation that is the most general class of
|
|
98
|
+
* Predicates that may be evaluated to produce a Boolean truth value.
|
|
99
|
+
*/
|
|
100
|
+
|
|
101
|
+
return : Boolean[1];
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
abstract function MetadataAccessEvaluation specializes Evaluation {
|
|
105
|
+
doc
|
|
106
|
+
/*
|
|
107
|
+
* MetadataAccessEvaluation is a specialization of Evaluation for the case of MetadataAccessExpressions.
|
|
108
|
+
*/
|
|
109
|
+
|
|
110
|
+
return : Metaobject[1..*];
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
abstract function LiteralEvaluation specializes Evaluation {
|
|
114
|
+
doc
|
|
115
|
+
/*
|
|
116
|
+
* LiteralEvaluation is a specialization of Evaluation for the case of LiteralExpressions.
|
|
117
|
+
*/
|
|
118
|
+
|
|
119
|
+
return : ScalarValue[1];
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
abstract predicate LiteralBooleanEvaluation specializes LiteralEvaluation, BooleanEvaluation
|
|
123
|
+
intersects LiteralEvaluation, BooleanEvaluation {
|
|
124
|
+
doc
|
|
125
|
+
/*
|
|
126
|
+
* LiteralBooleanEvaluation is a specialization of LiteralEvaluation for the case of LiteralBooleans.
|
|
127
|
+
* It is also a predicate and thus a specialization of BooleanEvaluation.
|
|
128
|
+
*/
|
|
129
|
+
|
|
130
|
+
return : Boolean[1];
|
|
131
|
+
}
|
|
132
|
+
abstract function LiteralIntegerEvaluation specializes LiteralEvaluation {
|
|
133
|
+
doc
|
|
134
|
+
/*
|
|
135
|
+
* LiteralIntegerEvaluation is a specialization of LiteralEvaluation for the case of LiteralIntegers.
|
|
136
|
+
*/
|
|
137
|
+
|
|
138
|
+
return : Integer[1];
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
abstract function LiteralRationalEvaluation specializes LiteralEvaluation {
|
|
142
|
+
doc
|
|
143
|
+
/*
|
|
144
|
+
* LiteralRationalEvaluation is a specialization of LiteralEvaluation for the case of LiteralRationals.
|
|
145
|
+
* (Note: Return type is Real to allow easy type conformance of LiteralRationals when a Real result is expected.)
|
|
146
|
+
*/
|
|
147
|
+
|
|
148
|
+
return : Real[1];
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
abstract function LiteralStringEvaluation specializes LiteralEvaluation {
|
|
152
|
+
doc
|
|
153
|
+
/*
|
|
154
|
+
* LiteralStringEvaluation is a specialization of LiteralEvaluation for the case of LiteralStrings.
|
|
155
|
+
*/
|
|
156
|
+
|
|
157
|
+
return : String[1];
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
function NullEvaluation specializes Evaluation {
|
|
161
|
+
doc
|
|
162
|
+
/*
|
|
163
|
+
* NullEvaluation is a specialization of Evaluation for the case of NullExpressions.
|
|
164
|
+
*/
|
|
165
|
+
|
|
166
|
+
return : Anything[0..0];
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
assoc all InvolvedIn specializes BinaryLink {
|
|
170
|
+
doc
|
|
171
|
+
/*
|
|
172
|
+
* InvolvedIn asserts that the involvedObject is involved in the Behavior carried out by the
|
|
173
|
+
* involvingPerformance.
|
|
174
|
+
*/
|
|
175
|
+
|
|
176
|
+
end feature involvedObject: Object redefines source crosses involvingPerformance.involvedObjects;
|
|
177
|
+
end feature involvingPerformance: Performance redefines target crosses involvedObject.involvingPerformances;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
assoc all Performs specializes InvolvedIn {
|
|
181
|
+
doc
|
|
182
|
+
/*
|
|
183
|
+
* Performs asserts that the performer enacts the Behavior carried out by the performance.
|
|
184
|
+
*/
|
|
185
|
+
|
|
186
|
+
end feature performerObject: Object redefines involvedObject crosses performance.performers;
|
|
187
|
+
end feature performance: Performance redefines involvingPerformance crosses performerObject.enactedPerformances;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
abstract step performances: Performance[0..*] nonunique subsets occurrences {
|
|
191
|
+
doc
|
|
192
|
+
/*
|
|
193
|
+
* performances is the most general feature for performances of Behaviors.
|
|
194
|
+
*/
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
abstract expr evaluations: Evaluation[0..*] nonunique subsets performances {
|
|
198
|
+
doc
|
|
199
|
+
/*
|
|
200
|
+
* evaluations is a specialization of performances for evaluations of Functions.
|
|
201
|
+
*/
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
abstract expr constructorEvaluations [0..*] nonunique subsets evaluations {
|
|
205
|
+
doc
|
|
206
|
+
/*
|
|
207
|
+
* constructorEvaluations is a specialization of evaluations that restricts the multiplicity
|
|
208
|
+
* of its result parameter to 1..1, requiring a constructorEvaluation to result in a single value.
|
|
209
|
+
*/
|
|
210
|
+
|
|
211
|
+
return result [1..1];
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
abstract expr booleanEvaluations: BooleanEvaluation[0..*] nonunique subsets evaluations {
|
|
215
|
+
doc
|
|
216
|
+
/*
|
|
217
|
+
* booleanEvaluations is a specialization of evaluations restricted to type BooleanEvaluation.
|
|
218
|
+
*/
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
abstract expr trueEvaluations subsets booleanEvaluations {
|
|
222
|
+
doc
|
|
223
|
+
/*
|
|
224
|
+
* trueEvaluations is a subset of booleanEvaluations that result in true. It is the most general
|
|
225
|
+
* feature of invariants that are not negated.
|
|
226
|
+
*/
|
|
227
|
+
|
|
228
|
+
private feature trueValue = true;
|
|
229
|
+
binding result = trueValue;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
abstract expr falseEvaluations subsets booleanEvaluations {
|
|
233
|
+
doc
|
|
234
|
+
/*
|
|
235
|
+
* falseEvaluations is a subset of booleanEvaluations that result in false. It is the most general
|
|
236
|
+
* feature of invariants that are negated.
|
|
237
|
+
*/
|
|
238
|
+
|
|
239
|
+
private feature falseValue = false;
|
|
240
|
+
binding result = falseValue;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
abstract expr metadataAccessEvaluations: MetadataAccessEvaluation[0..*] nonunique subsets evaluations {
|
|
244
|
+
doc
|
|
245
|
+
/*
|
|
246
|
+
* metadataAccessEvaluations is a specialization of evaluations restricted to type MetadataAccessEvaluation.
|
|
247
|
+
*/
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
abstract expr literalEvaluations: LiteralEvaluation[0..*] nonunique subsets evaluations {
|
|
251
|
+
doc
|
|
252
|
+
/*
|
|
253
|
+
* literalEvaluations is a specialization of evaluations restricted to type LiteralEvaluation.
|
|
254
|
+
*/
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
abstract expr literalBooleanEvaluations: LiteralBooleanEvaluation[0..*] nonunique subsets literalEvaluations, booleanEvaluations
|
|
258
|
+
intersects literalEvaluations, booleanEvaluations {
|
|
259
|
+
doc
|
|
260
|
+
/*
|
|
261
|
+
* literaBooleanlEvaluations is a specialization of literalEvaluations and booleanEvaluations restricted
|
|
262
|
+
* to type LiteralBooleanEvaluation.
|
|
263
|
+
*/
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
abstract expr literalIntegerEvaluations: LiteralIntegerEvaluation[0..*] nonunique subsets literalEvaluations {
|
|
267
|
+
doc
|
|
268
|
+
/*
|
|
269
|
+
* literalEvaluations is a specialization of evaluations restricted to type LiteralEvaluation.
|
|
270
|
+
*/
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
abstract expr literalRationalEvaluations: LiteralRationalEvaluation[0..*] nonunique subsets literalEvaluations {
|
|
274
|
+
doc
|
|
275
|
+
/*
|
|
276
|
+
* literalRationalEvaluations is a specialization of literalEvaluations restricted to type LiteralRationalEvaluation.
|
|
277
|
+
*/
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
abstract expr literalStringEvaluations: LiteralStringEvaluation[0..*] nonunique subsets literalEvaluations {
|
|
281
|
+
doc
|
|
282
|
+
/*
|
|
283
|
+
* literalStringEvaluations is a specialization of literalEvaluations restricted to type LiteralStringEvaluation.
|
|
284
|
+
*/
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
abstract expr nullEvaluations: NullEvaluation[0..*] nonunique subsets evaluations {
|
|
288
|
+
doc
|
|
289
|
+
/*
|
|
290
|
+
* nullEvaluations is a specialization of evaluations restricted to type NullEvaluation.
|
|
291
|
+
*/
|
|
292
|
+
}
|
|
293
|
+
}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
standard library package SpatialFrames {
|
|
2
|
+
doc
|
|
3
|
+
/*
|
|
4
|
+
* This package models spatial frames of reference for quantifying the position of points
|
|
5
|
+
* in a three-dimensional space.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
private import Clocks::*;
|
|
9
|
+
private import ScalarValues::NumericalValue;
|
|
10
|
+
private import VectorValues::ThreeVectorValue;
|
|
11
|
+
private import VectorValues::CartesianThreeVectorValue;
|
|
12
|
+
private import VectorFunctions::isZeroVector;
|
|
13
|
+
private import Occurrences::Life;
|
|
14
|
+
private import Objects::Body;
|
|
15
|
+
private import Objects::Point;
|
|
16
|
+
private import ControlFunctions::forAll;
|
|
17
|
+
private import SequenceFunctions::includes;
|
|
18
|
+
|
|
19
|
+
private struct DefaultFrameLife[1] :> SpatialFrame, Life {
|
|
20
|
+
doc
|
|
21
|
+
/*
|
|
22
|
+
* DefaultFrameLife is the classifier of the singleton Life of the defaultFrame.
|
|
23
|
+
*/
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
feature defaultFrame : DefaultFrameLife[1] {
|
|
27
|
+
doc
|
|
28
|
+
/*
|
|
29
|
+
* defaultFrame is a fixed SpatialFrame used as a universal default.
|
|
30
|
+
*/
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
abstract struct SpatialFrame specializes Body {
|
|
34
|
+
doc
|
|
35
|
+
/*
|
|
36
|
+
* A SpatialFrame is a three-dimensional Body that provides a spatial extent that
|
|
37
|
+
* acts as a frame of reference for defining the physical position and displacement
|
|
38
|
+
* vectors of Points over time.
|
|
39
|
+
*/
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
abstract function PositionOf {
|
|
43
|
+
doc
|
|
44
|
+
/*
|
|
45
|
+
* The PositionOf a Point relative to a SpatialFrame, at a specific time relative to a given
|
|
46
|
+
* Clock, as a positionVector that is a ThreeVectorValue.
|
|
47
|
+
*/
|
|
48
|
+
|
|
49
|
+
in point : Point[1];
|
|
50
|
+
in time : NumericalValue[1];
|
|
51
|
+
in frame : SpatialFrame[1] default defaultFrame;
|
|
52
|
+
in clock : Clock[1] default frame.localClock;
|
|
53
|
+
return positionVector : ThreeVectorValue[1];
|
|
54
|
+
|
|
55
|
+
inv positionTimePrecondition {
|
|
56
|
+
doc
|
|
57
|
+
/*
|
|
58
|
+
* The given point must exist at the given time.
|
|
59
|
+
*/
|
|
60
|
+
|
|
61
|
+
TimeOf(point.startShot) <= time and
|
|
62
|
+
time <= TimeOf(point.endShot)
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
inv spacePositionConstraint {
|
|
66
|
+
doc
|
|
67
|
+
/*
|
|
68
|
+
* The result positionVector is equal to the PositionOf the Point spaceShot of the
|
|
69
|
+
* frame that encloses the given point, at the given time.
|
|
70
|
+
*/
|
|
71
|
+
|
|
72
|
+
(frame.spaceShots as Point)->forAll{in p : Point;
|
|
73
|
+
p.spaceTimeEnclosedOccurrences->includes(point) implies
|
|
74
|
+
positionVector == PositionOf(p, time, frame)
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
abstract function CurrentPositionOf {
|
|
80
|
+
doc
|
|
81
|
+
/*
|
|
82
|
+
* The CurrentPositionOf a Point relative to a SpatialFrame and a Clock is the PositionOf
|
|
83
|
+
* the Point relative to the SpatialFrame at the currentTime of the Clock.
|
|
84
|
+
*/
|
|
85
|
+
|
|
86
|
+
in point : Point[1];
|
|
87
|
+
in frame : SpatialFrame[1] default defaultFrame;
|
|
88
|
+
in clock : Clock[1] default frame.localClock;
|
|
89
|
+
return positionVector : ThreeVectorValue[1] =
|
|
90
|
+
PositionOf(point, clock.currentTime, frame, clock);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function DisplacementOf {
|
|
94
|
+
doc
|
|
95
|
+
/*
|
|
96
|
+
* The DisplacementOf two Points relative to a SpatialFrame, at a specific time relative to a
|
|
97
|
+
* given Clock, is the displacementVector computed as the difference between the PositionOf the
|
|
98
|
+
* first Point and PositionOf the second Point, relative to that SpatialFrame, at that time.
|
|
99
|
+
*/
|
|
100
|
+
|
|
101
|
+
in point1 : Point[1];
|
|
102
|
+
in point2 : Point[1];
|
|
103
|
+
in time : NumericalValue;
|
|
104
|
+
in frame : SpatialFrame[1] default defaultFrame;
|
|
105
|
+
in clock : Clock[1] default frame.localClock;
|
|
106
|
+
return displacementVector : ThreeVectorValue[1] =
|
|
107
|
+
PositionOf(point2, time, frame, clock) - PositionOf(point1, time, frame, clock);
|
|
108
|
+
|
|
109
|
+
inv zeroDisplacementConstraint {
|
|
110
|
+
doc
|
|
111
|
+
/*
|
|
112
|
+
* If either point1 or point2 occurs within the other, then the displacementVector is
|
|
113
|
+
* the zero vector.
|
|
114
|
+
*/
|
|
115
|
+
|
|
116
|
+
(point1.spaceTimeEnclosedOccurrences->includes(point2) or
|
|
117
|
+
point2.spaceTimeEnclosedOccurrences->includes(point1)) implies
|
|
118
|
+
isZeroVector(displacementVector)
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
function CurrentDisplacementOf {
|
|
123
|
+
doc
|
|
124
|
+
/*
|
|
125
|
+
* The CurrentDisplacementOf two Points relative to a SpatialFrame and Clock is the DisplacementOf
|
|
126
|
+
* the Points relative to the SpatialFrame at the currentTime of the Clock.
|
|
127
|
+
*/
|
|
128
|
+
|
|
129
|
+
in point1 : Point[1];
|
|
130
|
+
in point2 : Point[1];
|
|
131
|
+
in frame : SpatialFrame[1] default defaultFrame;
|
|
132
|
+
in clock : Clock[1] default frame.localClock;
|
|
133
|
+
return displacementVector : ThreeVectorValue[1] =
|
|
134
|
+
DisplacementOf(point1, point2, clock.currentTime, frame, clock);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
abstract struct CartesianSpatialFrame :> SpatialFrame {
|
|
138
|
+
doc
|
|
139
|
+
/*
|
|
140
|
+
* A CartesianSpatialFrame is a SpatialFrame relative to which all position and displacement
|
|
141
|
+
* vectors can be represented as CartesianThreeVectorValues.
|
|
142
|
+
*/
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
abstract function CartesianPositionOf :> PositionOf {
|
|
146
|
+
doc
|
|
147
|
+
/*
|
|
148
|
+
* The PositionOf a Point relative to a CartesianSpatialFrame is a CartesianThreeVectorValue.
|
|
149
|
+
*/
|
|
150
|
+
|
|
151
|
+
in point : Point[1];
|
|
152
|
+
in time : NumericalValue[1];
|
|
153
|
+
in frame : CartesianSpatialFrame[1];
|
|
154
|
+
in clock : Clock[1] default frame.localClock;
|
|
155
|
+
return positionVector : CartesianThreeVectorValue[1];
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
abstract function CartesianCurrentPositionOf :> CurrentPositionOf {
|
|
159
|
+
doc
|
|
160
|
+
/*
|
|
161
|
+
* The CurrentPositionOf a Point relative to a CartesianSpatialFrame is a CartesianThreeVectorValue.
|
|
162
|
+
*/
|
|
163
|
+
|
|
164
|
+
in point : Point[1];
|
|
165
|
+
in frame : CartesianSpatialFrame[1];
|
|
166
|
+
in clock : Clock[1] default frame.localClock;
|
|
167
|
+
return positionVector : CartesianThreeVectorValue[1];
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
function CartesianDisplacementOf :> DisplacementOf {
|
|
171
|
+
doc
|
|
172
|
+
/*
|
|
173
|
+
* The DisplacementOf two Points relative to a CartesianSpatialFrame is a CartesianThreeVectorValue.
|
|
174
|
+
*/
|
|
175
|
+
|
|
176
|
+
in point1 : Point[1];
|
|
177
|
+
in point2 : Point[1];
|
|
178
|
+
in time : NumericalValue[1];
|
|
179
|
+
in frame : CartesianSpatialFrame[1];
|
|
180
|
+
in clock : Clock[1] default frame.localClock;
|
|
181
|
+
return displacementVector : CartesianThreeVectorValue[1];
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
function CartesianCurrentDisplacementOf :> CurrentDisplacementOf {
|
|
185
|
+
doc
|
|
186
|
+
/*
|
|
187
|
+
* The CurrentDisplacementOf two Points relative to a CartesianSpatialFrame is a CartesianThreeVectorValue.
|
|
188
|
+
*/
|
|
189
|
+
|
|
190
|
+
in point1 : Point[1];
|
|
191
|
+
in point2 : Point[1];
|
|
192
|
+
in frame : CartesianSpatialFrame[1];
|
|
193
|
+
in clock : Clock[1] default frame.localClock;
|
|
194
|
+
return displacementVector : CartesianThreeVectorValue[1];
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
standard library package StatePerformances {
|
|
2
|
+
doc
|
|
3
|
+
/*
|
|
4
|
+
* This package contains a library model of the semantics of state-based behavior,
|
|
5
|
+
* including the performance of (behavioral) states and the transitions between them.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
private import ScalarValues::Boolean;
|
|
9
|
+
private import ScalarValues::Natural;
|
|
10
|
+
private import TransitionPerformances::TransitionPerformance;
|
|
11
|
+
private import Occurrences::Occurrence;
|
|
12
|
+
private import Occurrences::HappensDuring;
|
|
13
|
+
private import Transfers::Transfer;
|
|
14
|
+
private import Transfers::MessageTransfer;
|
|
15
|
+
private import Performances::Performance;
|
|
16
|
+
private import ControlPerformances::DecisionPerformance;
|
|
17
|
+
private import ControlFunctions::forAll;
|
|
18
|
+
private import ControlFunctions::select;
|
|
19
|
+
private import ControlFunctions::collect;
|
|
20
|
+
private import SequenceFunctions::*;
|
|
21
|
+
|
|
22
|
+
behavior StatePerformance specializes DecisionPerformance {
|
|
23
|
+
feature isTriggerDuring: Boolean default true;
|
|
24
|
+
|
|
25
|
+
abstract step middle[1..*] {
|
|
26
|
+
doc
|
|
27
|
+
/*
|
|
28
|
+
* All modeler-defined steps must subset this.
|
|
29
|
+
*/
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/*
|
|
33
|
+
* Note: All steps are implicitly considered to be enclosedPerformances,
|
|
34
|
+
* and hence happening during the state performance.
|
|
35
|
+
*/
|
|
36
|
+
|
|
37
|
+
step entry[1];
|
|
38
|
+
step do[1] subsets middle;
|
|
39
|
+
step exit[1];
|
|
40
|
+
|
|
41
|
+
step nonDoMiddle[*] subsets middle = middle->excluding(do);
|
|
42
|
+
|
|
43
|
+
private succession [1] entry then [*] middle;
|
|
44
|
+
private succession [1] do.startShot then [*] nonDoMiddle.startShot;
|
|
45
|
+
private succession [*] middle then [1] exit;
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
feature incomingTransitionTrigger : MessageTransfer [0..1] default null {
|
|
49
|
+
doc
|
|
50
|
+
/*
|
|
51
|
+
* Transfer that triggered a transition into this state performance.
|
|
52
|
+
*/
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
private inv { isEmpty(accepted) == isEmpty(acceptable) }
|
|
56
|
+
feature accepted: Transfer[0..1] subsets acceptable {
|
|
57
|
+
doc
|
|
58
|
+
/* A transfer to the trigger target of an outgoing transition performance
|
|
59
|
+
* for an outgoing successon that is taken for this state occurrence.
|
|
60
|
+
*/
|
|
61
|
+
}
|
|
62
|
+
feature deferrable: Transfer[0..*] subsets acceptable {
|
|
63
|
+
doc
|
|
64
|
+
/* Transfers to trigger targets of outgoing transition performances can be
|
|
65
|
+
* considered for acceptance more than once.
|
|
66
|
+
*/
|
|
67
|
+
}
|
|
68
|
+
abstract feature acceptable: Transfer[*] {
|
|
69
|
+
doc
|
|
70
|
+
/*
|
|
71
|
+
* Transfers that might be accepted.
|
|
72
|
+
*/
|
|
73
|
+
feature thatSP : StatePerformance [1] = that as StatePerformance;
|
|
74
|
+
feature accableT : Transfer redefines self;
|
|
75
|
+
feature accT : Transfer = thatSP.accepted;
|
|
76
|
+
inv { accableT == accT | incomingTransferSort(accT, accableT) }
|
|
77
|
+
inv { isDispatch implies
|
|
78
|
+
allSubstatePerformances(dispatchScope)->forAll{in oSP : StatePerformance;
|
|
79
|
+
oSP == thatSP | isEmpty(oSP.accepted) |
|
|
80
|
+
includes(thatSP.exit.startShot.successors, oSP.exit.startShot) |
|
|
81
|
+
( oSP.accepted != accableT &
|
|
82
|
+
( incomingTransferSort(oSP.accepted, accableT) |
|
|
83
|
+
includes(oSP.deferrable, accableT) ) ) } }
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function allSubstatePerformances {
|
|
87
|
+
in p : Performance [1];
|
|
88
|
+
feature substatePerformances: StatePerformance [*] =
|
|
89
|
+
p.subperformances->select{in subp:Performance; subp istype StatePerformance};
|
|
90
|
+
return : StatePerformance [*] =
|
|
91
|
+
union(substatePerformances,
|
|
92
|
+
substatePerformances->collect{in sp:StatePerformance; allSubstatePerformances(sp) } );
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
private succession [*] acceptable then [1] exit;
|
|
96
|
+
|
|
97
|
+
feature redefines isRunToCompletion default this.isRunToCompletion;
|
|
98
|
+
feature redefines runToCompletionScope default this.runToCompletionScope;
|
|
99
|
+
inv { isRunToCompletion implies
|
|
100
|
+
allSubtransitionPerformances(runToCompletionScope)->forAll{in tp : TransitionPerformance;
|
|
101
|
+
includes(tp.successors, entry) | includes(tp.predecessors, entry) }
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function allSubtransitionPerformances {
|
|
105
|
+
in p : Performance [1];
|
|
106
|
+
feature subtransitionPerformances: TransitionPerformance [*] =
|
|
107
|
+
p.subperformances->select{in subp:Performance;
|
|
108
|
+
subp istype StateTransitionPerformance };
|
|
109
|
+
return : TransitionPerformance [*] =
|
|
110
|
+
union(subtransitionPerformances,
|
|
111
|
+
subtransitionPerformances->collect{in sp:TransitionPerformance;
|
|
112
|
+
allSubtransitionPerformances(sp) } );
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
behavior StateTransitionPerformance specializes TransitionPerformance {
|
|
117
|
+
feature isTriggerDuring: Boolean[1];
|
|
118
|
+
inv { not transitionLinkSource.isTriggerDuring | isTriggerDuring }
|
|
119
|
+
|
|
120
|
+
in feature transitionLinkSource: StatePerformance redefines TransitionPerformance::transitionLinkSource {
|
|
121
|
+
feature redefines accepted;
|
|
122
|
+
feature redefines StatePerformance::acceptable;
|
|
123
|
+
}
|
|
124
|
+
private succession [*] transitionLinkSource.nonDoMiddle then [1] Performance::self;
|
|
125
|
+
|
|
126
|
+
private feature transitionLinkTarget [0..1] : Occurrence = transitionLink.laterOccurrence {
|
|
127
|
+
inv { (that istype StatePerformance) implies
|
|
128
|
+
(that as StatePerformance).incomingTransitionTrigger == trigger }
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
feature acceptable: Transfer [*] subsets transitionLinkSource.acceptable, triggerTarget.incomingTransfersToSelf;
|
|
132
|
+
|
|
133
|
+
feature trigger redefines TransitionPerformance::trigger subsets acceptable, transitionLinkSource.accepted {
|
|
134
|
+
feature redefines endShot;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
private feature tdNum: Natural [1] = if not isTriggerDuring ? 0 else size(trigger);
|
|
138
|
+
private connector linkTriggerDuring: HappensDuring[tdNum] from [*] trigger.endShot to [0..1] transitionLinkSource;
|
|
139
|
+
|
|
140
|
+
private succession all [*] acceptable then [*] guard;
|
|
141
|
+
private succession [*] guard then [1] transitionLinkSource.exit;
|
|
142
|
+
|
|
143
|
+
private succession [accNum] accept then [1] transitionLinkSource.exit;
|
|
144
|
+
}
|
|
145
|
+
}
|