@memoarchitect/tools 0.6.7 → 0.8.7
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 +36 -11
- package/corpus/README.md +63 -0
- package/corpus/sysml-v2-release/bnf/SysML-graphical-bnf.kgbnf +2264 -0
- package/package.json +20 -7
- package/packages/tools/lib/analysis/dsm.d.ts +1 -1
- package/packages/tools/lib/analysis/dsm.d.ts.map +1 -1
- package/packages/tools/lib/analysis/dsm.js +1 -1
- package/packages/tools/lib/analysis/dsm.js.map +1 -1
- package/packages/tools/lib/bin/memo.js +186 -10
- package/packages/tools/lib/bin/memo.js.map +1 -1
- package/packages/tools/lib/browser/index.d.ts +3 -1
- package/packages/tools/lib/browser/index.d.ts.map +1 -1
- package/packages/tools/lib/browser/index.js +2 -1
- package/packages/tools/lib/browser/index.js.map +1 -1
- package/packages/tools/lib/commands/ask.js +1 -1
- package/packages/tools/lib/commands/ask.js.map +1 -1
- package/packages/tools/lib/commands/check.d.ts.map +1 -1
- package/packages/tools/lib/commands/check.js +3 -9
- package/packages/tools/lib/commands/check.js.map +1 -1
- package/packages/tools/lib/commands/conformance.d.ts +36 -0
- package/packages/tools/lib/commands/conformance.d.ts.map +1 -0
- package/packages/tools/lib/commands/conformance.js +212 -0
- package/packages/tools/lib/commands/conformance.js.map +1 -0
- package/packages/tools/lib/commands/convert.d.ts +12 -0
- package/packages/tools/lib/commands/convert.d.ts.map +1 -0
- package/packages/tools/lib/commands/convert.js +103 -0
- package/packages/tools/lib/commands/convert.js.map +1 -0
- package/packages/tools/lib/commands/create-package.d.ts +1 -2
- package/packages/tools/lib/commands/create-package.d.ts.map +1 -1
- package/packages/tools/lib/commands/create-package.js.map +1 -1
- package/packages/tools/lib/commands/dev.d.ts +13 -0
- package/packages/tools/lib/commands/dev.d.ts.map +1 -1
- package/packages/tools/lib/commands/dev.js +245 -89
- package/packages/tools/lib/commands/dev.js.map +1 -1
- package/packages/tools/lib/commands/dhf-draft.js +1 -1
- package/packages/tools/lib/commands/dhf-draft.js.map +1 -1
- package/packages/tools/lib/commands/dhf-lint.d.ts +10 -0
- package/packages/tools/lib/commands/dhf-lint.d.ts.map +1 -0
- package/packages/tools/lib/commands/dhf-lint.js +72 -0
- package/packages/tools/lib/commands/dhf-lint.js.map +1 -0
- package/packages/tools/lib/commands/dhf-preview.js +1 -1
- package/packages/tools/lib/commands/dhf-preview.js.map +1 -1
- package/packages/tools/lib/commands/dhf.d.ts.map +1 -1
- package/packages/tools/lib/commands/dhf.js +8 -2
- package/packages/tools/lib/commands/dhf.js.map +1 -1
- package/packages/tools/lib/commands/element.d.ts +34 -0
- package/packages/tools/lib/commands/element.d.ts.map +1 -0
- package/packages/tools/lib/commands/element.js +174 -0
- package/packages/tools/lib/commands/element.js.map +1 -0
- package/packages/tools/lib/commands/export.d.ts.map +1 -1
- package/packages/tools/lib/commands/export.js +39 -40
- package/packages/tools/lib/commands/export.js.map +1 -1
- package/packages/tools/lib/commands/generate.d.ts.map +1 -1
- package/packages/tools/lib/commands/generate.js +10 -7
- package/packages/tools/lib/commands/generate.js.map +1 -1
- package/packages/tools/lib/commands/import.d.ts.map +1 -1
- package/packages/tools/lib/commands/import.js +25 -12
- package/packages/tools/lib/commands/import.js.map +1 -1
- package/packages/tools/lib/commands/init.d.ts.map +1 -1
- package/packages/tools/lib/commands/init.js +34 -14
- package/packages/tools/lib/commands/init.js.map +1 -1
- package/packages/tools/lib/commands/inspect.d.ts +5 -0
- package/packages/tools/lib/commands/inspect.d.ts.map +1 -0
- package/packages/tools/lib/commands/inspect.js +56 -0
- package/packages/tools/lib/commands/inspect.js.map +1 -0
- package/packages/tools/lib/commands/lock.d.ts.map +1 -1
- package/packages/tools/lib/commands/lock.js +7 -2
- package/packages/tools/lib/commands/lock.js.map +1 -1
- package/packages/tools/lib/commands/ontology.d.ts.map +1 -1
- package/packages/tools/lib/commands/ontology.js +69 -116
- package/packages/tools/lib/commands/ontology.js.map +1 -1
- package/packages/tools/lib/commands/pack.d.ts +1 -1
- package/packages/tools/lib/commands/pack.d.ts.map +1 -1
- package/packages/tools/lib/commands/pack.js +20 -78
- package/packages/tools/lib/commands/pack.js.map +1 -1
- package/packages/tools/lib/commands/package.d.ts +10 -0
- package/packages/tools/lib/commands/package.d.ts.map +1 -0
- package/packages/tools/lib/commands/package.js +113 -0
- package/packages/tools/lib/commands/package.js.map +1 -0
- package/packages/tools/lib/commands/plugin.js +1 -1
- package/packages/tools/lib/commands/plugin.js.map +1 -1
- package/packages/tools/lib/commands/rules.d.ts.map +1 -1
- package/packages/tools/lib/commands/rules.js +120 -30
- package/packages/tools/lib/commands/rules.js.map +1 -1
- package/packages/tools/lib/commands/standards.d.ts +28 -0
- package/packages/tools/lib/commands/standards.d.ts.map +1 -0
- package/packages/tools/lib/commands/standards.js +203 -0
- package/packages/tools/lib/commands/standards.js.map +1 -0
- package/packages/tools/lib/commands/sysand-publish.d.ts.map +1 -1
- package/packages/tools/lib/commands/sysand-publish.js +14 -16
- package/packages/tools/lib/commands/sysand-publish.js.map +1 -1
- package/packages/tools/lib/commands/toolchain.d.ts +8 -0
- package/packages/tools/lib/commands/toolchain.d.ts.map +1 -0
- package/packages/tools/lib/commands/toolchain.js +64 -0
- package/packages/tools/lib/commands/toolchain.js.map +1 -0
- package/packages/tools/lib/commands/validate.d.ts +1 -1
- package/packages/tools/lib/commands/validate.d.ts.map +1 -1
- package/packages/tools/lib/commands/validate.js +194 -56
- package/packages/tools/lib/commands/validate.js.map +1 -1
- package/packages/tools/lib/completeness/tracker.d.ts +10 -2
- package/packages/tools/lib/completeness/tracker.d.ts.map +1 -1
- package/packages/tools/lib/completeness/tracker.js +16 -21
- package/packages/tools/lib/completeness/tracker.js.map +1 -1
- package/packages/tools/lib/conformance/baseline.d.ts +26 -0
- package/packages/tools/lib/conformance/baseline.d.ts.map +1 -0
- package/packages/tools/lib/conformance/baseline.js +170 -0
- package/packages/tools/lib/conformance/baseline.js.map +1 -0
- package/packages/tools/lib/conformance/bnf.d.ts +84 -0
- package/packages/tools/lib/conformance/bnf.d.ts.map +1 -0
- package/packages/tools/lib/conformance/bnf.js +166 -0
- package/packages/tools/lib/conformance/bnf.js.map +1 -0
- package/packages/tools/lib/conformance/corpus.d.ts +125 -0
- package/packages/tools/lib/conformance/corpus.d.ts.map +1 -0
- package/packages/tools/lib/conformance/corpus.js +190 -0
- package/packages/tools/lib/conformance/corpus.js.map +1 -0
- package/packages/tools/lib/conformance/diff-xmi.d.ts +118 -0
- package/packages/tools/lib/conformance/diff-xmi.d.ts.map +1 -0
- package/packages/tools/lib/conformance/diff-xmi.js +276 -0
- package/packages/tools/lib/conformance/diff-xmi.js.map +1 -0
- package/packages/tools/lib/conformance/generated/syside-rules.d.ts +10 -0
- package/packages/tools/lib/conformance/generated/syside-rules.d.ts.map +1 -0
- package/packages/tools/lib/conformance/generated/syside-rules.js +1142 -0
- package/packages/tools/lib/conformance/generated/syside-rules.js.map +1 -0
- package/packages/tools/lib/conformance/index.d.ts +7 -0
- package/packages/tools/lib/conformance/index.d.ts.map +1 -0
- package/packages/tools/lib/conformance/index.js +19 -0
- package/packages/tools/lib/conformance/index.js.map +1 -0
- package/packages/tools/lib/conformance/run.d.ts +117 -0
- package/packages/tools/lib/conformance/run.d.ts.map +1 -0
- package/packages/tools/lib/conformance/run.js +0 -0
- package/packages/tools/lib/conformance/run.js.map +1 -0
- package/packages/tools/lib/conformance/xmi.d.ts +45 -0
- package/packages/tools/lib/conformance/xmi.d.ts.map +1 -0
- package/packages/tools/lib/conformance/xmi.js +148 -0
- package/packages/tools/lib/conformance/xmi.js.map +1 -0
- package/packages/tools/lib/dhf/document-compiler.d.ts.map +1 -1
- package/packages/tools/lib/dhf/document-compiler.js +13 -8
- package/packages/tools/lib/dhf/document-compiler.js.map +1 -1
- package/packages/tools/lib/dhf/document-registry.d.ts +16 -2
- package/packages/tools/lib/dhf/document-registry.d.ts.map +1 -1
- package/packages/tools/lib/dhf/document-registry.js +74 -23
- package/packages/tools/lib/dhf/document-registry.js.map +1 -1
- package/packages/tools/lib/dhf/index.d.ts +3 -0
- package/packages/tools/lib/dhf/index.d.ts.map +1 -1
- package/packages/tools/lib/dhf/index.js +4 -0
- package/packages/tools/lib/dhf/index.js.map +1 -1
- package/packages/tools/lib/dhf/query-engine.d.ts +12 -1
- package/packages/tools/lib/dhf/query-engine.d.ts.map +1 -1
- package/packages/tools/lib/dhf/query-engine.js +2 -1
- package/packages/tools/lib/dhf/query-engine.js.map +1 -1
- package/packages/tools/lib/dhf/query-executor.d.ts +72 -5
- package/packages/tools/lib/dhf/query-executor.d.ts.map +1 -1
- package/packages/tools/lib/dhf/query-executor.js +471 -81
- package/packages/tools/lib/dhf/query-executor.js.map +1 -1
- package/packages/tools/lib/dhf/script-runner.js +6 -6
- package/packages/tools/lib/dhf/script-runner.js.map +1 -1
- package/packages/tools/lib/dhf/standards-block.d.ts +40 -0
- package/packages/tools/lib/dhf/standards-block.d.ts.map +1 -0
- package/packages/tools/lib/dhf/standards-block.js +223 -0
- package/packages/tools/lib/dhf/standards-block.js.map +1 -0
- package/packages/tools/lib/dhf/standards-library.d.ts +123 -0
- package/packages/tools/lib/dhf/standards-library.d.ts.map +1 -0
- package/packages/tools/lib/dhf/standards-library.js +295 -0
- package/packages/tools/lib/dhf/standards-library.js.map +1 -0
- package/packages/tools/lib/dhf/standards-report.d.ts +189 -0
- package/packages/tools/lib/dhf/standards-report.d.ts.map +1 -0
- package/packages/tools/lib/dhf/standards-report.js +384 -0
- package/packages/tools/lib/dhf/standards-report.js.map +1 -0
- package/packages/tools/lib/dhf/template-lint.d.ts +42 -0
- package/packages/tools/lib/dhf/template-lint.d.ts.map +1 -0
- package/packages/tools/lib/dhf/template-lint.js +421 -0
- package/packages/tools/lib/dhf/template-lint.js.map +1 -0
- package/packages/tools/lib/dhf/template-resolver.d.ts.map +1 -1
- package/packages/tools/lib/dhf/template-resolver.js +18 -6
- package/packages/tools/lib/dhf/template-resolver.js.map +1 -1
- package/packages/tools/lib/import/column-mapper.d.ts +2 -2
- package/packages/tools/lib/import/column-mapper.d.ts.map +1 -1
- package/packages/tools/lib/import/column-mapper.js +3 -3
- package/packages/tools/lib/import/column-mapper.js.map +1 -1
- package/packages/tools/lib/importer/cameo-importer.js +2 -2
- package/packages/tools/lib/importer/cameo-importer.js.map +1 -1
- package/packages/tools/lib/importer/ea-importer.d.ts.map +1 -1
- package/packages/tools/lib/importer/ea-importer.js +4 -3
- package/packages/tools/lib/importer/ea-importer.js.map +1 -1
- package/packages/tools/lib/importer/owl-importer.d.ts.map +1 -1
- package/packages/tools/lib/importer/owl-importer.js +2 -3
- package/packages/tools/lib/importer/owl-importer.js.map +1 -1
- package/packages/tools/lib/index.d.ts +20 -3
- package/packages/tools/lib/index.d.ts.map +1 -1
- package/packages/tools/lib/index.js +19 -2
- package/packages/tools/lib/index.js.map +1 -1
- package/packages/tools/lib/language/generated/ast.d.ts +1344 -99
- package/packages/tools/lib/language/generated/ast.d.ts.map +1 -1
- package/packages/tools/lib/language/generated/ast.js +1066 -32
- package/packages/tools/lib/language/generated/ast.js.map +1 -1
- package/packages/tools/lib/language/generated/grammar.d.ts.map +1 -1
- package/packages/tools/lib/language/generated/grammar.js +5242 -1454
- package/packages/tools/lib/language/generated/grammar.js.map +1 -1
- package/packages/tools/lib/llm/chat-engine.d.ts +4 -3
- package/packages/tools/lib/llm/chat-engine.d.ts.map +1 -1
- package/packages/tools/lib/llm/chat-engine.js +15 -12
- package/packages/tools/lib/llm/chat-engine.js.map +1 -1
- package/packages/tools/lib/llm/generate-engine.d.ts +7 -2
- package/packages/tools/lib/llm/generate-engine.d.ts.map +1 -1
- package/packages/tools/lib/llm/generate-engine.js +22 -4
- package/packages/tools/lib/llm/generate-engine.js.map +1 -1
- package/packages/tools/lib/llm/index.d.ts +1 -0
- package/packages/tools/lib/llm/index.d.ts.map +1 -1
- package/packages/tools/lib/llm/index.js +1 -0
- package/packages/tools/lib/llm/index.js.map +1 -1
- package/packages/tools/lib/llm/model-context.d.ts +2 -2
- package/packages/tools/lib/llm/model-context.d.ts.map +1 -1
- package/packages/tools/lib/llm/model-context.js +7 -13
- package/packages/tools/lib/llm/model-context.js.map +1 -1
- package/packages/tools/lib/llm/sysml-guidance.d.ts +8 -0
- package/packages/tools/lib/llm/sysml-guidance.d.ts.map +1 -0
- package/packages/tools/lib/llm/sysml-guidance.js +28 -0
- package/packages/tools/lib/llm/sysml-guidance.js.map +1 -0
- package/packages/tools/lib/lock.d.ts +14 -8
- package/packages/tools/lib/lock.d.ts.map +1 -1
- package/packages/tools/lib/lock.js +97 -108
- package/packages/tools/lib/lock.js.map +1 -1
- package/packages/tools/lib/mcp/model-loader.d.ts +3 -0
- package/packages/tools/lib/mcp/model-loader.d.ts.map +1 -1
- package/packages/tools/lib/mcp/model-loader.js +9 -5
- package/packages/tools/lib/mcp/model-loader.js.map +1 -1
- package/packages/tools/lib/mcp/tools.d.ts +3 -0
- package/packages/tools/lib/mcp/tools.d.ts.map +1 -1
- package/packages/tools/lib/mcp/tools.js +8 -9
- package/packages/tools/lib/mcp/tools.js.map +1 -1
- package/packages/tools/lib/model/activity-notation.d.ts +54 -0
- package/packages/tools/lib/model/activity-notation.d.ts.map +1 -0
- package/packages/tools/lib/model/activity-notation.js +208 -0
- package/packages/tools/lib/model/activity-notation.js.map +1 -0
- package/packages/tools/lib/model/builder.d.ts +3 -0
- package/packages/tools/lib/model/builder.d.ts.map +1 -1
- package/packages/tools/lib/model/builder.js +956 -62
- package/packages/tools/lib/model/builder.js.map +1 -1
- package/packages/tools/lib/model/config-loader.d.ts +19 -25
- package/packages/tools/lib/model/config-loader.d.ts.map +1 -1
- package/packages/tools/lib/model/config-loader.js +51 -233
- package/packages/tools/lib/model/config-loader.js.map +1 -1
- package/packages/tools/lib/model/config.d.ts +42 -213
- package/packages/tools/lib/model/config.d.ts.map +1 -1
- package/packages/tools/lib/model/config.js +11 -9
- package/packages/tools/lib/model/config.js.map +1 -1
- package/packages/tools/lib/model/effective-scope.d.ts +74 -0
- package/packages/tools/lib/model/effective-scope.d.ts.map +1 -0
- package/packages/tools/lib/model/effective-scope.js +133 -0
- package/packages/tools/lib/model/effective-scope.js.map +1 -0
- package/packages/tools/lib/model/ir-identity.d.ts +94 -0
- package/packages/tools/lib/model/ir-identity.d.ts.map +1 -0
- package/packages/tools/lib/model/ir-identity.js +178 -0
- package/packages/tools/lib/model/ir-identity.js.map +1 -0
- package/packages/tools/lib/model/kind-registry.d.ts +134 -1
- package/packages/tools/lib/model/kind-registry.d.ts.map +1 -1
- package/packages/tools/lib/model/kind-registry.js +186 -4
- package/packages/tools/lib/model/kind-registry.js.map +1 -1
- package/packages/tools/lib/model/layer-resolver.js +1 -1
- package/packages/tools/lib/model/layer-resolver.js.map +1 -1
- package/packages/tools/lib/model/manifest.d.ts +8 -0
- package/packages/tools/lib/model/manifest.d.ts.map +1 -1
- package/packages/tools/lib/model/manifest.js +3 -0
- package/packages/tools/lib/model/manifest.js.map +1 -1
- package/packages/tools/lib/model/methodology-loader.d.ts +19 -24
- package/packages/tools/lib/model/methodology-loader.d.ts.map +1 -1
- package/packages/tools/lib/model/methodology-loader.js +179 -176
- package/packages/tools/lib/model/methodology-loader.js.map +1 -1
- package/packages/tools/lib/model/methodology-resolver.d.ts +115 -0
- package/packages/tools/lib/model/methodology-resolver.d.ts.map +1 -0
- package/packages/tools/lib/model/methodology-resolver.js +317 -0
- package/packages/tools/lib/model/methodology-resolver.js.map +1 -0
- package/packages/tools/lib/model/naming.d.ts +57 -0
- package/packages/tools/lib/model/naming.d.ts.map +1 -0
- package/packages/tools/lib/model/naming.js +69 -0
- package/packages/tools/lib/model/naming.js.map +1 -0
- package/packages/tools/lib/model/native-project.d.ts +130 -0
- package/packages/tools/lib/model/native-project.d.ts.map +1 -0
- package/packages/tools/lib/model/native-project.js +580 -0
- package/packages/tools/lib/model/native-project.js.map +1 -0
- package/packages/tools/lib/model/ontology-loader.d.ts +34 -21
- package/packages/tools/lib/model/ontology-loader.d.ts.map +1 -1
- package/packages/tools/lib/model/ontology-loader.js +343 -614
- package/packages/tools/lib/model/ontology-loader.js.map +1 -1
- package/packages/tools/lib/model/package-manifest.d.ts +37 -0
- package/packages/tools/lib/model/package-manifest.d.ts.map +1 -0
- package/packages/tools/lib/model/package-manifest.js +96 -0
- package/packages/tools/lib/model/package-manifest.js.map +1 -0
- package/packages/tools/lib/model/parser-utils.d.ts +31 -0
- package/packages/tools/lib/model/parser-utils.d.ts.map +1 -1
- package/packages/tools/lib/model/parser-utils.js +89 -1
- package/packages/tools/lib/model/parser-utils.js.map +1 -1
- package/packages/tools/lib/model/paths.d.ts +10 -4
- package/packages/tools/lib/model/paths.d.ts.map +1 -1
- package/packages/tools/lib/model/paths.js +10 -4
- package/packages/tools/lib/model/paths.js.map +1 -1
- package/packages/tools/lib/model/project-conversion.d.ts +226 -0
- package/packages/tools/lib/model/project-conversion.d.ts.map +1 -0
- package/packages/tools/lib/model/project-conversion.js +946 -0
- package/packages/tools/lib/model/project-conversion.js.map +1 -0
- package/packages/tools/lib/model/relationship-legality.d.ts +27 -0
- package/packages/tools/lib/model/relationship-legality.d.ts.map +1 -1
- package/packages/tools/lib/model/relationship-legality.js.map +1 -1
- package/packages/tools/lib/model/relationship-registry.d.ts +93 -1
- package/packages/tools/lib/model/relationship-registry.d.ts.map +1 -1
- package/packages/tools/lib/model/relationship-registry.js +217 -2
- package/packages/tools/lib/model/relationship-registry.js.map +1 -1
- package/packages/tools/lib/model/semantic.d.ts +73 -0
- package/packages/tools/lib/model/semantic.d.ts.map +1 -1
- package/packages/tools/lib/model/semantic.js +6 -0
- package/packages/tools/lib/model/semantic.js.map +1 -1
- package/packages/tools/lib/model/settings-boundary.d.ts +19 -0
- package/packages/tools/lib/model/settings-boundary.d.ts.map +1 -0
- package/packages/tools/lib/model/settings-boundary.js +118 -0
- package/packages/tools/lib/model/settings-boundary.js.map +1 -0
- package/packages/tools/lib/model/short-id.js +3 -3
- package/packages/tools/lib/model/short-id.js.map +1 -1
- package/packages/tools/lib/model/source-graph.d.ts.map +1 -1
- package/packages/tools/lib/model/source-graph.js +5 -1
- package/packages/tools/lib/model/source-graph.js.map +1 -1
- package/packages/tools/lib/model/source-provenance.d.ts +112 -0
- package/packages/tools/lib/model/source-provenance.d.ts.map +1 -0
- package/packages/tools/lib/model/source-provenance.js +169 -0
- package/packages/tools/lib/model/source-provenance.js.map +1 -0
- package/packages/tools/lib/model/sysml-ir.d.ts +9 -0
- package/packages/tools/lib/model/sysml-ir.d.ts.map +1 -0
- package/packages/tools/lib/model/sysml-ir.js +105 -0
- package/packages/tools/lib/model/sysml-ir.js.map +1 -0
- package/packages/tools/lib/model/view-deriver.d.ts +10 -1
- package/packages/tools/lib/model/view-deriver.d.ts.map +1 -1
- package/packages/tools/lib/model/view-deriver.js +139 -11
- package/packages/tools/lib/model/view-deriver.js.map +1 -1
- package/packages/tools/lib/model/view-kinds.d.ts +2 -0
- package/packages/tools/lib/model/view-kinds.d.ts.map +1 -1
- package/packages/tools/lib/model/view-kinds.js +11 -0
- package/packages/tools/lib/model/view-kinds.js.map +1 -1
- package/packages/tools/lib/ontology/owl-exporter.d.ts +2 -2
- package/packages/tools/lib/ontology/owl-exporter.d.ts.map +1 -1
- package/packages/tools/lib/ontology/owl-exporter.js +12 -12
- package/packages/tools/lib/ontology/owl-exporter.js.map +1 -1
- package/packages/tools/lib/operations/ai-authoring.d.ts +24 -0
- package/packages/tools/lib/operations/ai-authoring.d.ts.map +1 -0
- package/packages/tools/lib/operations/ai-authoring.js +77 -0
- package/packages/tools/lib/operations/ai-authoring.js.map +1 -0
- package/packages/tools/lib/operations/authoring.d.ts +40 -0
- package/packages/tools/lib/operations/authoring.d.ts.map +1 -0
- package/packages/tools/lib/operations/authoring.js +56 -0
- package/packages/tools/lib/operations/authoring.js.map +1 -0
- package/packages/tools/lib/operations/index.d.ts +2 -0
- package/packages/tools/lib/operations/index.d.ts.map +1 -1
- package/packages/tools/lib/operations/index.js +2 -0
- package/packages/tools/lib/operations/index.js.map +1 -1
- package/packages/tools/lib/operations/project-snapshot.d.ts +28 -3
- package/packages/tools/lib/operations/project-snapshot.d.ts.map +1 -1
- package/packages/tools/lib/operations/project-snapshot.js +79 -30
- package/packages/tools/lib/operations/project-snapshot.js.map +1 -1
- package/packages/tools/lib/protocol/messages.d.ts +381 -12
- package/packages/tools/lib/protocol/messages.d.ts.map +1 -1
- package/packages/tools/lib/serializer/csv-io.d.ts +7 -7
- package/packages/tools/lib/serializer/csv-io.d.ts.map +1 -1
- package/packages/tools/lib/serializer/csv-io.js +11 -11
- package/packages/tools/lib/serializer/csv-io.js.map +1 -1
- package/packages/tools/lib/serializer/sysml-generator.d.ts.map +1 -1
- package/packages/tools/lib/serializer/sysml-generator.js +34 -2
- package/packages/tools/lib/serializer/sysml-generator.js.map +1 -1
- package/packages/tools/lib/server/config-resolver.d.ts +8 -4
- package/packages/tools/lib/server/config-resolver.d.ts.map +1 -1
- package/packages/tools/lib/server/config-resolver.js +25 -44
- package/packages/tools/lib/server/config-resolver.js.map +1 -1
- package/packages/tools/lib/server/conflict-policy.d.ts +44 -0
- package/packages/tools/lib/server/conflict-policy.d.ts.map +1 -0
- package/packages/tools/lib/server/conflict-policy.js +94 -0
- package/packages/tools/lib/server/conflict-policy.js.map +1 -0
- package/packages/tools/lib/server/dev-server.d.ts +32 -2
- package/packages/tools/lib/server/dev-server.d.ts.map +1 -1
- package/packages/tools/lib/server/dev-server.js +875 -54
- package/packages/tools/lib/server/dev-server.js.map +1 -1
- package/packages/tools/lib/server/element-writer.d.ts +11 -0
- package/packages/tools/lib/server/element-writer.d.ts.map +1 -0
- package/packages/tools/lib/server/element-writer.js +123 -0
- package/packages/tools/lib/server/element-writer.js.map +1 -0
- package/packages/tools/lib/server/file-watcher.d.ts +4 -1
- package/packages/tools/lib/server/file-watcher.d.ts.map +1 -1
- package/packages/tools/lib/server/file-watcher.js +17 -7
- package/packages/tools/lib/server/file-watcher.js.map +1 -1
- package/packages/tools/lib/server/mutation-domain.d.ts +22 -0
- package/packages/tools/lib/server/mutation-domain.d.ts.map +1 -0
- package/packages/tools/lib/server/mutation-domain.js +87 -0
- package/packages/tools/lib/server/mutation-domain.js.map +1 -0
- package/packages/tools/lib/server/package-source.d.ts +26 -0
- package/packages/tools/lib/server/package-source.d.ts.map +1 -0
- package/packages/tools/lib/server/package-source.js +81 -0
- package/packages/tools/lib/server/package-source.js.map +1 -0
- package/packages/tools/lib/server/package-writer.d.ts +94 -0
- package/packages/tools/lib/server/package-writer.d.ts.map +1 -0
- package/packages/tools/lib/server/package-writer.js +317 -0
- package/packages/tools/lib/server/package-writer.js.map +1 -0
- package/packages/tools/lib/server/persistor.d.ts +81 -6
- package/packages/tools/lib/server/persistor.d.ts.map +1 -1
- package/packages/tools/lib/server/persistor.js +173 -44
- package/packages/tools/lib/server/persistor.js.map +1 -1
- package/packages/tools/lib/server/relationship-writer.d.ts +41 -5
- package/packages/tools/lib/server/relationship-writer.d.ts.map +1 -1
- package/packages/tools/lib/server/relationship-writer.js +157 -13
- package/packages/tools/lib/server/relationship-writer.js.map +1 -1
- package/packages/tools/lib/server/rule-policy-writer.d.ts +40 -0
- package/packages/tools/lib/server/rule-policy-writer.d.ts.map +1 -0
- package/packages/tools/lib/server/rule-policy-writer.js +124 -0
- package/packages/tools/lib/server/rule-policy-writer.js.map +1 -0
- package/packages/tools/lib/server/runtime-budget.d.ts +14 -0
- package/packages/tools/lib/server/runtime-budget.d.ts.map +1 -0
- package/packages/tools/lib/server/runtime-budget.js +15 -0
- package/packages/tools/lib/server/runtime-budget.js.map +1 -0
- package/packages/tools/lib/server/sysml-notation.d.ts +36 -0
- package/packages/tools/lib/server/sysml-notation.d.ts.map +1 -0
- package/packages/tools/lib/server/sysml-notation.js +104 -0
- package/packages/tools/lib/server/sysml-notation.js.map +1 -0
- package/packages/tools/lib/server/view-layout-store.d.ts.map +1 -1
- package/packages/tools/lib/server/view-layout-store.js +1 -0
- package/packages/tools/lib/server/view-layout-store.js.map +1 -1
- package/packages/tools/lib/sysml-ir/generated/sysml-derivations.d.ts +9 -0
- package/packages/tools/lib/sysml-ir/generated/sysml-derivations.d.ts.map +1 -0
- package/packages/tools/lib/sysml-ir/generated/sysml-derivations.js +315 -0
- package/packages/tools/lib/sysml-ir/generated/sysml-derivations.js.map +1 -0
- package/packages/tools/lib/sysml-ir/generated/sysml-metamodel.d.ts +5206 -0
- package/packages/tools/lib/sysml-ir/generated/sysml-metamodel.d.ts.map +1 -0
- package/packages/tools/lib/sysml-ir/generated/sysml-metamodel.js +1933 -0
- package/packages/tools/lib/sysml-ir/generated/sysml-metamodel.js.map +1 -0
- package/packages/tools/lib/sysml-ir/index.d.ts +3 -0
- package/packages/tools/lib/sysml-ir/index.d.ts.map +1 -0
- package/packages/tools/lib/sysml-ir/index.js +3 -0
- package/packages/tools/lib/sysml-ir/index.js.map +1 -0
- package/packages/tools/lib/sysml-ir/ir.d.ts +50 -0
- package/packages/tools/lib/sysml-ir/ir.d.ts.map +1 -0
- package/packages/tools/lib/sysml-ir/ir.js +2 -0
- package/packages/tools/lib/sysml-ir/ir.js.map +1 -0
- package/packages/tools/lib/sysmlc/bin/memo-sysmlc.d.ts +3 -0
- package/packages/tools/lib/sysmlc/bin/memo-sysmlc.d.ts.map +1 -0
- package/packages/tools/lib/sysmlc/bin/memo-sysmlc.js +97 -0
- package/packages/tools/lib/sysmlc/bin/memo-sysmlc.js.map +1 -0
- package/packages/tools/lib/sysmlc/index.d.ts +2 -0
- package/packages/tools/lib/sysmlc/index.d.ts.map +1 -0
- package/packages/tools/lib/sysmlc/index.js +7 -0
- package/packages/tools/lib/sysmlc/index.js.map +1 -0
- package/packages/tools/lib/sysmlc/server.d.ts +29 -0
- package/packages/tools/lib/sysmlc/server.d.ts.map +1 -0
- package/packages/tools/lib/sysmlc/server.js +168 -0
- package/packages/tools/lib/sysmlc/server.js.map +1 -0
- package/packages/tools/lib/toolchain/default-registry.d.ts +12 -0
- package/packages/tools/lib/toolchain/default-registry.d.ts.map +1 -0
- package/packages/tools/lib/toolchain/default-registry.js +28 -0
- package/packages/tools/lib/toolchain/default-registry.js.map +1 -0
- package/packages/tools/lib/toolchain/diagnostic.d.ts +57 -0
- package/packages/tools/lib/toolchain/diagnostic.d.ts.map +1 -0
- package/packages/tools/lib/toolchain/diagnostic.js +69 -0
- package/packages/tools/lib/toolchain/diagnostic.js.map +1 -0
- package/packages/tools/lib/toolchain/effective.d.ts +36 -0
- package/packages/tools/lib/toolchain/effective.d.ts.map +1 -0
- package/packages/tools/lib/toolchain/effective.js +91 -0
- package/packages/tools/lib/toolchain/effective.js.map +1 -0
- package/packages/tools/lib/toolchain/index.d.ts +11 -0
- package/packages/tools/lib/toolchain/index.d.ts.map +1 -0
- package/packages/tools/lib/toolchain/index.js +21 -0
- package/packages/tools/lib/toolchain/index.js.map +1 -0
- package/packages/tools/lib/toolchain/lowering.d.ts +63 -0
- package/packages/tools/lib/toolchain/lowering.d.ts.map +1 -0
- package/packages/tools/lib/toolchain/lowering.js +100 -0
- package/packages/tools/lib/toolchain/lowering.js.map +1 -0
- package/packages/tools/lib/toolchain/operations.d.ts +87 -0
- package/packages/tools/lib/toolchain/operations.d.ts.map +1 -0
- package/packages/tools/lib/toolchain/operations.js +111 -0
- package/packages/tools/lib/toolchain/operations.js.map +1 -0
- package/packages/tools/lib/toolchain/process.d.ts +45 -0
- package/packages/tools/lib/toolchain/process.d.ts.map +1 -0
- package/packages/tools/lib/toolchain/process.js +125 -0
- package/packages/tools/lib/toolchain/process.js.map +1 -0
- package/packages/tools/lib/toolchain/protocol.d.ts +122 -0
- package/packages/tools/lib/toolchain/protocol.d.ts.map +1 -0
- package/packages/tools/lib/toolchain/protocol.js +74 -0
- package/packages/tools/lib/toolchain/protocol.js.map +1 -0
- package/packages/tools/lib/toolchain/providers/internal-kpar.d.ts +9 -0
- package/packages/tools/lib/toolchain/providers/internal-kpar.d.ts.map +1 -0
- package/packages/tools/lib/toolchain/providers/internal-kpar.js +84 -0
- package/packages/tools/lib/toolchain/providers/internal-kpar.js.map +1 -0
- package/packages/tools/lib/toolchain/providers/internal.d.ts +33 -0
- package/packages/tools/lib/toolchain/providers/internal.d.ts.map +1 -0
- package/packages/tools/lib/toolchain/providers/internal.js +286 -0
- package/packages/tools/lib/toolchain/providers/internal.js.map +1 -0
- package/packages/tools/lib/toolchain/providers/sysand.d.ts +12 -0
- package/packages/tools/lib/toolchain/providers/sysand.d.ts.map +1 -0
- package/packages/tools/lib/toolchain/providers/sysand.js +110 -0
- package/packages/tools/lib/toolchain/providers/sysand.js.map +1 -0
- package/packages/tools/lib/toolchain/providers/syside.d.ts +24 -0
- package/packages/tools/lib/toolchain/providers/syside.d.ts.map +1 -0
- package/packages/tools/lib/toolchain/providers/syside.js +208 -0
- package/packages/tools/lib/toolchain/providers/syside.js.map +1 -0
- package/packages/tools/lib/toolchain/registry.d.ts +192 -0
- package/packages/tools/lib/toolchain/registry.d.ts.map +1 -0
- package/packages/tools/lib/toolchain/registry.js +130 -0
- package/packages/tools/lib/toolchain/registry.js.map +1 -0
- package/packages/tools/lib/toolchain/schema.d.ts +30 -0
- package/packages/tools/lib/toolchain/schema.d.ts.map +1 -0
- package/packages/tools/lib/toolchain/schema.js +112 -0
- package/packages/tools/lib/toolchain/schema.js.map +1 -0
- package/packages/tools/lib/toolchain/sysmlc-client.d.ts +77 -0
- package/packages/tools/lib/toolchain/sysmlc-client.d.ts.map +1 -0
- package/packages/tools/lib/toolchain/sysmlc-client.js +0 -0
- package/packages/tools/lib/toolchain/sysmlc-client.js.map +1 -0
- package/packages/tools/lib/validator/architecture-validator.d.ts +8 -1
- package/packages/tools/lib/validator/architecture-validator.d.ts.map +1 -1
- package/packages/tools/lib/validator/architecture-validator.js +25 -1
- package/packages/tools/lib/validator/architecture-validator.js.map +1 -1
- package/packages/tools/lib/validator/behavior-validator.d.ts +1 -1
- package/packages/tools/lib/validator/behavior-validator.js +1 -1
- package/packages/tools/lib/validator/builtin-rules.d.ts +16 -0
- package/packages/tools/lib/validator/builtin-rules.d.ts.map +1 -0
- package/packages/tools/lib/validator/builtin-rules.js +62 -0
- package/packages/tools/lib/validator/builtin-rules.js.map +1 -0
- package/packages/tools/lib/validator/constraint-eval.d.ts +31 -0
- package/packages/tools/lib/validator/constraint-eval.d.ts.map +1 -1
- package/packages/tools/lib/validator/constraint-eval.js +164 -7
- package/packages/tools/lib/validator/constraint-eval.js.map +1 -1
- package/packages/tools/lib/validator/constraint-loader.d.ts +22 -4
- package/packages/tools/lib/validator/constraint-loader.d.ts.map +1 -1
- package/packages/tools/lib/validator/constraint-loader.js +100 -27
- package/packages/tools/lib/validator/constraint-loader.js.map +1 -1
- package/packages/tools/lib/validator/rule-engine.d.ts +2 -1
- package/packages/tools/lib/validator/rule-engine.d.ts.map +1 -1
- package/packages/tools/lib/validator/rule-engine.js +56 -5
- package/packages/tools/lib/validator/rule-engine.js.map +1 -1
- package/packages/tools/lib/validator/sysml-constraints.d.ts +64 -0
- package/packages/tools/lib/validator/sysml-constraints.d.ts.map +1 -0
- package/packages/tools/lib/validator/sysml-constraints.js +251 -0
- package/packages/tools/lib/validator/sysml-constraints.js.map +1 -0
- package/packages/tools/lib/validator/types.d.ts +33 -0
- package/packages/tools/lib/validator/types.d.ts.map +1 -1
- package/packages/tools/lib/version.d.ts +2 -0
- package/packages/tools/lib/version.d.ts.map +1 -0
- package/packages/tools/lib/version.js +26 -0
- package/packages/tools/lib/version.js.map +1 -0
- package/packages/tools/src/grammar/memo-sysml.langium +517 -41
- package/packages/tools/lib/model/dimension-filter.d.ts +0 -33
- package/packages/tools/lib/model/dimension-filter.d.ts.map +0 -1
- package/packages/tools/lib/model/dimension-filter.js +0 -57
- package/packages/tools/lib/model/dimension-filter.js.map +0 -1
- package/packages/tools/lib/model/toolchain.d.ts +0 -12
- package/packages/tools/lib/model/toolchain.d.ts.map +0 -1
- package/packages/tools/lib/model/toolchain.js +0 -92
- package/packages/tools/lib/model/toolchain.js.map +0 -1
|
@@ -27,8 +27,21 @@ grammar MemoSysML
|
|
|
27
27
|
entry Model:
|
|
28
28
|
members+=NamespaceMember*;
|
|
29
29
|
|
|
30
|
+
// The root namespace accepts definitions, not only packages. SysML v2 permits
|
|
31
|
+
// members at the root of a file and SysIDE accepts `part def X;` standing alone,
|
|
32
|
+
// so rejecting it here was a MEMO-only restriction: valid source failed to
|
|
33
|
+
// parse, and the AST-based loaders then reported the file as contributing
|
|
34
|
+
// nothing. MEMO's own content still nests everything in packages — the
|
|
35
|
+
// portability gate requires that for qualified naming — but the grammar must
|
|
36
|
+
// not reject source the compiler of record accepts.
|
|
30
37
|
NamespaceMember:
|
|
31
|
-
PackageDeclaration
|
|
38
|
+
PackageDeclaration
|
|
39
|
+
| ImportDeclaration
|
|
40
|
+
| AliasDeclaration
|
|
41
|
+
| DefinitionMember
|
|
42
|
+
| UseCaseDeclaration
|
|
43
|
+
| Dependency
|
|
44
|
+
| DocComment;
|
|
32
45
|
|
|
33
46
|
// ─── Package ─────────────────────────────────────────────────────────────────
|
|
34
47
|
|
|
@@ -36,11 +49,19 @@ NamespaceMember:
|
|
|
36
49
|
// Qualified names (`::`) are for references only; deep namespaces are expressed by
|
|
37
50
|
// NESTING packages (`package memo { package arch { … } }`). The model builder
|
|
38
51
|
// reconstructs the full FQN from the nesting (builder.ts: parentPackage::pkg.name).
|
|
52
|
+
// `standard` comes from the normative `LibraryPackage` production
|
|
53
|
+
// (`bnf/KerML-textual-bnf.kebnf:1446`), where it is the flag that marks a
|
|
54
|
+
// library package as part of the standard library rather than a user one. Every
|
|
55
|
+
// one of the 94 vendored normative library files opens with `standard library
|
|
56
|
+
// package`, so without it the parser fails on line 1 of the entire corpus.
|
|
39
57
|
PackageDeclaration:
|
|
40
|
-
isLibrary?='library'? 'package' name=ID '{'
|
|
58
|
+
isStandard?='standard'? isLibrary?='library'? 'package' name=ID '{'
|
|
41
59
|
members+=PackageMember*
|
|
42
60
|
'}';
|
|
43
61
|
|
|
62
|
+
// Flows and successions are legal package members, not only usage-body members:
|
|
63
|
+
// a flow between two action usages declared side by side in a package has no
|
|
64
|
+
// enclosing action to sit inside. SysIDE accepts them here, so the grammar does.
|
|
44
65
|
PackageMember:
|
|
45
66
|
PackageDeclaration
|
|
46
67
|
| AliasDeclaration
|
|
@@ -50,11 +71,29 @@ PackageMember:
|
|
|
50
71
|
| ItemUsage
|
|
51
72
|
| AttributeMember
|
|
52
73
|
| UseCaseDeclaration
|
|
74
|
+
| FlowConnectionUsage
|
|
75
|
+
| SuccessionUsage
|
|
76
|
+
| AbstractConnectionUsage
|
|
53
77
|
| ConnectionUsage
|
|
54
|
-
|
|
|
78
|
+
| SatisfyRequirementUsage
|
|
79
|
+
// Contributes AllocateUsage along with the thirteen other native
|
|
80
|
+
// mechanisms. MEMO declares its actors, stakeholders and concerns as
|
|
81
|
+
// PACKAGE members (`part usrClinician : User;`), so their native spellings
|
|
82
|
+
// have to be legal in the same place or the migration could not be a
|
|
83
|
+
// spelling change.
|
|
84
|
+
| ArcadiaMember
|
|
85
|
+
| Dependency
|
|
55
86
|
| MetadataApplication
|
|
87
|
+
| BindingUsage
|
|
56
88
|
| DocComment;
|
|
57
89
|
|
|
90
|
+
// `bind a = b;` — the native spelling of port delegation, where an enclosing
|
|
91
|
+
// port and a nested part's port are the same feature. MEMO wrote these as
|
|
92
|
+
// flows, which SysIDE rejects: a flow's source must be an output, and a
|
|
93
|
+
// delegation runs `in` to `in`.
|
|
94
|
+
BindingUsage:
|
|
95
|
+
'bind' source=ReferenceName '=' target=ReferenceName ';';
|
|
96
|
+
|
|
58
97
|
// Namespace indirection used by the canonical memo::* facade. Each source file
|
|
59
98
|
// owns a unique package for reliable SysIDE indexing; aliases reconstruct the
|
|
60
99
|
// user-facing hierarchy without reopening packages across documents.
|
|
@@ -88,6 +127,8 @@ DefinitionMember:
|
|
|
88
127
|
| PortDefinition
|
|
89
128
|
| InterfaceDefinition
|
|
90
129
|
| ConnectionDefinition
|
|
130
|
+
| AllocationDefinition
|
|
131
|
+
| ConcernDefinition
|
|
91
132
|
| AttributeDefinition
|
|
92
133
|
| ConstraintDefinition
|
|
93
134
|
| EnumDefinition
|
|
@@ -97,17 +138,49 @@ DefinitionMember:
|
|
|
97
138
|
|
|
98
139
|
// SysML v2 semantic-metadata definition — the standard, portable mechanism for
|
|
99
140
|
// extending the ontology with domain semantics. Applied to elements via `@Name`.
|
|
141
|
+
// The optional `<shortName>` is SysML v2's Identification short name, and for a
|
|
142
|
+
// SemanticMetadata it is the KEYWORD the metadata introduces — `<derive>` in the
|
|
143
|
+
// OMG's own `metadata def <derive> DerivedRequirementMetadata :> SemanticMetadata`
|
|
144
|
+
// (Domain Libraries/Requirement Derivation/RequirementDerivation.sysml). Without
|
|
145
|
+
// it a metadata def cannot say which word it defines, which is most of the point.
|
|
146
|
+
//
|
|
147
|
+
// The short name is lexed as ONE token rather than as `'<' ID '>'`, because the
|
|
148
|
+
// word it introduces is almost always already a keyword — `<allocate>` and
|
|
149
|
+
// `<derive>` both fail an ID match. A keyword is exactly what a metadata def
|
|
150
|
+
// exists to introduce, so the production must not be restricted to non-keywords.
|
|
100
151
|
MetadataDefinition:
|
|
101
|
-
'metadata' 'def' name=ID specialization=Specialization?
|
|
152
|
+
'metadata' 'def' shortName=SHORT_NAME? name=ID specialization=Specialization?
|
|
102
153
|
('{' body+=DefinitionBodyMember* '}' | ';');
|
|
103
154
|
|
|
104
155
|
// Metadata application: `@AnnotationType;` or `@AnnotationType { redefinitions }`
|
|
105
156
|
// applies a metadata def to the enclosing element (standard SysML v2 `@` annotation).
|
|
106
157
|
MetadataApplication:
|
|
107
|
-
'@' type=QualifiedName ('{' body+=
|
|
108
|
-
|
|
158
|
+
'@' type=QualifiedName ('{' body+=MetadataBodyMember* '}' | ';');
|
|
159
|
+
|
|
160
|
+
// Inside a metadata body the `attribute` keyword is NOT accepted — SysIDE's
|
|
161
|
+
// own expected-token list at that position offers `:>>` and `redefines` but
|
|
162
|
+
// not `attribute`, because the members of a metadata usage are already
|
|
163
|
+
// features of its definition. So the bare redefinition is the conforming
|
|
164
|
+
// spelling here and `attribute :>> x = …` is the error, the reverse of every
|
|
165
|
+
// other body in this grammar. Measured against `syside check`, which is the
|
|
166
|
+
// compiler of record.
|
|
167
|
+
MetadataBodyMember:
|
|
168
|
+
MetadataFeatureMember | UsageBodyMember;
|
|
169
|
+
|
|
170
|
+
MetadataFeatureMember:
|
|
171
|
+
redefines?=('redefines' | ':>>') name=MemberName '=' value=AttributeValue ';';
|
|
172
|
+
|
|
173
|
+
// `isVariation` is the second half of the normative `BasicDefinitionPrefix`
|
|
174
|
+
// (`isAbstract ?= 'abstract' | isVariation ?= 'variation'`,
|
|
175
|
+
// SysML-textual-bnf.kebnf:224). A variation definition is a CHOICE POINT: its
|
|
176
|
+
// `variant` members are the alternatives, exactly one of which a configuration
|
|
177
|
+
// picks. That is the construct ARCADIA configurations and situations need, and
|
|
178
|
+
// the one AADL mode-conditioned configuration needs (plan §C4); MEMO could not
|
|
179
|
+
// express either. It is declared on part / attribute / item, which is where a
|
|
180
|
+
// choice point can occur in MEMO's content — not on every definition, because a
|
|
181
|
+
// production nobody can reach is not coverage.
|
|
109
182
|
PartDefinition:
|
|
110
|
-
isAbstract?='abstract'? 'part' 'def' name=ID specialization=Specialization? (',' additionalSpecializations+=QualifiedName)*
|
|
183
|
+
isAbstract?='abstract'? isVariation?='variation'? 'part' 'def' name=ID specialization=Specialization? (',' additionalSpecializations+=QualifiedName)*
|
|
111
184
|
('{' body+=DefinitionBodyMember* '}' | ';');
|
|
112
185
|
|
|
113
186
|
RequirementDefinition:
|
|
@@ -131,7 +204,7 @@ ActionDefinition:
|
|
|
131
204
|
('{' body+=ActionDefBodyMember* '}' | ';');
|
|
132
205
|
|
|
133
206
|
ItemDefinition:
|
|
134
|
-
isAbstract?='abstract'? 'item' 'def' name=ID specialization=Specialization? (',' additionalSpecializations+=QualifiedName)*
|
|
207
|
+
isAbstract?='abstract'? isVariation?='variation'? 'item' 'def' name=ID specialization=Specialization? (',' additionalSpecializations+=QualifiedName)*
|
|
135
208
|
('{' body+=DefinitionBodyMember* '}' | ';');
|
|
136
209
|
|
|
137
210
|
PortDefinition:
|
|
@@ -148,17 +221,43 @@ ConnectionDefinition:
|
|
|
148
221
|
isAbstract?='abstract'? 'connection' 'def' name=ID specialization=Specialization? (',' additionalSpecializations+=QualifiedName)*
|
|
149
222
|
('{' body+=ConnectionBodyMember* '}' | ';');
|
|
150
223
|
|
|
224
|
+
// SysML v2 allocation definition (`AllocationDefinition = OccurrenceDefinitionPrefix
|
|
225
|
+
// 'allocation' 'def' Definition`, SysML-textual-bnf.kebnf:792). An allocation IS a
|
|
226
|
+
// connection — `Allocations::Allocation :> BinaryConnection` — so it takes the same
|
|
227
|
+
// body as a connection def, and `allocation def X :> Allocations::Allocation` is
|
|
228
|
+
// what lets MEMO's AllocatedTo / DeploysTo / BuildsInto root on the standard's
|
|
229
|
+
// allocation base instead of standing beside it (plan B2).
|
|
230
|
+
AllocationDefinition:
|
|
231
|
+
isAbstract?='abstract'? 'allocation' 'def' name=ID specialization=Specialization? (',' additionalSpecializations+=QualifiedName)*
|
|
232
|
+
('{' body+=ConnectionBodyMember* '}' | ';');
|
|
233
|
+
|
|
234
|
+
// SysML v2 concern definition (`ConcernDefinition = OccurrenceDefinitionPrefix
|
|
235
|
+
// 'concern' 'def' DefinitionDeclaration RequirementBody`, :1493). ISO 42010's
|
|
236
|
+
// concern, which MEMO spells `part def Concern`. Its body is a requirement body,
|
|
237
|
+
// so it may carry `subject`, `stakeholder`, and `frame` members. Those reach it
|
|
238
|
+
// through DefinitionBodyMember rather than through a concern-only body rule —
|
|
239
|
+
// the same choice the grammar already makes for `verify`, and for the same
|
|
240
|
+
// reason: SysIDE is the compiler of record for where a member is legal, and a
|
|
241
|
+
// per-construct body rule here would only duplicate that judgement less well.
|
|
242
|
+
ConcernDefinition:
|
|
243
|
+
isAbstract?='abstract'? 'concern' 'def' name=ID specialization=Specialization? (',' additionalSpecializations+=QualifiedName)*
|
|
244
|
+
('{' body+=DefinitionBodyMember* '}' | ';');
|
|
245
|
+
|
|
151
246
|
AttributeDefinition:
|
|
152
|
-
isAbstract?='abstract'? 'attribute' 'def' name=ID specialization=Specialization? (',' additionalSpecializations+=QualifiedName)*
|
|
247
|
+
isAbstract?='abstract'? isVariation?='variation'? 'attribute' 'def' name=ID specialization=Specialization? (',' additionalSpecializations+=QualifiedName)*
|
|
153
248
|
('{' body+=DefinitionBodyMember* '}' | ';');
|
|
154
249
|
|
|
155
250
|
ConstraintDefinition:
|
|
156
251
|
isAbstract?='abstract'? 'constraint' 'def' name=ID specialization=Specialization? (',' additionalSpecializations+=QualifiedName)*
|
|
157
252
|
('{' body+=DefinitionBodyMember* '}' | ';');
|
|
158
253
|
|
|
254
|
+
// An enum body may carry doc comments between its literals. SysIDE accepts
|
|
255
|
+
// them and MEMO did not, so a documented enumeration — which is the only place
|
|
256
|
+
// the meaning of a literal can be written down — failed to parse. `literals`
|
|
257
|
+
// keeps its name and its contents so every existing consumer is unaffected.
|
|
159
258
|
EnumDefinition:
|
|
160
259
|
'enum' 'def' name=ID '{'
|
|
161
|
-
literals+=EnumLiteral*
|
|
260
|
+
(literals+=EnumLiteral | docs+=DocComment)*
|
|
162
261
|
'}';
|
|
163
262
|
|
|
164
263
|
ViewpointDefinition:
|
|
@@ -172,10 +271,15 @@ ViewDefinition:
|
|
|
172
271
|
// ─── Connection definition body ─────────────────────────────────────────────
|
|
173
272
|
|
|
174
273
|
ConnectionBodyMember:
|
|
175
|
-
EndDeclaration | DefinitionBodyMember;
|
|
274
|
+
EndDeclaration | FlowConnectionUsage | DefinitionBodyMember;
|
|
176
275
|
|
|
276
|
+
// An end may redefine the inherited end of its supertype — in MEMO every
|
|
277
|
+
// relation binds its two ends to Connections::BinaryConnection::source and
|
|
278
|
+
// ::target, so the ends of a MEMO relation are readable as ordinary SysML
|
|
279
|
+
// connection ends by any conforming tool.
|
|
177
280
|
EndDeclaration:
|
|
178
|
-
'end' name=FeatureName (':' isConjugated?='~'? type=QualifiedName)? multiplicity=Multiplicity?
|
|
281
|
+
'end' name=FeatureName (':' isConjugated?='~'? type=QualifiedName)? multiplicity=Multiplicity?
|
|
282
|
+
(redefines?=(':>>' | 'redefines') redefinedEnd=QualifiedName)? ';';
|
|
179
283
|
|
|
180
284
|
Multiplicity:
|
|
181
285
|
'[' lower=INT '..' (upper=INT | unbounded?='*') ']'
|
|
@@ -192,12 +296,14 @@ EnumLiteralName returns string:
|
|
|
192
296
|
| 'in' | 'out' | 'inout' | 'part' | 'requirement' | 'action' | 'item' | 'port'
|
|
193
297
|
| 'interface' | 'connection' | 'attribute' | 'constraint' | 'enum' | 'view' | 'viewpoint'
|
|
194
298
|
| 'ref' | 'import' | 'package' | 'flow' | 'first' | 'allocate' | 'library' | 'private' | 'public' | 'state' | 'verification'
|
|
299
|
+
| 'satisfy' | 'verify'
|
|
195
300
|
| 'use' | 'fork' | 'join';
|
|
196
301
|
|
|
197
302
|
// ─── Usages (instances) ─────────────────────────────────────────────────────
|
|
198
303
|
|
|
199
304
|
UsageMember:
|
|
200
305
|
PartUsage
|
|
306
|
+
| MessageUsage
|
|
201
307
|
| RequirementUsage
|
|
202
308
|
| VerificationUsage
|
|
203
309
|
| StateUsage
|
|
@@ -207,7 +313,11 @@ UsageMember:
|
|
|
207
313
|
| ViewUsage;
|
|
208
314
|
|
|
209
315
|
PartUsage:
|
|
210
|
-
'part' name=ID (':' type=QualifiedName)?
|
|
316
|
+
isVariation?='variation'? 'part' name=ID (':' type=QualifiedName multiplicity=Multiplicity?)?
|
|
317
|
+
('{' body+=UsageBodyMember* '}' | ';');
|
|
318
|
+
|
|
319
|
+
MessageUsage:
|
|
320
|
+
'message' name=ID? 'of' itemType=QualifiedName 'from' source=FlowEnd 'to' target=FlowEnd
|
|
211
321
|
('{' body+=UsageBodyMember* '}' | ';');
|
|
212
322
|
|
|
213
323
|
// SysML v2 `use case def` / `use case` share a single leading `use case` token
|
|
@@ -224,7 +334,7 @@ UseCaseDeclaration:
|
|
|
224
334
|
// Item usage: standalone (`item x : T { … }`), directioned port payload
|
|
225
335
|
// (`in item reading : T;` / `out item command : T;`), or a bound feature value.
|
|
226
336
|
ItemUsage:
|
|
227
|
-
direction=('in' | 'out' | 'inout')? 'item' name=MemberName
|
|
337
|
+
direction=('in' | 'out' | 'inout')? 'item' name=MemberName preMultiplicity=Multiplicity?
|
|
228
338
|
(':' type=QualifiedName multiplicity=Multiplicity?)?
|
|
229
339
|
('=' boundRef=QualifiedName)?
|
|
230
340
|
('{' body+=UsageBodyMember* '}' | ';');
|
|
@@ -243,17 +353,46 @@ StateUsage:
|
|
|
243
353
|
'state' name=ID ':' type=QualifiedName
|
|
244
354
|
('{' body+=UsageBodyMember* '}' | ';');
|
|
245
355
|
|
|
246
|
-
// SysML v2 interface usage
|
|
356
|
+
// SysML v2 interface usage, including the normative typed-connect form:
|
|
357
|
+
// `interface fuel : FuelInterface connect tank.port to engine.port { … }`.
|
|
247
358
|
InterfaceUsage:
|
|
248
|
-
'interface' name=ID ':' type=QualifiedName
|
|
249
|
-
('
|
|
359
|
+
'interface' name=ID (':' type=QualifiedName)?
|
|
360
|
+
( 'connect' source=ReferenceName 'to' target=ReferenceName
|
|
361
|
+
('{' body+=UsageBodyMember* '}' | ';')
|
|
362
|
+
| ('{' body+=UsageBodyMember* '}' | ';')
|
|
363
|
+
);
|
|
250
364
|
|
|
251
365
|
// ActionUsage supports both typed (action name : Type;) and composite
|
|
252
366
|
// (action name { nested-actions, flows, successions }) forms.
|
|
253
367
|
ActionUsage:
|
|
254
|
-
behaviorKind=('action' | 'operator' | 'function') name=
|
|
368
|
+
behaviorKind=('action' | 'operator' | 'function') name=ActionName (':' type=QualifiedName)?
|
|
255
369
|
('{' body+=ActionUsageBodyMember* '}' | ';');
|
|
256
370
|
|
|
371
|
+
// Activity actions use their own concrete forms. Keep the payload and endpoint
|
|
372
|
+
// references structural: they are semantic inputs for lowering, not display text.
|
|
373
|
+
AcceptActionUsage:
|
|
374
|
+
'action' name=ActionName 'accept' payloadName=ID ':' payloadType=QualifiedName ';';
|
|
375
|
+
|
|
376
|
+
// `then` on a body member is a succession from the member before it, so it is
|
|
377
|
+
// captured rather than consumed — a discarded `then` leaves the node floating
|
|
378
|
+
// with no incoming control flow.
|
|
379
|
+
SendActionUsage:
|
|
380
|
+
followsPrevious?='then'? 'action' name=ActionName 'send' receiver=FeatureReference 'to' target=ReferenceName ';';
|
|
381
|
+
|
|
382
|
+
FeatureReference:
|
|
383
|
+
segments+=ID ('.' segments+=ID)*;
|
|
384
|
+
|
|
385
|
+
ActionName returns string:
|
|
386
|
+
ID | 'accept' | 'send' | 'terminate';
|
|
387
|
+
|
|
388
|
+
// SysML v2 terminate actions may be anonymous (`terminate;`, `then terminate;`)
|
|
389
|
+
// or named (`action rejected terminate;`). A name is important in diagrams
|
|
390
|
+
// with several distinct activity-final outcomes because it supplies the label
|
|
391
|
+
// and a stable identity for each final node.
|
|
392
|
+
TerminateUsage:
|
|
393
|
+
{infer TerminateUsage} followsPrevious?='then'?
|
|
394
|
+
(('action' name=ID)? 'terminate') ';';
|
|
395
|
+
|
|
257
396
|
PortUsage:
|
|
258
397
|
direction=('in' | 'out' | 'inout')? 'port' isConjugated?='~'? name=ID ':' type=QualifiedName
|
|
259
398
|
('{' body+=UsageBodyMember* '}' | ';');
|
|
@@ -289,11 +428,22 @@ ConnectionUsage:
|
|
|
289
428
|
ConnectionEnd:
|
|
290
429
|
endName=FeatureName '::>' ref=ReferenceName;
|
|
291
430
|
|
|
431
|
+
// The BASE FEATURE of a connection definition — `abstract connection derivations
|
|
432
|
+
// : Derivation[*];` in the OMG's DerivationConnections. It is not a link; it is
|
|
433
|
+
// the feature every usage of that definition subsets, and it is what a
|
|
434
|
+
// SemanticMetadata's `baseType` has to point at. Without one, `baseType` has
|
|
435
|
+
// nothing to name.
|
|
436
|
+
//
|
|
437
|
+
// The leading `abstract` is what keeps this out of ConnectionUsage's way: that
|
|
438
|
+
// rule always continues to `connect` or `{`, this one always ends at `;`.
|
|
439
|
+
AbstractConnectionUsage:
|
|
440
|
+
isAbstract?='abstract' 'connection' name=ID ':' type=QualifiedName multiplicity=Multiplicity? ';';
|
|
441
|
+
|
|
292
442
|
// ─── Behavior: Action definition body ───────────────────────────────────────
|
|
293
443
|
// Action defs can have in/out/inout parameters plus regular body members
|
|
294
444
|
|
|
295
445
|
ActionDefBodyMember:
|
|
296
|
-
ActionParameterMember |
|
|
446
|
+
ActionParameterMember | TerminateUsage | ActionUsage | AcceptActionUsage | SendActionUsage | ControlNodeUsage | RequireConstraintMember | UsageBodyMember;
|
|
297
447
|
|
|
298
448
|
ActionParameterMember:
|
|
299
449
|
direction=('in' | 'out' | 'inout') name=ID ':' type=QualifiedName ';';
|
|
@@ -304,7 +454,7 @@ ActionParameterMember:
|
|
|
304
454
|
// FlowConnectionUsage / SuccessionUsage / ConnectionUsage are contributed by
|
|
305
455
|
// UsageBodyMember; listing them again here would make the alternatives ambiguous.
|
|
306
456
|
ActionUsageBodyMember:
|
|
307
|
-
ActionUsage | ControlNodeUsage | UsageBodyMember;
|
|
457
|
+
ActionParameterMember | TerminateUsage | ActionUsage | AcceptActionUsage | SendActionUsage | ControlNodeUsage | UsageBodyMember;
|
|
308
458
|
|
|
309
459
|
// ─── Behavior: Control nodes (fork / join) ──────────────────────────────────
|
|
310
460
|
// SysML v2 activity control nodes. A `fork` splits one incoming control flow
|
|
@@ -317,38 +467,267 @@ ActionUsageBodyMember:
|
|
|
317
467
|
// first parallelPrep then prime;
|
|
318
468
|
// first parallelPrep then selfTest;
|
|
319
469
|
ControlNodeUsage:
|
|
320
|
-
controlKind=('fork' | 'join') name=ID ';';
|
|
470
|
+
controlKind=('fork' | 'join' | 'decide' | 'merge') name=ID ';';
|
|
321
471
|
|
|
322
472
|
// ─── Behavior: Flow connection usage ────────────────────────────────────────
|
|
323
473
|
// Syntax: flow of ItemType from source.port to target.port ;
|
|
324
474
|
|
|
475
|
+
// A flow usage may carry a NAME and a BODY, both of which this production used
|
|
476
|
+
// to drop. The normative grammar is
|
|
477
|
+
// `FlowUsage = OccurrenceUsagePrefix 'flow' FlowDeclaration DefinitionBody`
|
|
478
|
+
// with `FlowDeclaration : UsageDeclaration ValuePart? ('of' …)`
|
|
479
|
+
// (SysML-textual-bnf.kebnf:829, :837) — so a conforming flow takes a name from
|
|
480
|
+
// its UsageDeclaration and owns attributes in its body like any other usage.
|
|
481
|
+
//
|
|
482
|
+
// Dropping them was a MEMO divergence, not a language limit, and it was
|
|
483
|
+
// load-bearing: an anonymous, attribute-less flow can carry no `id`, hold no
|
|
484
|
+
// latency budget, and be referred to by nothing, which is irreconcilable with
|
|
485
|
+
// the identification core every MEMO element rests on. That is the whole reason
|
|
486
|
+
// FunctionalExchange and ComponentExchange exist as part defs beside the flows
|
|
487
|
+
// they stand in for.
|
|
488
|
+
// `of <itemType>` is OPTIONAL, because it is optional in SysML v2. The pinned
|
|
489
|
+
// corpus writes untyped flows throughout — `flow from focus.image to
|
|
490
|
+
// shoot.image;` — and `syside check`, the compiler of record, accepts them
|
|
491
|
+
// (measured 2026-08-12). Requiring the item type here did not reject such a
|
|
492
|
+
// model: it failed to match the production, so the flow parsed to nothing and
|
|
493
|
+
// was dropped without a diagnostic. A relationship that silently does not
|
|
494
|
+
// exist is worse than one that fails loudly.
|
|
495
|
+
// The two-end shorthand — `flow supplierPort.fuelSupply to
|
|
496
|
+
// consumerPort.fuelSupply;` — drops `from` as well. The corpus uses it for
|
|
497
|
+
// port-to-port wiring, where naming the ends twice adds nothing. It takes no
|
|
498
|
+
// name and no item type: those forms all spell `from`, which is what keeps the
|
|
499
|
+
// two branches distinguishable.
|
|
325
500
|
FlowConnectionUsage:
|
|
326
|
-
'flow'
|
|
501
|
+
'flow' (
|
|
502
|
+
name=ID? ('of' itemType=QualifiedName)? 'from' source=FlowEnd
|
|
503
|
+
| source=FlowEnd
|
|
504
|
+
) 'to' target=FlowEnd
|
|
505
|
+
('{' body+=UsageBodyMember* '}' | ';');
|
|
327
506
|
|
|
328
507
|
FlowEnd:
|
|
329
508
|
ref=DottedName;
|
|
330
509
|
|
|
331
510
|
// Dot-separated qualified name for flow endpoints (e.g. receive.prescription)
|
|
332
511
|
DottedName returns string:
|
|
333
|
-
|
|
512
|
+
DottedNameSegment ('.' DottedNameSegment)*;
|
|
513
|
+
|
|
514
|
+
DottedNameSegment returns string:
|
|
515
|
+
ID | 'accept' | 'send' | 'terminate';
|
|
334
516
|
|
|
335
517
|
// ─── Behavior: Succession usage ─────────────────────────────────────────────
|
|
336
518
|
// Syntax: first start then action1 then action2 then done ;
|
|
337
519
|
|
|
338
520
|
SuccessionUsage:
|
|
339
|
-
'first' steps+=SuccessionStep ('then' steps+=SuccessionStep)+ ';';
|
|
521
|
+
'succession'? 'first' steps+=SuccessionStep ('then' steps+=SuccessionStep)+ ';';
|
|
340
522
|
|
|
341
523
|
SuccessionStep:
|
|
342
|
-
ref=SuccessionRef
|
|
524
|
+
ref=SuccessionRef ('if' guard=OrExpr)?;
|
|
343
525
|
|
|
344
526
|
SuccessionRef returns string:
|
|
345
527
|
'start' | 'done' | ID;
|
|
346
528
|
|
|
347
529
|
// ─── Behavior: Allocate usage ───────────────────────────────────────────────
|
|
348
530
|
// Syntax: allocate actionUsage to partUsage ;
|
|
349
|
-
|
|
531
|
+
//
|
|
532
|
+
// The `allocation` prefix is the TYPED form — `AllocationUsage = 'allocation'
|
|
533
|
+
// UsageDeclaration UsageBody` (SysML-textual-bnf.kebnf:794), written in the
|
|
534
|
+
// corpus as
|
|
535
|
+
//
|
|
536
|
+
// allocation torqueGenAlloc : LogicalToPhysical allocate torqueGenerator to powerTrain;
|
|
537
|
+
//
|
|
538
|
+
// It is the same statement as bare `allocate` plus a name and an `allocation
|
|
539
|
+
// def` to type it, which is what carries MEMO's per-allocation distinctions
|
|
540
|
+
// (function allocation vs. deployment vs. build) without a private connection
|
|
541
|
+
// def per case. Folded into this rule rather than added as a sibling, because
|
|
542
|
+
// both forms end in the same `allocate … to …` and splitting them would make
|
|
543
|
+
// the alternatives ambiguous.
|
|
350
544
|
AllocateUsage:
|
|
351
|
-
'
|
|
545
|
+
('allocation' name=ID? (':' type=QualifiedName)?)?
|
|
546
|
+
'allocate' source=ReferenceName 'to' target=ReferenceName
|
|
547
|
+
('{' body+=UsageBodyMember* '}' | ';');
|
|
548
|
+
|
|
549
|
+
// ─── Requirements: native satisfaction and verification ─────────────────────
|
|
550
|
+
//
|
|
551
|
+
// The two relations SysML v2 already provides for requirement traceability.
|
|
552
|
+
// MEMO spells them today as the `SatisfiedBy` / `VerifiedBy` connection defs;
|
|
553
|
+
// the language spells them as usages, and every conforming tool reads the
|
|
554
|
+
// language spelling. Both parse, and the model builder projects both onto the
|
|
555
|
+
// same trace edge, so a model may use either while the migration runs.
|
|
556
|
+
//
|
|
557
|
+
// `SatisfyRequirementUsage` (SysML-textual-bnf.kebnf:1470) declares the
|
|
558
|
+
// assertion prefix as `'assert' ('not')?`. The normative training files write
|
|
559
|
+
// the bare form — `satisfy vehicleSpecification by vehicle_design;`
|
|
560
|
+
// ("32. Requirements/Requirement Satisfaction.sysml") — so the prefix is
|
|
561
|
+
// optional here and `isNegated` records a negative satisfaction claim, which
|
|
562
|
+
// is the property a `connection def` cannot express at all.
|
|
563
|
+
//
|
|
564
|
+
// The `by` part is optional in the normative grammar: inside a requirement
|
|
565
|
+
// body the satisfying subject is inherited rather than restated.
|
|
566
|
+
SatisfyRequirementUsage:
|
|
567
|
+
(isAsserted?='assert' isNegated?='not'?)? 'satisfy' requirement=ReferenceName
|
|
568
|
+
('by' satisfyingFeature=ReferenceName)?
|
|
569
|
+
('{' body+=UsageBodyMember* '}' | ';');
|
|
570
|
+
|
|
571
|
+
// `RequirementVerificationMember` (SysML-textual-bnf.kebnf:1551) is a member of
|
|
572
|
+
// a requirement body — in practice the `objective` of a verification case:
|
|
573
|
+
//
|
|
574
|
+
// verification def VehicleMassTest {
|
|
575
|
+
// objective { verify vehicleMassRequirement; }
|
|
576
|
+
// }
|
|
577
|
+
//
|
|
578
|
+
// The verifying case is the enclosing element, not a written end, so the
|
|
579
|
+
// builder takes it from the containment.
|
|
580
|
+
RequirementVerificationMember:
|
|
581
|
+
'verify' requirement=ReferenceName
|
|
582
|
+
('{' body+=UsageBodyMember* '}' | ';');
|
|
583
|
+
|
|
584
|
+
// ─── ARCADIA mechanisms the language already spells ─────────────────────────
|
|
585
|
+
//
|
|
586
|
+
// Fourteen keywords MEMO had no production for, each one a mechanism MEMO
|
|
587
|
+
// spells privately as a `connection def` or a `part def` (plan §4). Every form
|
|
588
|
+
// below is taken from the normative BNF and checked against the training files
|
|
589
|
+
// that use it; none is a MEMO extension. Each has a builder path projecting the
|
|
590
|
+
// native usage onto the SAME trace edge MEMO's connection produces, so both
|
|
591
|
+
// spellings mean one thing while the migration runs.
|
|
592
|
+
|
|
593
|
+
// `PerformActionUsage = OccurrenceUsagePrefix 'perform' PerformActionUsageDeclaration
|
|
594
|
+
// ActionBody` (:948). One end is written, the other is the owner — the same
|
|
595
|
+
// shape as `verify`, with the ends swapped: `verify` names its source and owns
|
|
596
|
+
// its target, `perform` owns its source (the performer) and names its target.
|
|
597
|
+
//
|
|
598
|
+
// part actorPrescriber { perform oaPrescribe; }
|
|
599
|
+
// part camera { perform action takePhoto references takePicture; }
|
|
600
|
+
PerformActionUsage:
|
|
601
|
+
'perform' (isAction?='action' name=ID (':' type=QualifiedName)? ('references' performed=ReferenceName)?
|
|
602
|
+
| performed=ReferenceName)
|
|
603
|
+
('{' body+=UsageBodyMember* '}' | ';');
|
|
604
|
+
|
|
605
|
+
// `IncludeUseCaseUsage = OccurrenceUsagePrefix 'include' …` (:1572). A use case
|
|
606
|
+
// includes a sub-case; MEMO spells it `IncludesStep` / `Includes`.
|
|
607
|
+
IncludeUseCaseUsage:
|
|
608
|
+
'include' (isUseCase?='use' 'case' name=ID (':' type=QualifiedName)?
|
|
609
|
+
| included=ReferenceName)
|
|
610
|
+
('{' body+=UsageBodyMember* '}' | ';');
|
|
611
|
+
|
|
612
|
+
// `ExhibitStateUsage = OccurrenceUsagePrefix 'exhibit' …` (:1272). A component
|
|
613
|
+
// exhibits a state or mode; MEMO spells it `ExhibitsMode`.
|
|
614
|
+
ExhibitStateUsage:
|
|
615
|
+
'exhibit' (isState?='state' name=ID (':' type=QualifiedName)?
|
|
616
|
+
| exhibited=ReferenceName)
|
|
617
|
+
('{' body+=UsageBodyMember* '}' | ';');
|
|
618
|
+
|
|
619
|
+
// `SubjectUsage : ReferenceUsage = 'subject' UsageExtensionKeyword* Usage`
|
|
620
|
+
// (:1423) and `ObjectiveMember … 'objective' ObjectiveRequirementUsage` (:1523).
|
|
621
|
+
//
|
|
622
|
+
// The pair is what the standard uses instead of a verification link to a
|
|
623
|
+
// non-requirement: the verified thing becomes the case's SUBJECT and the
|
|
624
|
+
// requirement its OBJECTIVE, as in "34. Verification":
|
|
625
|
+
//
|
|
626
|
+
// verification def VehicleMassTest {
|
|
627
|
+
// subject testVehicle : Vehicle;
|
|
628
|
+
// objective { verify vehicleMassRequirement; }
|
|
629
|
+
// }
|
|
630
|
+
//
|
|
631
|
+
// That is what memo-native-requirement-relations decision 1 remodels 61 of 99
|
|
632
|
+
// VerifiedBy links onto, and it is also what makes that training file parse.
|
|
633
|
+
SubjectMember:
|
|
634
|
+
'subject' name=MemberName (':' type=QualifiedName multiplicity=Multiplicity?)?
|
|
635
|
+
(bindingOp=('=' | ':>' | ':>>')
|
|
636
|
+
('(' boundRefs+=ReferenceName (',' boundRefs+=ReferenceName)* ')'
|
|
637
|
+
| boundRefs+=ReferenceName))?
|
|
638
|
+
('{' body+=UsageBodyMember* '}' | ';');
|
|
639
|
+
|
|
640
|
+
ObjectiveMember:
|
|
641
|
+
'objective' name=ID? (':' type=QualifiedName)?
|
|
642
|
+
('{' body+=UsageBodyMember* '}' | ';');
|
|
643
|
+
|
|
644
|
+
// `ActorUsage : PartUsage = 'actor' UsageExtensionKeyword* Usage` (:1454) and
|
|
645
|
+
// `StakeholderUsage : PartUsage = 'stakeholder' …` (:1460). ARCADIA operational
|
|
646
|
+
// analysis and ISO 42010; MEMO spells them `part def User` / `Actor` and
|
|
647
|
+
// `part def Stakeholder`.
|
|
648
|
+
ActorMember:
|
|
649
|
+
'actor' name=MemberName (':' type=QualifiedName multiplicity=Multiplicity?)?
|
|
650
|
+
(bindingOp=('=' | ':>' | ':>>') boundRef=ReferenceName)?
|
|
651
|
+
('{' body+=UsageBodyMember* '}' | ';');
|
|
652
|
+
|
|
653
|
+
StakeholderMember:
|
|
654
|
+
'stakeholder' name=MemberName (':' type=QualifiedName multiplicity=Multiplicity?)?
|
|
655
|
+
(bindingOp=('=' | ':>' | ':>>') boundRef=ReferenceName)?
|
|
656
|
+
('{' body+=UsageBodyMember* '}' | ';');
|
|
657
|
+
|
|
658
|
+
// `ConcernUsage = OccurrenceUsagePrefix 'concern' ConstraintUsageDeclaration
|
|
659
|
+
// RequirementBody` (:1497) and `FramedConcernMember … 'frame' FramedConcernUsage`
|
|
660
|
+
// (:1441). A viewpoint FRAMES a concern; MEMO spells that `FramesConcern` and
|
|
661
|
+
// `HasConcern`.
|
|
662
|
+
ConcernUsage:
|
|
663
|
+
'concern' name=ID (':' type=QualifiedName)?
|
|
664
|
+
('{' body+=UsageBodyMember* '}' | ';');
|
|
665
|
+
|
|
666
|
+
FramedConcernMember:
|
|
667
|
+
'frame' (isConcern?='concern' name=ID (':' type=QualifiedName)?
|
|
668
|
+
| framed=ReferenceName)
|
|
669
|
+
('{' body+=UsageBodyMember* '}' | ';');
|
|
670
|
+
|
|
671
|
+
// `Dependency = ( PrefixMetadataAnnotation )* 'dependency' DependencyDeclaration
|
|
672
|
+
// RelationshipBody` (:51), with `DependencyDeclaration = ( Identification 'from' )?
|
|
673
|
+
// client ( ',' client )* 'to' supplier ( ',' supplier )*` (:56).
|
|
674
|
+
//
|
|
675
|
+
// THIS ONE CHANGES METACLASS. A dependency is a Relationship, not a Connection:
|
|
676
|
+
// it has no ends to redefine, it takes n clients and n suppliers rather than a
|
|
677
|
+
// source and a target, and it is annotated by a PREFIX metadata (`#refinement`)
|
|
678
|
+
// rather than by a connection def's `metadata def`. So `Realizes` does not
|
|
679
|
+
// become an allocation-shaped row — it becomes `#refinement dependency a to b;`,
|
|
680
|
+
// and the registry and serializer both have to treat it differently.
|
|
681
|
+
//
|
|
682
|
+
// `Identification` may be empty, which is why `dependency from a to b;` and
|
|
683
|
+
// `dependency Named from a to b;` are both the same alternative, and
|
|
684
|
+
// `dependency a to b;` is the one without it.
|
|
685
|
+
Dependency:
|
|
686
|
+
(prefixMetadata+=PrefixMetadataAnnotation)*
|
|
687
|
+
'dependency' (name=ID? 'from')?
|
|
688
|
+
clients+=ReferenceName (',' clients+=ReferenceName)*
|
|
689
|
+
'to' suppliers+=ReferenceName (',' suppliers+=ReferenceName)*
|
|
690
|
+
('{' body+=DocComment* '}' | ';');
|
|
691
|
+
|
|
692
|
+
// `#Name` — the standard's prefix form of a metadata application, distinct from
|
|
693
|
+
// the `@Name` postfix form MetadataApplication already covers. A dependency can
|
|
694
|
+
// only be annotated this way, and `#refinement` (ModelingMetadata.sysml:132) is
|
|
695
|
+
// the annotation that makes a dependency a refinement.
|
|
696
|
+
PrefixMetadataAnnotation:
|
|
697
|
+
'#' type=QualifiedName;
|
|
698
|
+
|
|
699
|
+
// `TransitionUsage = 'transition' ( UsageDeclaration 'first' )? FeatureChainMember
|
|
700
|
+
// … 'then' TransitionSuccessionMember ActionBody` (:1281). MEMO models this as
|
|
701
|
+
// `part def Transition` with String pseudo-references; the language puts it
|
|
702
|
+
// inside a `state def`, where source and target really are the states.
|
|
703
|
+
//
|
|
704
|
+
// The name is only writable with `first`, which is what disambiguates
|
|
705
|
+
// `transition initial then off;` (no name, `initial` is the source) from
|
|
706
|
+
// `transition off_to_starting first off … then starting;`.
|
|
707
|
+
// The optional type comes from `UsageDeclaration = Identification
|
|
708
|
+
// FeatureSpecializationPart?`, so `transition tStart : Transition first …` is
|
|
709
|
+
// the normative spelling of a transition classified by a definition. MEMO needs
|
|
710
|
+
// it: the builder resolves an element's kind from its written type and from
|
|
711
|
+
// nothing else, so an untyped transition would have to be given the kind
|
|
712
|
+
// `Transition` by a hardcoded name in TypeScript — which is the thing
|
|
713
|
+
// [memo-tools-interprets-ontology-drives] forbids.
|
|
714
|
+
TransitionUsage:
|
|
715
|
+
'transition' (name=ID (':' type=QualifiedName)? 'first')? source=ReferenceName
|
|
716
|
+
('accept' trigger=ReferenceName)?
|
|
717
|
+
('if' guard=OrExpr)?
|
|
718
|
+
('do' effect=ReferenceName)?
|
|
719
|
+
'then' target=ReferenceName
|
|
720
|
+
('{' body+=UsageBodyMember* '}' | ';');
|
|
721
|
+
|
|
722
|
+
// `VariantUsageMember : VariantMembership = MemberPrefix 'variant'
|
|
723
|
+
// VariantUsageElement` (:254). One alternative of a `variation` choice point —
|
|
724
|
+
// either a nested usage (`variant part transmissionManual : TransmissionManual;`)
|
|
725
|
+
// or a reference to an existing one (`variant manualTransmission;`).
|
|
726
|
+
VariantMember:
|
|
727
|
+
'variant' (usageKind=('part' | 'attribute' | 'item' | 'action' | 'port' | 'ref'))? name=MemberName
|
|
728
|
+
(':' type=QualifiedName multiplicity=Multiplicity?)?
|
|
729
|
+
('=' value=AttributeValue)?
|
|
730
|
+
('{' body+=UsageBodyMember* '}' | ';');
|
|
352
731
|
|
|
353
732
|
// Element references may be package-qualified (`a::b`) or feature-qualified
|
|
354
733
|
// (`action.step`). Both forms occur in standard SysML relationship ends.
|
|
@@ -358,7 +737,23 @@ ReferenceName returns string:
|
|
|
358
737
|
// ─── Body members ────────────────────────────────────────────────────────────
|
|
359
738
|
|
|
360
739
|
DefinitionBodyMember:
|
|
361
|
-
AttributeMember | PartMember | PortUsage | ItemUsage | ViewUsage | RefMember | RequireConstraintMember | MetadataApplication | DocComment;
|
|
740
|
+
AttributeMember | PartMember | PortUsage | ItemUsage | ViewUsage | RefMember | FeatureMembershipMember | RequireConstraintMember | RequirementVerificationMember | ArcadiaMember | MetadataApplication | DocComment;
|
|
741
|
+
|
|
742
|
+
// The fourteen native mechanisms, gathered once so both body rules stay
|
|
743
|
+
// readable and neither can drift out of step with the other.
|
|
744
|
+
ArcadiaMember:
|
|
745
|
+
PerformActionUsage
|
|
746
|
+
| IncludeUseCaseUsage
|
|
747
|
+
| ExhibitStateUsage
|
|
748
|
+
| SubjectMember
|
|
749
|
+
| ObjectiveMember
|
|
750
|
+
| ActorMember
|
|
751
|
+
| StakeholderMember
|
|
752
|
+
| ConcernUsage
|
|
753
|
+
| FramedConcernMember
|
|
754
|
+
| TransitionUsage
|
|
755
|
+
| VariantMember
|
|
756
|
+
| AllocateUsage;
|
|
362
757
|
|
|
363
758
|
// ─── Constraint expression (KerML boolean subset — ADR-1-18) ─────────────────
|
|
364
759
|
// Authored inside constraint def / requirement def bodies as:
|
|
@@ -401,18 +796,48 @@ PrimaryExpr infers ConstraintExpr:
|
|
|
401
796
|
// Standard SysML v2 requires a redefinition operator (`redefines` / `:>>`) to bind a
|
|
402
797
|
// value — the bare `name = value;` shorthand is non-standard and is not accepted.
|
|
403
798
|
// Use `attribute redefines name = value;` (the form the serializer emits).
|
|
799
|
+
// StateUsage is a body member because a SysML v2 state machine OWNS its
|
|
800
|
+
// substates — nesting is the containment. MEMO could not parse a nested state
|
|
801
|
+
// while transitions were a part def wired to flat states by Composes edges;
|
|
802
|
+
// it landed when that reinvention was retired. TransitionUsage is NOT listed
|
|
803
|
+
// here: it already arrives through ArcadiaMember, and naming it twice makes
|
|
804
|
+
// the alternation ambiguous.
|
|
404
805
|
UsageBodyMember:
|
|
405
|
-
AttributeMember | PartMember | PortUsage | ItemUsage | RefMember | ViewUsage | FlowConnectionUsage | SuccessionUsage | ConnectionUsage | MetadataApplication | DocComment;
|
|
806
|
+
AttributeMember | PartMember | PortUsage | ItemUsage | RefMember | ViewUsage | FlowConnectionUsage | MessageUsage | SuccessionUsage | ConnectionUsage | SatisfyRequirementUsage | RequirementVerificationMember | ArcadiaMember | Dependency | MetadataApplication | StateUsage | DocComment;
|
|
406
807
|
|
|
407
808
|
// ─── Attribute member ────────────────────────────────────────────────────────
|
|
408
|
-
//
|
|
809
|
+
// Three forms:
|
|
409
810
|
// attribute name : Type ; (type declaration)
|
|
410
811
|
// attribute redefines name = value ; (value assignment / redefinition)
|
|
812
|
+
// attribute redefines name { … } (structured value: nested redefinitions)
|
|
813
|
+
//
|
|
814
|
+
// The third form is how a value of an `attribute def` with several features is
|
|
815
|
+
// assigned — you cannot write it with `=`, because the value is not a literal.
|
|
816
|
+
// It is what SysIDE accepts for e.g. a RegionBounds:
|
|
817
|
+
//
|
|
818
|
+
// attribute :>> bounds { attribute :>> x = 0.1; attribute :>> width = 0.4; }
|
|
411
819
|
|
|
820
|
+
// A fourth form is a TYPED attribute carrying a default:
|
|
821
|
+
//
|
|
822
|
+
// attribute id : String = "CR-MED-040";
|
|
823
|
+
//
|
|
824
|
+
// SysIDE accepts it and MEMO rejected it, which session 1 logged as a grammar
|
|
825
|
+
// gap and section 18.2 deliverable 8 assigned to session 2. It stopped being
|
|
826
|
+
// theoretical once rules and policies started declaring typed attributes with
|
|
827
|
+
// defaults. SysIDE is the compiler of record, so the grammar follows it.
|
|
828
|
+
|
|
829
|
+
// A fifth form is `default`, which supplies an overridable initial value where
|
|
830
|
+
// a bare `=` BINDS one. The difference is not cosmetic: a bound value cannot be
|
|
831
|
+
// redefined by a usage, so `= x` in a definition forbids every specialization
|
|
832
|
+
// from disagreeing. Any attribute a subtype may legitimately override has to be
|
|
833
|
+
// spelled `default`.
|
|
412
834
|
AttributeMember:
|
|
413
|
-
'attribute' redefines?=('redefines' | ':>>')? name=MemberName
|
|
414
|
-
(':' type=QualifiedName multiplicity=Multiplicity?
|
|
415
|
-
|
|
835
|
+
isVariation?='variation'? 'attribute' redefines?=('redefines' | ':>>')? name=MemberName
|
|
836
|
+
(':' type=QualifiedName multiplicity=Multiplicity?
|
|
837
|
+
(isDefault?='default'? '=' value=AttributeValue ';' | isDefault?='default' value=AttributeValue ';' | '{' body+=UsageBodyMember* '}' | ';')
|
|
838
|
+
| isDefault?='default'? '=' value=AttributeValue ';'
|
|
839
|
+
| isDefault?='default' value=AttributeValue ';'
|
|
840
|
+
| '{' body+=UsageBodyMember* '}');
|
|
416
841
|
|
|
417
842
|
AttributeValue:
|
|
418
843
|
StringValue | RealValue | IntValue | BooleanValue | SetLiteral | EnumValue;
|
|
@@ -438,24 +863,47 @@ SetLiteral:
|
|
|
438
863
|
SetElement:
|
|
439
864
|
value=QualifiedName | stringValue=STRING;
|
|
440
865
|
|
|
441
|
-
// Enum literal reference
|
|
866
|
+
// Enum literal reference (e.g. SeverityLevel::Catastrophic), or a metaclass
|
|
867
|
+
// cast. `x meta SysML::Usage` is the standard's MetadataAccessExpression: it
|
|
868
|
+
// yields the metaobject of `x` as an instance of the named metaclass, and it is
|
|
869
|
+
// how a SemanticMetadata binds its required `baseType`
|
|
870
|
+
// (`:>> baseType = derivations meta SysML::Usage`). Folded into this rule
|
|
871
|
+
// rather than added as a sibling alternative, because both start with a
|
|
872
|
+
// QualifiedName and only the trailing `meta` tells them apart.
|
|
873
|
+
// Also the bare feature-reference value (`ref :>> activeMode = a.b.c;`). A
|
|
874
|
+
// nested state is reached by a dotted path, so a value that names one needs
|
|
875
|
+
// the `.` tail; `::` alone only reaches package members, which is all MEMO
|
|
876
|
+
// needed while every state sat flat in a package.
|
|
442
877
|
EnumValue:
|
|
443
|
-
enumRef=QualifiedName
|
|
878
|
+
enumRef=QualifiedName ('.' tail+=ID)* ('meta' metaclass=QualifiedName)?;
|
|
444
879
|
|
|
445
880
|
// ─── Nested part member ──────────────────────────────────────────────────────
|
|
446
|
-
//
|
|
881
|
+
// Four forms:
|
|
447
882
|
// part subsystems : Subsystem[0..*]; (typed nested part)
|
|
448
883
|
// part requirement = reqSingleMode; (feature value binding to a reference)
|
|
449
884
|
// part protectedAsset :> therapyAsset; (subsetting an existing element)
|
|
885
|
+
// part vpLogical :> viewpointDefinition = logicalArchitectureViewpoint;
|
|
886
|
+
// (subsetting AND supplying a value)
|
|
450
887
|
// The binding forms carry the source/target ends of semantic *Link instances,
|
|
451
888
|
// which the model builder projects into navigable relationships.
|
|
889
|
+
//
|
|
890
|
+
// The fourth form is how a MULTI-VALUED feature takes several values. Repeating
|
|
891
|
+
// `part :>> viewpointDefinition = x;` redefines the same feature each time and
|
|
892
|
+
// SysIDE rejects it as shadowing, so each value has to subset the feature under
|
|
893
|
+
// its own member name. `viewpointDefinition : Viewpoint[1..*]` is exactly that
|
|
894
|
+
// case: a view governed by three viewpoints needs three members.
|
|
895
|
+
//
|
|
896
|
+
// SysIDE accepts this and the MEMO grammar did not, which is the wrong way
|
|
897
|
+
// round — SysIDE is the compiler of record, so the grammar follows it.
|
|
898
|
+
// `subsetValue` holds the value; `boundRef` keeps meaning the subsetted
|
|
899
|
+
// feature, so every existing `:>` consumer is unaffected.
|
|
452
900
|
|
|
453
901
|
PartMember:
|
|
454
|
-
'part'
|
|
902
|
+
isVariation?='variation'? 'part'
|
|
455
903
|
(bindingOp=':>>' name=MemberName ('=' boundRef=QualifiedName)?
|
|
456
904
|
| name=MemberName
|
|
457
905
|
(':' type=QualifiedName multiplicity=Multiplicity?)?
|
|
458
|
-
(bindingOp=('=' | ':>') boundRef=QualifiedName)?)
|
|
906
|
+
(bindingOp=('=' | ':>') boundRef=QualifiedName ('=' subsetValue=QualifiedName)?)?)
|
|
459
907
|
('{' body+=UsageBodyMember* '}' | ';');
|
|
460
908
|
|
|
461
909
|
// ─── Reference member ───────────────────────────────────────────────────────
|
|
@@ -471,6 +919,25 @@ RefMember:
|
|
|
471
919
|
('=' value=AttributeValue)?
|
|
472
920
|
';';
|
|
473
921
|
|
|
922
|
+
// ─── Bare feature-membership member ──────────────────────────────────────────
|
|
923
|
+
// SysML v2 lets a definition body subset or redefine an inherited feature
|
|
924
|
+
// without restating its metaclass keyword. The standard library's own metadata
|
|
925
|
+
// defs are written that way and cannot be written any other way:
|
|
926
|
+
//
|
|
927
|
+
// :> annotatedElement : SysML::ConnectionDefinition;
|
|
928
|
+
// :>> baseType = derivations meta SysML::Usage;
|
|
929
|
+
//
|
|
930
|
+
// MEMO accepted only `attribute :>> name = value`, which covers redefinition of
|
|
931
|
+
// an attribute and nothing else — not subsetting, and not a non-attribute
|
|
932
|
+
// feature. `:>` is the form that matters here: `annotatedElement` is declared
|
|
933
|
+
// once per accepted metaclass, so it must SUBSET rather than redefine, or the
|
|
934
|
+
// second declaration would shadow the first.
|
|
935
|
+
|
|
936
|
+
FeatureMembershipMember:
|
|
937
|
+
(isRedefinition?=':>>' | ':>') feature=QualifiedName
|
|
938
|
+
(':' type=QualifiedName)? multiplicity=Multiplicity?
|
|
939
|
+
('=' value=AttributeValue)? ';';
|
|
940
|
+
|
|
474
941
|
// ─── Doc comment ─────────────────────────────────────────────────────────────
|
|
475
942
|
// Captured as a single terminal to prevent hidden ML_COMMENT from consuming it
|
|
476
943
|
|
|
@@ -488,7 +955,7 @@ QualifiedName returns string:
|
|
|
488
955
|
QualifiedNameSegment ('::' QualifiedNameTailSegment)*;
|
|
489
956
|
|
|
490
957
|
QualifiedNameSegment returns string:
|
|
491
|
-
ID | 'library';
|
|
958
|
+
ID | 'library' | 'standard';
|
|
492
959
|
|
|
493
960
|
// Non-first segments may be keywords so enum literals declared via
|
|
494
961
|
// EnumLiteralName (e.g. DirectionKind::in, UseErrorCategoryKind::action)
|
|
@@ -503,14 +970,19 @@ QualifiedNameTailSegment returns string:
|
|
|
503
970
|
| 'use' | 'fork' | 'join';
|
|
504
971
|
|
|
505
972
|
// Allow keywords as identifiers in member/feature contexts
|
|
973
|
+
// `standard` joins these for the same reason the others are here: making it a
|
|
974
|
+
// keyword for `standard library package` would otherwise stop it being a name,
|
|
975
|
+
// and MEMO's compliance ontology declares `attribute standard : String`.
|
|
506
976
|
MemberName returns string:
|
|
507
977
|
ID | 'requirement' | 'action' | 'item' | 'port' | 'interface' | 'connection'
|
|
508
|
-
| 'attribute' | 'constraint' | 'view' | 'viewpoint' | 'ref' | 'part' | 'state' | 'verification'
|
|
978
|
+
| 'attribute' | 'constraint' | 'view' | 'viewpoint' | 'ref' | 'part' | 'state' | 'verification'
|
|
979
|
+
| 'standard';
|
|
509
980
|
|
|
510
981
|
FeatureName returns string:
|
|
511
982
|
ID | 'part' | 'requirement' | 'action' | 'item' | 'port' | 'interface'
|
|
512
983
|
| 'connection' | 'flow' | 'view' | 'viewpoint' | 'attribute' | 'constraint'
|
|
513
|
-
| 'ref' | 'allocate' | 'end' | 'enum' | 'function' | 'operator' | 'state' | 'verification'
|
|
984
|
+
| 'ref' | 'allocate' | 'end' | 'enum' | 'function' | 'operator' | 'state' | 'verification'
|
|
985
|
+
| 'standard';
|
|
514
986
|
|
|
515
987
|
// ─── Hidden terminals (skipped by lexer) ─────────────────────────────────────
|
|
516
988
|
|
|
@@ -525,6 +997,10 @@ hidden terminal ML_COMMENT: /\/\*[\s\S]*?\*\//;
|
|
|
525
997
|
// preventing conflict with ML_COMMENT for standalone /* ... */ comments.
|
|
526
998
|
terminal DOC_COMMENT: /doc\s+\/\*[\s\S]*?\*\//;
|
|
527
999
|
|
|
1000
|
+
// A bracketed short name, e.g. `<derive>`. Whole-token so the inner word may be
|
|
1001
|
+
// a keyword. Cannot collide with the comparison operators: `<=` does not match
|
|
1002
|
+
// (a letter must follow `<`), and `a<b>c` is not valid MEMO in any position.
|
|
1003
|
+
terminal SHORT_NAME: /<[a-zA-Z_][a-zA-Z0-9_]*>/;
|
|
528
1004
|
terminal ID: /[a-zA-Z_][a-zA-Z0-9_]*/;
|
|
529
1005
|
// SysML v2 unrestricted name: any text in single quotes, used when a name would
|
|
530
1006
|
// otherwise collide with a reserved word (e.g. enum 'verification';).
|