Skip to content

fix(export): the RDF writer states an association's Relationship::relatedElement, source and target as its ends' types in order, the first the source, the targets unique — an allocation, connection or interface definition carries them as the query leg derives them and the pilot exports them - #2180

Merged
HuiJun merged 3 commits into
developfrom
fix/association-rdf-relationship-ends
Nov 13, 2026

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

What and why

The RDF writer stated an association definition's ends and their types but none of the three relationship properties the pilot exports for it, so allocation def FunctionToPart { end function : Observe; end part : Subsystem; } carried no sysml:relatedElement, sysml:source or sysml:target — the writer-side gap #2175 named, where the query leg now derives all three.

The writer now reads the semantic model's AssociationRelatedTypes (the derivation #2175 added for the query leg, exported so both legs share one source of truth) and states each type's term on the definition: relatedElement as its ends' types in order, source the first, target the rest as a unique list in first-occurrence order. A ~P end names the ConjugatedPortDefinition the writer mints beside P (conjugation.golden.ttl). An association without ends (interface def Plain;) states none.

One representation limit, stated in the test: a graph is a set of triples, so a type two ends share (end producer : ArtifactPort; end consumer : ArtifactPort;) is stated once in relatedElement where the pilot repeats it — the same collapse a connector's repeated relatedFeature (connect (a, b, b)) has had since #2135. Carrying a repeated object value is a mapping-level question (an ordered-list annotation) for a later PR.

