From 12fd619d8ea69e92d77f4a9780f4dff1274757a9 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 3 Nov 2026 17:55:49 +0000 Subject: [PATCH] =?UTF-8?q?feat(DocumentQueries):=20Descendants=20takes=20?= =?UTF-8?q?relationships=20=3D=20true=20=E2=80=94=20walk=20ownership=20as?= =?UTF-8?q?=20KerML=208.3.2.1=20defines=20it,=20ownedRelationship=20then?= =?UTF-8?q?=20the=20elements=20each=20relationship=20owns?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A document query could reach a model's elements but none of the relationships that own them, nor the implied elements those own (connector ends, the conjugated port definition, a satisfy subject). The parameter defaults to false, so every existing query reads as before; the engine contract lists Descendants by name only. Closes #18. Co-Authored-By: Nicolas Rouquette --- .meta.json | 4 ++-- libraries/DocumentQueries.sysml | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.meta.json b/.meta.json index 601652e..e95aa0b 100644 --- a/.meta.json +++ b/.meta.json @@ -14,7 +14,7 @@ }, "libraries/DocumentQueries.sysml": { "algorithm": "SHA256", - "value": "c8f30ccffcc2c98609498c7cef83bbd5fdf74423230591721650bb4d1737f5b0" + "value": "d55d49583b4932c422535f3321c28a1a60268b02b5f6c451d2ef8d2704531e46" }, "libraries/IdentityMetadata.sysml": { "algorithm": "SHA256", @@ -69,7 +69,7 @@ "value": "9e00f049209584092dc8bcb398b736c08e6a39b1db667a8a744de3df72a543bf" } }, - "created": "2026-10-29T15:36:02Z", + "created": "2026-11-03T17:53:51Z", "index": { "AnalysisRecords": "libraries/AnalysisRecords.sysml", "DiagramLayout": "libraries/DiagramLayout.sysml", diff --git a/libraries/DocumentQueries.sysml b/libraries/DocumentQueries.sysml index 16c956b..42d8b35 100644 --- a/libraries/DocumentQueries.sysml +++ b/libraries/DocumentQueries.sysml @@ -15,10 +15,15 @@ library package DocumentQueries { } /* Descendants and Ancestors walk ownership from source to maxDepth levels; - * maxDepth = null (the default) walks the whole tree. */ + * maxDepth = null (the default) walks the whole tree. Descendants walks the + * owned members of each namespace; relationships = true walks ownership as + * KerML 8.3.2.1 defines it instead — ownedRelationship, then the related + * elements each relationship owns — so the memberships, specializations, + * typings, feature values and the implicit elements they own are reached. */ calc def Descendants { in source : Element[0..*] ordered; in maxDepth : Integer[0..1] default null; + in relationships : Boolean[0..1] default false; return result : Element[0..*] ordered; }