allocate accepts two definitions as its ends (ReferenceSubsetting::referencedFeature must be a Feature)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start by reproducing the two allocate examples from the issue, then trace allocate relationship endpoint resolution and the ReferenceSubsetting validation that types referencedFeature as Feature. Done means definition endpoints produce a diagnostic like sysml-toolkit, while the usage form remains accepted; check the neighboring perform validation for comparison.
由索引模型根据 Issue 内容生成。
描述
Summary
allocate accepts two definitions as its ends (rather than two features/usages) with no diagnostic, even though the ends resolve through ReferenceSubsetting, whose referencedFeature is typed Feature — a Definition is not a Feature. sysml-toolkit rejects the same source.
Version: OpenSysML v0.9.0. sysml-toolkit v0.9.1 with the standard library rejects the same source (see below).
Observed
package P { action def A; part def H; allocate A to H; }
Loads with ok=True and no diagnostic in OpenSysML v0.9.0.
With usages instead of definitions:
package P { part def S { action a : A; part h : H; allocate a to h; } }
loads cleanly in both tools, as expected.
sysml-toolkit v0.9.1 (check --lib <sysml.library>) rejects the definition form:
error: ReferenceSubsetting::referencedFeature must refer to a Feature [relationship-endpoint-metaclass]
OpenSysML already distinguishes definitions from usages in the neighboring perform case — perform A; naming an action definition is (correctly) rejected, since perform must reference a usage — so this looks like an inconsistency in how the same distinction is applied to allocate.
Reference
KerML 1.1 Beta 2, 8.3.3.3.9 ReferenceSubsetting: referencedFeature : Feature {redefines subsettedFeature} — the attribute's declared type is Feature. This section's own Constraints subsection is empty ("None"): there's no separate OCL rule needed, because the requirement is the attribute's own metamodel typing. A part def/action def is a Definition-kind element, not a Feature, so it cannot satisfy referencedFeature's type at all.
SysML v2.0 (formal/2026-03-02), 7.15.2 Allocation Definitions and Usages: the section's own worked example only ever allocates usages (allocate logical.component to physical.assembly inside an allocation definition, and allocate logical ::> system to physical ::> device at usage level) — never two bare definitions.
Note on #95
This is a different claim from #95 ("Subsetting type conformance is not checked"), which your team investigated and correctly closed as not-a-bug for general Subsetting (no type-conformance constraint exists there per KerML 8.3.3.3.10). ReferenceSubsetting's referencedFeature attribute is a different, more basic thing: it isn't asking whether two feature types conform to each other, it's that the referenced element must be a Feature at all, which a Definition structurally is not. We think this survives #95's reasoning, but wanted to flag the connection explicitly rather than have it look like the same question re-asked.
Request
Diagnose an allocate (or any ReferenceSubsetting-based relationship) whose ends are not features, the way sysml-toolkit already does.
- 主要语言
- Go
- 星标
- 24
- 派生
- 5
- 平均合并
- 10 小时 7 分钟
- 30 天内合并 PR
- 536
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Open-MBEE/OpenSysML 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 52/100
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 38/100
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 55/100
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 52/100
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 58/100
维护者通常 1 天内回复
查看 Open-MBEE/OpenSysML 的全部 Issue
相似的 Issue
-
bug
难度 1/5 1 小时以内 新手友好度 92/100
open-telemetry/opentelemetry-go-compile-instrumentation#1417 ·
维护者通常 2 天内回复
-
agent-research-finding agent-research-recommend chore ready-for-agent
难度 2/5 1-3 小时 新手友好度 85/100
jordansmall/spindrift#4068 · 1 条评论 ·
维护者通常 1 天内回复
-
Type/Task
难度 2/5 1-3 小时 新手友好度 74/100
OpenNSW/nsw-srilanka#537 ·
维护者通常 1 天内回复
-
security
难度 2/5 1-2 天 新手友好度 62/100
-
难度 2/5 1-3 小时 新手友好度 90/100
维护者通常 1 天内回复