Repository navigation
fix(semantics,export): Feature::type joins a feature's own typings with those it inherits - #2263
Merged
Merged
Conversation
…ead through A feature listed through a conjugated port carried its declared direction in Symbol metadata. GetSymbolRequest.member_of names the type the symbol is read as a feature of, and the direction is then the semantic model's Type::directionOf answer (KerML 8.3.3.1.10), the one GetElementProperties gives. GetElementProperties now reverses input/output for a port subsetting or redefining a conjugated one too. Fixes #2200 Co-Authored-By: jason.han <hanhuijun@gmail.com>
…t-member-direction
…t-member-direction
Co-Authored-By: jason.han <hanhuijun@gmail.com>
…t-member-direction
…t-member-direction
…th those it inherits GetElementProperties and the api-json element form answered only the written typing of a feature that also subsets or redefines a typed feature. The metamodel's redundancy elimination now decides conformance over the Structure's specializations where an element has no symbol, and the api-json element form writes the derived Feature::type, keeping the written typings as a mapping value (KerML 1.1 8.3.3.3.4 deriveFeatureType). Fixes #2198 Co-Authored-By: jason.han <hanhuijun@gmail.com>
…yping-and-subsetting
…g in Feature::type Co-Authored-By: jason.han <hanhuijun@gmail.com>
…ares itself Co-Authored-By: jason.han <hanhuijun@gmail.com>
…yping-and-subsetting Co-Authored-By: jason.han <hanhuijun@gmail.com>
…census on the merged tree The api-json fragments and index carry the Feature::type rows beside the chained-end relationship-end rows; the census row Feature::featuringType / pilot-examples returns to the pilot columns the pinned pilot measures (14551 value, 1312 empty). Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
…t-member-direction Co-Authored-By: jason.han <hanhuijun@gmail.com> # Conflicts: # api/proto/sysml.pb.go # api/proto/sysml.proto # client/node/src/generated/sysml_pb.ts # client/opensysml/client.go # client/opensysml/types.go # client/python/opensysml/capabilities.py # client/python/opensysml/connection.py # client/python/opensysml/proto/sysml_pb2.py # client/python/opensysml/proto/sysml_pb2.pyi # client/python/opensysml/symbol.py # client/python/tests/test_connection.py # client/python/tests/test_integration.py # client/rust/conformance/sysml.descriptor.binpb # client/rust/opensysml/src/connection.rs # client/rust/opensysml/src/proto/sysml/sysml.rs # conformance/README.md # internal/frontend/combined/combined.go # internal/frontend/core/json.go # internal/frontend/grpc/capability_test.go # internal/frontend/grpc/service.go # internal/frontend/mcp/runtimetools/info.go # internal/frontend/mcp/runtimetools/parse.go # tests/wasm/combined_test.go
…wer moves Co-Authored-By: jason.han <hanhuijun@gmail.com>
…t-member-direction Co-Authored-By: jason.han <hanhuijun@gmail.com> # Conflicts: # client/node/src/generated/sysml_pb.ts # client/python/opensysml/proto/sysml_pb2.py # client/python/tests/test_symbol.py # client/rust/conformance/sysml.descriptor.binpb # docs/project/api-json-differential/index.json # docs/project/api-json-differential/pilot-examples/Interaction Sequencing Examples/ServerSequenceOutsideRealization-3.sysml.json # docs/project/api-json-differential/pilot-examples/Interaction Sequencing Examples/ServerSequenceRealization-3.sysml.json # internal/frontend/grpc/capability_test.go # internal/frontend/grpc/service.go
…ort direction rows that now pass Co-Authored-By: jason.han <hanhuijun@gmail.com>
…t-member-direction
…cted features Co-Authored-By: jason.han <hanhuijun@gmail.com>
…t-member-direction Co-Authored-By: jason.han <hanhuijun@gmail.com> # Conflicts: # docs/project/api-json-differential/index.json # internal/semantic/metamodel/derived_census_records.tsv
…nnector end included Co-Authored-By: jason.han <hanhuijun@gmail.com>
…l_member_direction Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
…s capabilities Co-Authored-By: jason.han <hanhuijun@gmail.com>
…yping-and-subsetting Co-Authored-By: jason.han <hanhuijun@gmail.com>
…t-member-direction Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
… baseline Co-Authored-By: jason.han <hanhuijun@gmail.com>
…ugated-port-member-direction Co-Authored-By: jason.han <hanhuijun@gmail.com>
…t-member-direction
…yping-and-subsetting
… fix/conjugated-port-member-direction Co-Authored-By: jason.han <hanhuijun@gmail.com>
…ure-type-typing-and-subsetting Co-Authored-By: jason.han <hanhuijun@gmail.com> # Conflicts: # docs/project/api-json-differential.md
Both sides moved 'Verification Case Usage Example': the two individual parameters the occurrence-prefix change makes OccurrenceUsages take their occurrenceDefinition from the derived type, 2 ours-missing to present-equal. Refs #2198. Co-Authored-By: jason.han <hanhuijun@gmail.com>
…t-member-direction Co-Authored-By: jason.han <hanhuijun@gmail.com>
…jugated-port-member-direction Re-recorded by tool on the merged tree: the hideo-suite table and baseline (both sides moved it), and the Type::input and Type::output rows of the derived census for the pilot-examples and testdata roots. Co-Authored-By: jason.han <hanhuijun@gmail.com>
Keeps both tests appended to parity_options_internal_test.go: this branch's member-direction capability test and develop's Convert option tests. Co-Authored-By: jason.han <hanhuijun@gmail.com>
…ure-type-typing-and-subsetting
The merge kept this branch's A40 row (45 / 0 / 0) beside the other side's total; the total now counts those three cases as passing. Refs #2198. Co-Authored-By: jason.han <hanhuijun@gmail.com>
github-merge-queue
Bot
removed this pull request from the merge queue due to a conflict with the base branch
Nov 17, 2026
…by the feature it redefines in the RDF conversion and answers isVariable true on the native walk — `image` in `flow from telescope.image to …`, owned by an Occurrence-typed FlowEnd — as KerML 1.1 § 8.3.3.3.4 names it, SysML v2.1 § 8.3.16.6 types its owner and the pilot exports both The two legs disagreed on four cells of a flow end's redefining ReferenceUsage (the QVTS reflection cross at the #2266 pin): the native walk answered isVariable false where the conversion stated true, and the conversion stated no memberName on its FeatureMembership (nor a name on the usage) where the native walk derived the redefined feature's. The pilot exports memberName and name "image", isVariable and mayTimeVary true. - semantics/usage.go: synthesizedUsageMayTimeVary answers for the implied flow-end feature as for the other synthesized referential parts — its owning type is the FlowEnd, redefining Flows::Flow::source/target, an Occurrence-typed feature (UsageMayTimeVaryUnderLibraryFeature), never in a KerML document. - export/rdf_out.go: flowEndReferences states sysml:name on the usage and sysml:memberName on its membership from the model's effective name (flowEndFeatureName); nothing when the end resolves to nothing. - export/mapping_shape.go: a nameless feature its FeatureMembership names under a positional owner stays positional for the decoder, as the end itself is, so the round trip holds. - Tests: TestFlowEndFeatureVariesInTime (library-backed), TestElementFormFlowEndFeatureIsNamedByItsRedefinedFeatureAndVaries. - Re-recorded by tool: tests/export goldens (4 files: two name and two memberName triples); structure differential (name/qualifiedName/memberName/ownedMemberName symbol-extra 5 -> 2 and 4 -> 1, both roots, all toward agreement); api-json differential (FeatureMembership.memberName oursMissing -> presentEqual in 11 fragments, 92 values; presentEqual 2105606 -> 2105698, oursMissing 303083 -> 302991), adjudicated in docs/project/api-json-differential.md; derived census and the corpus round-trip sweep reproduce. Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…ow-end-feature-name-variable Conflicts: the api-json differential (index and six fragments both PRs re-recorded), one Turtle golden digest, the adjudication prose and the api-json form test file, where #2359 and this branch each appended a paragraph and a test — both kept, develop's first. Re-recorded by tool on the merged tree: tests/export goldens (-update), the structure differential (-update-structure-differential), the api-json differential (pilot-apijson-diff -update; -check reproduces). The movement against develop is this branch's alone: FeatureMembership.memberName oursMissing -> presentEqual in the same 11 fragments, 92 values (presentEqual 2106153 -> 2106245, oursMissing 302536 -> 302444), restated in docs/project/api-json-differential.md. derived-census -check reproduces. Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…ugated-port-member-direction Co-Authored-By: jason.han <hanhuijun@gmail.com> # Conflicts: # docs/project/hideo-suite.md
…ure-type-typing-and-subsetting Co-Authored-By: jason.han <hanhuijun@gmail.com> # Conflicts: # docs/project/hideo-suite.md
…hideo suite table after the merge The cell-wise merge kept three per-file property totals of the api-json differential at one side's value where both sides had moved them, and the hideo table took the merged side's A40 row. pilot-apijson-diff -update and hideo-suite -update restore them; no per-property row moves. Co-Authored-By: jason.han <hanhuijun@gmail.com>
…ugated-port-member-direction
…ure-type-typing-and-subsetting
github-merge-queue
Bot
removed this pull request from the merge queue due to invalid changes in the merge commit
Nov 18, 2026
devin-ai-integration Bot
added a commit
that referenced
this pull request
Nov 18, 2026
Co-Authored-By: jason.han <hanhuijun@gmail.com>
6 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2198.
What and why
GetElementProperties(element_propertiesin the clients) and theapi-jsonelement form answeredFeature::typewith a feature's written typing alone when the feature also subsets or redefines a typed feature:Two causes, both below the surfaces:
internal/semantic/metamodel(featureTypeConforms):deriveFeatureTypecollects the own and the inherited typings and then drops the ones another candidate already specializes. That redundancy check could only answer for two source symbols, so on the graph-backed Structure it reported "unknown" and the rule fell back to the stated typing. It now walks the Structure's own specializations where an element has no symbol, and still usessemantics.Model.Conformswhere both do.internal/translate/export(api-jsonelement form): the writer completed a derived property only when the graph stated nothing for it, and the graph'ssysml:typeis the written typing.Feature::typeis now markedoverStated: the element form writes the derived value from the same evaluator and keeps the written typings as thetypeentry ofsysx:mappingValues, so the document reads back to the same graph and the same notation. The RDF graph itself is unchanged.The Symbol API already answered both types and is untouched; no surface got its own rule.
Specification basis
KerML 1.1 Beta 2 §8.3.3.3.4
deriveFeatureType: a feature'stypeis the union of the types of its typings over the closure oftypingFeatures()(the features it subsets, redefines or reference-subsets, and the last feature of a chain), with types that another already specializes removed. No compliance row moves.How it was verified
New tests:
TestStructureFeatureTypesJoinOwnedAndSubsettedTypings(metamodel, graph-backed Structure): typing + subsetting, typing + redefinition, and an inherited type the written one specializes.TestElementPropertiesFeatureTypeJoinsOwnedAndInheritedTypings(gRPC):pBoth : V :> q→[V, T],pSub :> q→[T],pSpecific : W :> qwithW :> T→[W], a redefinition in a specializing definition →[V, T], reference subsetting →[V, T], a chained subsetting →[V, W],partDefinitionfollowingtype, and the feature read through a typing usage and through a usage of the specializing definition.TestAPIJSONFeatureTypeJoinsOwnedAndInheritedTypings(export): the same shapes in the element form, the written typing insysx:mappingValues, and no triple difference after reading the document back.Gates on this head:
go build ./...,go vet ./...,gofmt -l .(empty),make lint,go vet -C tools ./...,go test ./...andgo test -C tools ./...with all sixOPENSYSML_REQUIRE_*corpus variables set,pilot-apijson-diff -check,derived-census -check -require-exporter,pilot-diff -check,make docs-counts,check-doc-ids,changelog.py check.hideo67/sysmlv2-tests at
99eae49af071a79c81bf4262eb0c73d014fbb983(pass / fail / unsupported)developwith #2251 merged)opensysml-py-propsopensysml-go-propsopensysml-pyopensysml-goMatrix A40 is the only matrix with a delta; no case moved from pass.
docs/project/hideo-suite-baseline.tsvand the table indocs/project/hideo-suite.mdare re-recorded withtools/cmd/hideo-suite -update. No suite expectation was judged wrong.Baselines re-recorded (repo tools only)
docs/project/api-json-differential/(pilot-apijson-diff -update): 44 fragment files, every moved row atypeor a property derived from it. Present-equal 2093866 → 2094489, ours-missing 301463 → 300846, present-different 147594 → 147588, pilot-missing 84343 → 84419.typegains 85 present-equal (9 from present-different, 76 from ours-missing) and the derived definitions follow. Pilot-missing grows because those elements are aFeaturehere and a metaclass without that property in the pilot. OneItemUsagestays present-different: the pilot adds the impliedParts::PartbesideII2. The full adjudication is indocs/project/api-json-differential.md.internal/translate/export/testdata/structure_differential_expected.txt(-update-structure-differential):Feature::typedifferent 184 → 190 and symbol-extra 130 → 124, with the same six elements moving inUsage::definition,OccurrenceUsage::occurrenceDefinition,OccurrenceUsage::individualDefinition(to equal),ConstraintUsage::constraintDefinition,Expression::functionandStep::behavior. They are the namelessrequire efficiencyRequirement { … }constraint usages ofEVSample.sysmlandEVSample1.sysml: the graph-backed side answered nothing (two candidates it could not rank) and now answersEfficiencyRequirementthrough the reference subsetting. The symbol-backed Structure does not record the reference subsetting of these nameless usages, so the two sides now differ instead of one being empty; that gap predates this change and is not closed here.internal/semantic/metamodel/derived_census_records.tsv(derived-census -update): 38 rows ofFeature::typeand the properties derived from it move from not-derived to a value (811) or to empty (97, allOccurrenceUsage::individualDefinition); no carrier count and no pilot column moves in them. Recorded against the pinned pilot2026-09.1(0.63.1) under JDK 21, as CI runs it.tests/corpus/testdata/training_examples_expected.txtis untouched.Checklist
make testandmake lintpass locally (the suite was run asgo test ./..., without-race)changes/unreleased/<slug>.<section>.md, not as an edit toCHANGELOG.mdmake docs-countsrun if a gate count moved (compliance rows need nothing: the census is counted at docs build)F4,K5) in the body, docs, or changelog🟢 Devin Review found nothing to fix · View findings · Follow Devin's work