Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

allocate accepts two definitions as its ends (ReferenceSubsetting::referencedFeature must be a Feature)

Đã đóng
#646 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
68/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go
Lĩnh vực
compilers

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Go
Star
24
Fork
5
Merge trung bình
10 giờ 7 phút
Pull request đã merge (30 ngày)
536

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Open-MBEE/OpenSysML

Tất cả issue của Open-MBEE/OpenSysML

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.