The chained-end source/target writer gap (#2135's plain-end rule) is not touched here; it follows as its own PR.

Specification basis

KerML 1.0 8.3.4.4.2 Association: relatedType, sourceType and targetType redefine Relationship::relatedElement, source and target; target is a unique list (8.3.2.1). No compliance row moves.

How it was verified

  • New TestAssociationStatesItsRelationshipEnds (tests/export): binary allocation, a three-ended connection with a doubly-typed end, and an endless interface definition; fails on develop (all three properties absent).
  • Goldens re-recorded (conjugation, end_prefix_metadata, feature_chains, the views_flows_parameters digest): growth is the added sysml:relatedElement/source/target lines, plus the Base::DataValue library stub an attribute end's implied type references.
  • Structure differential re-recorded: only the three Relationship::* rows move, different → equal on every root (examples relatedElement different 119 → 102, pilot corpora 397 → 352, spec examples 75 → 55; symbol-missing/symbol-extra unchanged).
  • API-JSON differential re-recorded: the association rows move ours-missing → present-equal (e.g. quality.sysml AllocationDefinition.*), except 13 relatedElement rows of two-ends-one-type definitions, ours-missing → present-different (the collapse above); source/target on those are equal.
  • derived-census -check, both corpus round-trip sweeps (TestExamplesSweep), make docs-counts, make lint, make changelog-check, go vet, gofmt reproduce/clean.
  • make test-short: 137 packages ok; cmd/sysml, tests/codegen, tests/export hit the 10-minute cold-cache timeout and re-run alone (result in a comment).

Checklist

  • make test and make lint pass locally
  • Tests added or updated for the change
  • Documentation extended where it already covers the surface (see CONTRIBUTING.md)
  • Changelog entry added as changes/unreleased/<slug>.<section>.md, not as an edit to CHANGELOG.md
  • baselines regenerated and make docs-counts run if a gate count moved (compliance rows need nothing: the census is counted at docs build)
  • No internal work-item labels (waves, slices, F4, K5) in the body, docs, or changelog

Link to Devin session: https://nasa-jpl-demo.devinenterprise.com/sessions/18ad47adf36f44e9b6824a4472f9678d
Open in Devin Desktop: https://nasa-jpl-demo.devinenterprise.com/desktop/session/18ad47adf36f44e9b6824a4472f9678d?variant=devin
Requested by: @NicolasRouquette


🟢 Devin Review found nothing to fix · View findings

Devin Review

…atedElement, source and target as its ends' types in order, the first the source, the targets unique — an allocation, connection or interface definition carries them as the query leg derives them and the pilot exports them

The writer stated an association definition's ends and their types but none of the three relationship properties the pilot exports for it (KerML 8.3.4.4.2: relatedType, sourceType and targetType redefine relatedElement, source and target). It now reads the semantic model's AssociationRelatedTypes — the derivation the query leg answers since #2175, exported for both legs to share — and states each type's term, a `~P` end naming the ConjugatedPortDefinition minted beside P. A graph being a set of triples, a type two ends share is stated once where the pilot repeats it.

New export test fails on develop. Goldens grow by the added lines; the structure differential moves only the three Relationship rows, different → equal on every root; the api-json differential moves the association rows ours-missing → equal (13 repeated relatedElement rows → present-different); census, both round-trip sweeps and docs-counts reproduce.

Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

Full suite on d5ec078: make test-short 137 packages ok; the three that hit the 10-minute cold-cache timeout pass alone — cmd/sysml 394s, tests/codegen 462s, tests/export 315s (go test -count=1 -timeout 60m, exit 0).

devin-ai-integration Bot and others added 2 commits November 13, 2026 00:29
…f-relationship-ends

Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>

# Conflicts:
#	docs/project/api-json-differential/examples/disposal-robot-demo/robot.sysml.json
#	docs/project/api-json-differential/examples/disposal-team-demo/team.sysml.json
#	docs/project/api-json-differential/examples/mosa-demo/mosa-demo.sysml.json
#	docs/project/api-json-differential/examples/parser_features_demo_connectors.sysml.json
#	docs/project/api-json-differential/examples/runtime-showcase/spacecraft-comms.sysml.json
#	docs/project/api-json-differential/examples/self-model/pipeline.sysml.json
#	docs/project/api-json-differential/examples/self-model/quality.sysml.json
#	docs/project/api-json-differential/examples/views-demo.sysml.json
#	docs/project/api-json-differential/index.json
#	docs/project/api-json-differential/pilot-examples/Association Examples/ProductSelection_N_ary.sysml.json
#	docs/project/api-json-differential/pilot-examples/Association Examples/ProductSelection_OwnedEnds.sysml.json
#	docs/project/api-json-differential/pilot-examples/Association Examples/ProductSelection_UnownedEnds.sysml.json
#	docs/project/api-json-differential/pilot-examples/Cause and Effect Examples/CauseAndEffectExample.sysml.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
#	docs/project/api-json-differential/pilot-examples/Metadata Examples/IssueMetadataExample.sysml.json
#	docs/project/api-json-differential/pilot-examples/Requirements Examples/RequirementDerivationExample.sysml.json
#	docs/project/api-json-differential/pilot-examples/Simple Tests/AllocationTest.sysml.json
#	docs/project/api-json-differential/pilot-examples/Simple Tests/ConjugationTest.sysml.json
#	docs/project/api-json-differential/pilot-examples/Simple Tests/ConnectionTest.sysml.json
#	docs/project/api-json-differential/pilot-examples/Simple Tests/InterfaceTest.sysml.json
#	docs/project/api-json-differential/pilot-examples/Vehicle Example/Annex_A_VehicleViews.sysml.json
#	docs/project/api-json-differential/pilot-examples/Vehicle Example/SysML v2 Spec Annex A SimpleVehicleModel.sysml.json
#	docs/project/api-json-differential/pilot-examples/Vehicle Example/VehicleDefinitions.sysml.json
#	docs/project/api-json-differential/pilot-examples/v1 Spec Examples/8.4.1 Wheel Hub Assembly/Wheel Package - Updated.sysml.json
#	docs/project/api-json-differential/pilot-examples/v1 Spec Examples/8.4.1 Wheel Hub Assembly/Wheel Package.sysml.json
#	docs/project/api-json-differential/pilot-validation/02-Parts Interconnection/2a-Parts Interconnection.sysml.json
#	docs/project/api-json-differential/pilot-validation/03-Function-based Behavior/3c-Function-based Behavior-structure mod-1.sysml.json
#	docs/project/api-json-differential/pilot-validation/03-Function-based Behavior/3c-Function-based Behavior-structure mod-2.sysml.json
#	docs/project/api-json-differential/pilot-validation/08-Requirements/8-Requirements.sysml.json
#	docs/project/api-json-differential/pilot-validation/12-Dependency Relationships/12b-Allocation-1.sysml.json
#	docs/project/api-json-differential/spec-examples/sysml/7.13.2/1.sysml.json
#	docs/project/api-json-differential/spec-examples/sysml/7.13.2/12.sysml.json
#	docs/project/api-json-differential/spec-examples/sysml/7.13.2/4.sysml.json
#	docs/project/api-json-differential/spec-examples/sysml/7.13.2/5.sysml.json
#	docs/project/api-json-differential/spec-examples/sysml/7.13.2/6.sysml.json
#	docs/project/api-json-differential/spec-examples/sysml/7.14.2/1.sysml.json
#	docs/project/api-json-differential/spec-examples/sysml/7.15.2/1.sysml.json
#	docs/project/api-json-differential/spec-examples/sysml/7.16.2/1.sysml.json
#	docs/project/api-json-differential/spec-examples/sysml/8.4.10.1/1.sysml.json
#	docs/project/api-json-differential/spec-examples/sysml/8.4.11.1/1.sysml.json
#	docs/project/api-json-differential/spec-examples/sysml/8.4.12.1/2.sysml.json
#	docs/project/api-json-differential/spec-examples/sysml/8.4.12.1/3.sysml.json
#	docs/project/api-json-differential/spec-examples/sysml/8.4.9.1/4.sysml.json
#	docs/project/api-json-differential/testdata/passes/corpus_notation.sysml.json
#	docs/project/api-json-differential/testdata/passes/redefinition_end_owner.sysml.json
#	docs/project/api-json-differential/training/09. Connections/Connections Example.sysml.json
#	docs/project/api-json-differential/training/11. Interfaces/Interface Decomposition Example.sysml.json
#	docs/project/api-json-differential/training/11. Interfaces/Interface Example.sysml.json
#	docs/project/api-json-differential/training/13. Flows/Flow Definition Example.sysml.json
#	docs/project/api-json-differential/training/13. Flows/Flow Interface Example.sysml.json
#	docs/project/api-json-differential/training/38. Allocation/Allocation Definition Example.sysml.json
…erge

Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@HuiJun
HuiJun added this pull request to the merge queue Nov 13, 2026
Merged via the queue into develop with commit 0ad055b Nov 13, 2026
30 checks passed
@HuiJun
HuiJun deleted the fix/association-rdf-relationship-ends branch November 13, 2026 02:34
devin-ai-integration Bot added a commit that referenced this pull request Nov 13, 2026
…ationship-end movements in the api-json differential record

Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
richetl pushed a commit to richetl/OpenSysML that referenced this pull request Nov 13, 2026
… the chained-end relatedElement, source and target rows beside Open-MBEE#2180's association rows

Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants