Repository navigation
feat(queryexec): WhereType exact keeps only the elements whose own metaclass is named - #1689
Merged
Merged
Conversation
…taclass is named Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…ary feature/wheretype-exact (b6784f23), which declares WhereType exact 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)".
|
…-Extensions-Library#15 (WhereType exact) Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…etaclassOf) with the named one by identity — transitions are TransitionUsages, a qualified metaclass name is the metaclass Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
NicolasRouquette
approved these changes
Oct 29, 2026
HuiJun
approved these changes
Oct 29, 2026
…on libraries Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
This was referenced Oct 29, 2026
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
WhereType(type = "PartUsage")keeps everything conforming to the type: subclasses of the metaclass and the model's own definitions/usages. A reflective walk over the metamodel (Open-MBEE/qvtsreflection.sysml, one query per concrete metaclass) needs each element under exactly one metaclass, soWhereTypenow takesexact = true— declared in Open-MBEE/OpenSysML-Extensions-Library#15 (merged) — and keeps only the rows whose own metaclass is one of the named ones:Unknown-classification reporting is unchanged (a name that is neither a metamodel type nor resolvable is still the typed error). The default is untouched, so no existing query changes meaning.
Dependency: the vendored extension libraries are pinned to
main's merge commit of #15,1ef079deaa98ff8be988ab7dea2f7a8c0640fb22(scripts/extension-libraries-pin.sh), which declares the parameter; nothing upstream is pending.Specification basis
OpenSysML
DocumentQueriessurface (Extensions Library), not an OMG clause; no row ofdocs/project/spec-compliance.mdmoves.How it was verified
TestExecuteWhereTypeExactKeepsOnlyTheNamedMetaclass(internal/doc/queryexec/wheretype_exact_test.go):type = "Usage"keeps every usage by default and nothing withexact;("PartUsage", "ItemUsage"), exact = truekeeps the part and the item and not the attribute or port; a model type (Heavy) withexactkeeps nothing;"SysML::Systems::PartUsage"keeps the part; in a state machine"TransitionUsage"keeps the transition and"StateUsage"the two states.go test ./internal/doc/queryexec ./internal/ir/queryplan,go vet,gofmt -lclean;scripts/sync-extension-libraries.sh --checkin sync with the pin.docs/manual/query-cookbook.md) says whatexactkeeps; changelog fragmentchanges/unreleased/wheretype-exact.added.md.Checklist
make testandmake lintpass locally (targeted packages; the full tier runs in CI)changes/unreleased/<slug>.<section>.md, not as an edit toCHANGELOG.mdmake docs-countsrun if a gate count moved (none moved)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