Derived-property census of GetElementProperties against the Pilot

Đang mở
#2,028 3 bình luận 1 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
55/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go
Lĩnh vực
backend, testing

Hướng nghiên cứu

Start with test-opensysml-go/census_test.go and data/gen_census.py, then read the linked census snapshot and the rules.go property rules to understand how the measurements map to served properties. The issue suggests adding a measured column using the embedded examples; done means the census can report how often served rules return values. The issue gives no specific test command for that addition.

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

Mô tả

enhancement spec compliance

Following up on #2012 and #2021: once GetElementProperties made every metamodel property readable by name, we could count, across whole models, which derived properties come back with values. We added a census to our test suite that does this for each MDK in the same way, with the Pilot as the reference column.

How it works

  • The property list is every feature marked derived="true" in the Pilot's SysML.ecore (328 properties), per concrete metaclass.
  • Two corpora: our matrix models (23 files) and the Pilot's examples and training models (195 files, loaded together as one model).
  • For each element, as written, the census reads every derived property its metaclass carries and records a value, an empty answer, or "not derived".
  • OpenSysML is read in process through the Go client, at 071880026e.

Snapshot: census-SNAPSHOT.md. Design and notes: DISCUSSIONS.md, Step 13. It can be rerun with ./run-census.sh from test-suite/.

Summary (properties with values on at least one element / answered but always empty / not derived):

corpus Pilot sysml-toolkit OpenSysML
matrix models 194 / 71 / 0 194 / 69 / 2 142 / 86 / 33
Pilot examples 300 / 22 / 0 297 / 22 / 3 180 / 82 / 54

The "not derived" group largely matches what rules.go declares as omitted, and the service's explanations for those are clear. The census suggests another group may be the most useful one to look at: properties that are listed as served but come back empty on every element where the Pilot has values. On the Pilot examples there are 66 of them. Some of the most frequent:

property Pilot has values OpenSysML
Feature::ownedTypeFeaturing 18,843 of 20,294 empty on all 13,953
InstantiationExpression::instantiatedType 1,456 of 1,456 empty on all 1,107
Type::endFeature 782 of 21,346 empty on all 14,751
Connector::association 605 of 605 empty on all 447
Import::importedElement 408 of 408 empty on all 325
Behavior::step 220 of 220 empty on all 169
Function::result 127 of 127 empty on all 90
Flow::sourceOutputFeature / targetInputFeature 85 of 127 empty on all 106
ConjugatedPortDefinition::originalPortDefinition 79 of 79 empty on all 39
SendActionUsage::payloadArgument 34 of 35 empty on all 23

The same holds for the <kind>Definition of several usage kinds (enumeration, flow, interface, case, use case, view, rendering, allocation...) and for the filtered owned/nested usage lists of Definition and Usage (ownedFlow, nestedTransition, ownedRequirement, ...). The full list is in the snapshot under "Differences from the reference".

A second group fills at a much lower rate than the Pilot, e.g. Step::behavior 5% vs 100%, Expression::function 8% vs 100%, Usage::isReference 3% vs 100%, Connector::sourceFeature 32% vs 94%. Part of this group probably reflects implied relationships: the Pilot includes them after transformation, while GetElementProperties answers with isImpliedIncluded = false (e.g. Feature::type, Type::ownedSpecialization, Type::inheritedFeature). So these numbers are a pointer rather than a verdict. Usage::isReference and the connector ends are the cases we already described in #2012.

A possible use on your side: rules.go already records, per property, the rule that serves it. A measured column next to it, filled the way this census fills it (how often a served rule returns a value over the embedded examples), would show these cases as the rules are written. You're welcome to take the census or any part of it (data/gen_census.py, test-opensysml-go/census_test.go). The Go adapter is about 230 lines and uses only the public client.

Not derived on the Pilot examples (54)

ActionDefinition::action, AllocationDefinition::allocation, AnalysisCaseDefinition::resultExpression, AnalysisCaseUsage::resultExpression, AnnotatingElement::owningAnnotatingRelationship, AssertConstraintUsage::assertedConstraint, AssignmentActionUsage::referent, AssignmentActionUsage::targetArgument, AssignmentActionUsage::valueExpression, Association::associationEnd, Association::relatedType, Association::sourceType, Association::targetType, BooleanExpression::predicate, CalculationDefinition::calculation, ConnectionDefinition::connectionEnd, Documentation::documentedElement, EnumerationDefinition::enumeratedValue, EventOccurrenceUsage::eventOccurrence, ExhibitStateUsage::exhibitedState, Expression::isModelLevelEvaluable, FlowDefinition::flowEnd, ForLoopActionUsage::loopVariable, ForLoopActionUsage::seqArgument, Function::isModelLevelEvaluable, IfActionUsage::elseAction, IfActionUsage::ifArgument, IfActionUsage::thenAction, IncludeUseCaseUsage::useCaseIncluded, InterfaceDefinition::interfaceEnd, LoopActionUsage::bodyAction, MetadataFeature::metaclass, Package::filterCondition, PerformActionUsage::performedAction, RenderingDefinition::rendering, SatisfyRequirementUsage::satisfiedRequirement, SatisfyRequirementUsage::satisfyingFeature, TerminateActionUsage::terminatedOccurrenceArgument, TextualRepresentation::representedElement, UseCaseUsage::includedUseCase, VerificationCaseDefinition::verifiedRequirement, VerificationCaseUsage::verifiedRequirement, ViewDefinition::satisfiedViewpoint, ViewDefinition::view, ViewDefinition::viewCondition, ViewDefinition::viewRendering, ViewUsage::exposedElement, ViewUsage::satisfiedViewpoint, ViewUsage::viewCondition, ViewUsage::viewRendering, ViewpointDefinition::viewpointStakeholder, ViewpointUsage::viewpointStakeholder, WhileLoopActionUsage::untilArgument, WhileLoopActionUsage::whileArgument

Ngôn ngữ chính
Go
Star
56
Fork
17
Merge trung bình
12 giờ 45 phút
Pull request đã merge (30 ngày)
910

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.