Subsetting uniqueness conformance is not checked for an implicit subsetting

Đã đóng
#726 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ó
3/5
Thời gian dự kiến
1-2 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 in internal/semantic/semantics/redefinition_conformance.go, especially Model.ConformanceViolations, and review how written RelSubsets/RelRedefines are traversed. Check Systems Library/Actions.sysml:57, the implicit subaction handling, and xpect/p04-nonunique-subsets-unique.kerml. Done means validation reports the uniqueness conformance error for the implicit nonunique subsetting while preserving the existing written-subsetting cases.

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

Mô tả

validateSubsettingUniquenessConformance is checked for a subsetting written in the source (:>, subsets), but not for one the feature gets implicitly.

package N {
    action def A {
        action b[*] nonunique;
    }
}

b is a composite action owned by an action definition, so it implicitly subsets Actions::Action::subactions (checkActionUsageSubactionSpecialization). subactions is declared Action[0..*] with no nonunique (Systems Library/Actions.sysml:57), so it is unique, and a nonunique b cannot subset it.

model sysml -validate (develop d9a97d6d8) expected (validateSubsettingUniquenessConformance)
action b[*] nonunique; no errors the same error, at b: its implicit subsetting of subactions breaks the constraint
action b[*] nonunique :> subactions; 3:34: error: Subsetting/redefining feature cannot be nonunique if subsetted/redefined feature is unique this error
action b[*]; no errors no errors

The constraint is on the Subsetting, and an implied Subsetting is one too. Model.ConformanceViolations (internal/semantic/semantics/redefinition_conformance.go) walks only the written RelSubsets/RelRedefines relationships, plus the positional parameter counterparts for direction. validation-constraints.md lists the constraint as faithful, with only the written case (xpect/p04-nonunique-subsets-unique.kerml).

Other implicit subsettings of a unique library feature would be missed the same way. Examples are the other subactions-style features in Actions.sysml and Transfer::payload (Anything[1..*]) for a flow's payload.

Ngôn ngữ chính
Go
Star
47
Fork
13
Merge trung bình
15 giờ 12 phút
Pull request đã merge (30 ngày)
925

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.