From 88da358947d6c3191cedf4c8f1422a048fdf17fd Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 10 Nov 2026 17:33:38 +0000 Subject: [PATCH 1/2] =?UTF-8?q?feat(QVTS):=20add=20QVTS,=20the=20shape=20o?= =?UTF-8?q?f=20a=20query=20result=20=E2=80=94=20Outcome=20and=20the=20Quer?= =?UTF-8?q?yResult=20view?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit QVTS: :QueryResult is a view that exposes the elements a query selected and states the query, its source, its Outcome (established, pathError, modelError) and its provenance. The declarations are those of examples/QVTS.sysml in Open-MBEE/qvts, as a library package with the non-normative notice this repository requires. No engine binding, so engine-contract.json is unchanged. Co-Authored-By: jason.han --- .meta.json | 7 ++++++- .project.json | 2 +- README.md | 1 + libraries/QVTS.sysml | 29 +++++++++++++++++++++++++++++ 4 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 libraries/QVTS.sysml diff --git a/.meta.json b/.meta.json index e95aa0b..807116c 100644 --- a/.meta.json +++ b/.meta.json @@ -40,6 +40,10 @@ "algorithm": "SHA256", "value": "1dc65b8af7d997047557b3297b8ac1b7e095ef992084e108f35e220a67518825" }, + "libraries/QVTS.sysml": { + "algorithm": "SHA256", + "value": "2ca4bcb7419c1938eeb8cb475780890812ce96aa4a7c194b1475ce4a0e347bfe" + }, "libraries/RandomFunctions.kerml": { "algorithm": "SHA256", "value": "50793e1e940b377777a931d102f86770b02576b019e6bfb7b8c33384cd78fbc7" @@ -69,7 +73,7 @@ "value": "9e00f049209584092dc8bcb398b736c08e6a39b1db667a8a744de3df72a543bf" } }, - "created": "2026-11-03T17:53:51Z", + "created": "2026-11-10T17:33:38Z", "index": { "AnalysisRecords": "libraries/AnalysisRecords.sysml", "DiagramLayout": "libraries/DiagramLayout.sysml", @@ -80,6 +84,7 @@ "OOSEM": "libraries/OOSEM.sysml", "OpenSysMLMathFunctions": "libraries/OpenSysMLMathFunctions.kerml", "OpenSysMLRenderings": "libraries/OpenSysMLRenderings.sysml", + "QVTS": "libraries/QVTS.sysml", "RandomFunctions": "libraries/RandomFunctions.kerml", "Simulation": "libraries/Simulation.sysml", "StateActivity": "libraries/StateActivity.kerml", diff --git a/.project.json b/.project.json index a0ba821..c5c3235 100644 --- a/.project.json +++ b/.project.json @@ -1,7 +1,7 @@ { "name": "OpenSysML Extensions Library", "publisher": "Open-MBEE", - "description": "Community non-normative SysML v2 and KerML extension libraries: diagram layout, identity and migration metadata, MOSA and OOSEM vocabularies, document queries, renderings, simulation, state machines, stochastic and state-space extensions, math and random functions, and validation constraints.", + "description": "Community non-normative SysML v2 and KerML extension libraries: diagram layout, identity and migration metadata, MOSA and OOSEM vocabularies, document queries and query results, renderings, simulation, state machines, stochastic and state-space extensions, math and random functions, and validation constraints.", "version": "1.0.0", "license": "Apache-2.0", "website": "https://github.com/Open-MBEE/OpenSysML-Extensions-Library", diff --git a/README.md b/README.md index f37cdc0..2f21a47 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ non-normative OpenSysML library; other tools resolve it when given the | OOSEM | OOSEM.sysml | Object-Oriented Systems Engineering Method artefacts, viewpoints and product views. | Any SysML v2 tool | | OpenSysMLMathFunctions | OpenSysMLMathFunctions.kerml | exp, ln, log, atan2, ceiling and the Integer quotient the Kernel Function Library omits. | Executing engine | | OpenSysMLRenderings | OpenSysMLRenderings.sysml | Renderings and views for case and mixed diagrams. `CaseView`/`asCaseDiagram` is a shorter way to write a standard `GeneralView` filtered on case-family metaclasses; the standard route is added by [OpenSysML#886](https://github.com/Open-MBEE/OpenSysML/pull/886). `MixedView`/`asMixedDiagram` is extension-only. | Any SysML v2 tool | +| QVTS | QVTS.sysml | The shape of a query result: `QueryResult`, a view that exposes the elements a query selected and states the query, its source, its `Outcome` (established, path error or model error) and its provenance. Specified by [Open-MBEE/qvts](https://github.com/Open-MBEE/qvts). | Any SysML v2 tool | | RandomFunctions | RandomFunctions.kerml | Seeded random draws: uniform, uniformInteger, triangular, normal. | Executing engine | | Simulation | Simulation.sysml | How a behavior is meant to be run: run count, draw resolution, clock, Monte Carlo. | Executing engine | | StateActivity | StateActivity.kerml | `isActive`: a derived Boolean that is true while a state usage is in its state machine's active configuration. | Executing engine | diff --git a/libraries/QVTS.sysml b/libraries/QVTS.sysml new file mode 100644 index 0000000..938b571 --- /dev/null +++ b/libraries/QVTS.sysml @@ -0,0 +1,29 @@ +library package QVTS { + doc /* + * NON-NORMATIVE Query/View/Transformation vocabulary for SysML v2; not part + * of the OMG SysML or KerML standard library. + * The QVTS-R library, first cut: the shape of a query result. A query is a + * calc def specializing DocumentQueries::Query; its result is a view that + * exposes the selected elements and states how it was obtained. + */ + private import ScalarValues::*; + + enum def Outcome { + doc /* established: a value, possibly empty; pathError: the query path names + something the model does not have; modelError: the model violates a + constraint a step relied on. */ + established; + pathError; + modelError; + } + + view def QueryResult { + doc /* One query run. The exposed members are the elements the query selected; + the attributes say which query, over which source, with which outcome, + and where the PROV record of the run is. */ + attribute query : String; + attribute source : String; + attribute outcome : Outcome; + attribute provenance : String; + } +} From c6d05b002c27e5e532cedc97685c54534e85cfa6 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 10 Nov 2026 18:17:19 +0000 Subject: [PATCH 2/2] feat(QVTS): list QVTS and QVTS::QueryResult in the engine contract OpenSysML's query engine writes an answer as a view typed by QVTS::QueryResult and its renderer recognises that definition, so both names are bound by qualified name. Co-Authored-By: jason.han --- engine-contract.json | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/engine-contract.json b/engine-contract.json index 6ce25ae..5dcafaf 100644 --- a/engine-contract.json +++ b/engine-contract.json @@ -912,6 +912,21 @@ "internal/ir/view/view.go" ] }, + { + "name": "QVTS", + "kind": "package", + "consumers": [ + "internal/doc/queryexec/resultview.go" + ] + }, + { + "name": "QVTS::QueryResult", + "kind": "element", + "consumers": [ + "internal/doc/queryexec/resultview.go", + "internal/ir/view/queryresult.go" + ] + }, { "name": "RandomFunctions", "kind": "package",