Repository navigation
fix(semantics): a satisfy usage's by subject varies in time and owns the FeatureValue binding it to its by value, as the conversion writes them - #1837
Merged
Conversation
…the FeatureValue binding it to its by value, as the conversion writes them Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
…erenceExpression owning its chain Feature at referent, as the conversion writes it; both mayTimeVary derivations admit the subject; parity test Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…t-value Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov> # Conflicts: # docs/project/api-json-differential-baseline.json
…s — the by clause and its target share a span, so the value is recorded as the clause's value part and the span fallbacks tell them apart; test; baseline re-recorded over the develop merge Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
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.
What and why
The subject parameter a
satisfy requirement r : R by sysdeclares (an unnamed ReferenceUsage owned through a SubjectMembership, #1806) read natively withisVariable = falseand owned no membership, while the RDF export statesisVariable/mayTimeVarytruefor it (a referential usage of the satisfy usage, an Occurrence) and a FeatureValue binding it tosys— two measured cross-ledger disagreements in qvts (Cross_ReferenceUsage_isVariableand_ownedRelationshipofObservatory__observatory___400_subject). The subject's declaration is thebyRelationship node, whichUsage::mayTimeVary,Feature::isVariableand the value-part reader did not recognise. They now do: the subject derivesmayTimeVary(and soisVariable) from its owning satisfy usage like every other parameter — on both derivations,UsageMayTimeVaryandUsageMayTimeVaryForOwningType— and its value part is thebytarget, soValueExpressionandOwnedMembershipsyield the FeatureValue the conversion writes.A chained subject (
by sys.sub) is written as the pilot grammar spells it (SysML.xtextSatisfactionReferenceExpression): a FeatureReferenceExpression owning a chain Feature atreferent(OwningMembership + one FeatureChaining per link), then its result — not the FeatureChainExpression a chained value elsewhere is. The reflective read mirrors that shape for a subject's chained value (metaclass,referent, owned memberships, chainings), and the id reader registers the value, chain Feature, chainings and result under the ids the writer mints, so the two ledgers agree element for element.Specification basis
SysML v2 8.3.19 (
SatisfyRequirementUsage, thebyclause binds the subject parameter), 8.3.6.4 (Usage::mayTimeVary), KerML 8.3.3.3.5 (Feature::valuationsubsetsownedMembership). No spec-compliance row moves.How it was verified
TestSatisfySubjectMembershipIsOwnedextended:UsageMayTimeVary,FeatureIsVariableand the reflectiveisVariablereadtrue;ValueExpression(subject)is thebyvalue and the subject's one owned membership is the FeatureValue owning it (all fail before this change).TestSatisfySubjectValueReadsAsTheConversionWritesIt(export parity): forby sysandby sys.sub, the native value's metaclass, owned-membership classes,referent, chaining features and the ids of the value, chain Feature and FeatureChainings equal the written graph's (fails without the reflective mirror).go build ./...,go vet,gofmt -l .empty;go test ./internal/semantic/... ./internal/doc/... ./internal/translate/export/... ./tests/export/...green. The writer is unchanged — only the id reader (recordSatisfySubjectValue) learns the ids the writer already mints — so the api-json baseline moves by its provenance digest alone.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