`GetElementProperties` `Feature::type` leaves out the type a feature gets by subsetting when it also has its own typing
维护者通常 1 天内回复
评估
调研方向
Start by running the SysML snippet in the issue through the Python client and comparing element_properties("P::Owner::pBoth", "type") with type_facts.types, then check the A40-040..042 cases in test-suite/data/models/A40.sysml. Find where the GetElementProperties type read stops at the feature's own typing and skips the types inherited through subsetting, and find the Symbol API code that already includes them. Done when type returns [P::V, P::T] for pBoth and the A40 types cases pass in the Go and Python property suites.
由索引模型根据 Issue 内容生成。
描述
This issue was written with AI help. The reproduction was run against the version below.
What happened
Since #2040 (#2007), the Symbol API's type_facts.types gives a feature's derived Feature::type, including the types it gets through subsetting. #2021's closing comment says it equals element_properties(el, "type"). For a feature that has both its own typing and a subsetting, the two answers differ:
package P {
part def T;
part def V;
part def Owner {
part q : T;
part pBoth : V :> q; // typed by V, subsets q : T
}
}
m = opensysml.loads(SRC) # no diagnostics
[t.id for t in m.get("P::Owner::pBoth").type_facts.types] # ['P::V', 'P::T']
m.element_properties("P::Owner::pBoth", "type") # ['P::V']
| Read | P::Owner::pBoth |
|---|---|
Symbol API type_facts.types |
P::V, P::T |
GetElementProperties type |
P::V |
Pilot Feature::type |
P::V, P::T |
ownedTyping and ownedSubsetting each list their one relationship. A feature that only subsets (part pSub :> q;) answers P::T through both reads, so the gap seems to be the combination of the two.
Expected
type is [P::V, P::T]: KerML §8.3.3.3 Feature::type includes the types of the features it subsets. That is the answer of the Symbol API, the Pilot (0.64.0-SNAPSHOT, commit 378a8700c) and sysml-toolkit.
Version
OpenSysML develop at a159469093, bin/sysml-grpc from make build-grpc, Python client from client/python of the same commit.
Found by
The test suite at https://github.com/hideo67/sysmlv2-tests, matrix A40 (test-suite/data/matrices/A40.md, model test-suite/data/models/A40.sysml). pBoth's types fails on the def, through a typing usage and through a usage of a specializing def (A40-040..042), in opensysml-py-props and opensysml-go-props. The six Symbol API suites pass these cases.
- 主要语言
- Go
- 星标
- 59
- 派生
- 20
- 平均合并
- 10 小时 23 分钟
- 30 天内合并 PR
- 897
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Open-MBEE/OpenSysML 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 35/100
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 35/100
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 55/100
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 28/100
维护者通常 1 天内回复
查看 Open-MBEE/OpenSysML 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 66/100
AvengeMedia/DankMaterialShell#4301 · 1 条评论 ·
-
priority: p2 type: bug type: docs
难度 2/5 1-3 小时 新手友好度 84/100
googleapis/google-cloud-swift#1641 ·
维护者通常 1 天内回复
-
needs-triage
难度 2/5 1-3 小时 新手友好度 72/100
krakenhavoc/cmd_and_ctrl#5853 ·
维护者通常 1 天内回复
-
flaky test: TestTRTAsyncPrefillFailures/transport reads the token load before prefillDone has released it可能已有人在做 @Jackmeson1 今天认领。 未关闭area/cicd area/gateway kind/misc
难度 2/5 1-3 小时 新手友好度 85/100
vllm-project/aibrix#3488 · 2 条评论 ·
维护者通常 1 天内回复