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

metadata construct not parsed — VerificationMethodKind annotations fail with 'expected a body member'

Đang mở
#608 2 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
Khá 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 with the OpenSysML parser path exercised by conn.load_from_content in the supplied Python reproduction, then compare metadata shorthand handling with SysML v2 formal/2026-03-02 §7.24.1 and Table 22. Done means the example returns ok=True without the “expected a body member” diagnostic and preserves parsing of the VerificationMethodKind annotation.

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

Mô tả

enhancement

Summary

The metadata construct in SysML v2 (used for VerificationMethodKind annotations on verification cases) fails to parse in OpenSysML v0.9.0.

Reproduction

import opensysml
conn = opensysml.connect(version='v0.9.0')
src = '''
package MetaTest {
    private import VerificationCases::*;
    part def Widget { attribute size : Real default = 1.0; }
    requirement def SizeReq {
        subject widget : Widget;
        require constraint { widget.size <= 5.0 }
    }
    requirement sizeReq : SizeReq;
    verification def SizeCheck {
        subject widget : Widget;
        #verificationMethod = VerificationMethodKind::test;
        objective {
            verify sizeReq;
        }
    }
}
'''
m = conn.load_from_content(src, strict=False)
print(m.ok)        # False
print(m.diagnostics[0].message)  # 'expected a body member'

Expected

ok=True — the metadata shorthand #feature = value should parse per SysML v2 formal/2026-03-02 §7.24 Table 22.

Spec citation

SysML v2 formal/2026-03-02 §7.24.1 (p.141), Table 22 (p.143): Verification Methods Compartment textual notation:
metadata VerificationMethod { kind = (VerificationMethodKind::inspect, ...); }

The #verificationMethod shorthand is the textual notation for this metadata block.

Context

Reported from Open-MBEE/toaster#19 while building an executable SysML v2 tutorial.

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

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.