Repository navigation
fix(query): a definition's own valueless end named source or target yields to Relationship::source and target on the query leg — as an inherited library end does since #2172, so an interface definition with ends named source and target answers its ends' types, as the pilot derives them - #2194
Conversation
…ields to Relationship::source and target on the query leg — as an inherited library end does since #2172, so an interface definition with ends named source and target answers its ends' types, as the pilot derives them Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
…e an explicit one when it yields to a metaclass property — a stated empty value at its position keeps shadowing Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…fining its positional parent explicitly names one general, not two, so the valueless walk stays linear in a chain Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
There was a problem hiding this comment.
Devin Review found 2 findings. Devin automatically fixed all 2 findings.
Fixed by Devin (2)
- Positional empty values lose shadowing — Real: an end's positional redefinitions hold beside an explicit
:>>(KerML 8.3.3.3.4; implicitEndRedefinitions says so), so statesNoValue now walks them in every case —connection def S :> G, G2 { end source : A redefines q; … }withG::a = nullkeeps the stated empty value (new test, fails without the fix). - Exponential traversal of redefined ends — Real: an end that redefines its positional parent explicitly named that parent twice (explicit + positional), doubling the walk at each level of a chain; the generals are now deduplicated so each is visited once (new 16-level chain test).
|
Full gate on 04075e9 / 318e971 (the two later commits touch |
What and why
An interface, connection or allocation definition whose own ends are named
sourceandtarget— the observatory'sinterface def OpticalInterface { end source : OpticalPort; end target : OpticalPort; }— answeredRelationship::sourceandtargetas[]on the query leg: the member path and the property read resolved the name to the own end, a feature that states no value, and that empty answer shadowed the metaclass property. #2172 made a valueless member the element only inherits (the library'sLinks::BinaryLink::sourceend every connector gets) yield to the metaclass property; this extends the rule to a valueless member the element declares as an end, since an end carries no value of its own and the pilot derivessource/targetfrom the ends' types whatever their names.OpticalInterface.source→OpticalPort,target→OpticalPort(relatedElementwas alreadyOpticalPort, OpticalPort); an own valueless attribute that is no end (part a : A { attribute isComposite : Boolean; }) keeps shadowingisComposite, as the new test checks beside the end case. The test fails on develop (both cells[]).Found by the QVTS reflection cross at #2180's landing (Open-MBEE/qvts#97):
InterfaceDefinition::source/targetofOpticalInterface— the RDF writer statesOpticalPortsince #2180, the native side answered nothing.Specification basis
KerML 1.1 §8.3.4.4.2 (
Association::sourceType/targetTyperedefineRelationship::source/targetas the ends' types) and §8.3.4.5.1 (a Connector'ssourceFeature/targetFeaturelikewise); SysML v2 §8.3.11 (a connection, interface or allocation definition's ends redefine the general association's by position). No compliance row moves: the derivation is #2175's; this PR only stops a same-named own end from masking it on the query leg.How it was verified
internal/doc/queryexecTestOwnEndNamedSourceYieldsToRelationshipEnds(fails on develop); the fix(query): a connector's Relationship::source and target answer on the query leg past the valueless source and target ends it inherits from the library — a connection, an interface, a flow and an allocation read them as the RDF writer and the pilot state them #2172 tests (TestConnectorSourceAndTargetAnswerPastInheritedEnds,TestMemberPathReadsConnectorSourcePastInheritedEnd,TestInheritedStatedEmptyValueKeepsShadowingMetaclassProperty) still pass.go test ./internal/semantic/... ./internal/doc/... ./internal/frontend/repl/... ./internal/check/...26 packages ok.derived-census -check,pilot-apijson-diff -checkand the structure differential reproduce (no writer or walk change).make lint,make changelog-check,go vet ./...,gofmt -l .clean;make test-shortresult in the gate comment.Checklist
make testandmake lintpass locallychanges/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 changelogLink 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 fixed all 2 findings · Follow Devin's work