[Add] Sirius object model + .aird reading; split Auriga.Core / Auriga.Xmi.Core (closes #52)#64
Open
samatstariongroup wants to merge 5 commits into
Open
[Add] Sirius object model + .aird reading; split Auriga.Core / Auriga.Xmi.Core (closes #52)#64samatstariongroup wants to merge 5 commits into
samatstariongroup wants to merge 5 commits into
Conversation
…l docs); pin generated output to LF
…re and Auriga.Xmi.Core
This was referenced Jul 11, 2026
Contributor
|
|
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.



Closes #52 (Phase A of the
.airdsupport epic #50), and adds the first working.airdreadpath plus the assembly refactor that keeps the Sirius and Capella stacks independent.
This branch grew past the original #52 scope (which was "generate the Sirius object model"). It now
contains four coherent pieces:
Auriga.Siriusobject model +Auriga.Sirius.Xmireaders/writers..airdfiles into that object model.Auriga.Core— extract the shared object-model base types.Auriga.Xmi.Core— extract the shared, metamodel-agnostic XMI runtime.1. Generate the Sirius/GMF object model + readers/writers (#52)
Drives the existing metamodel-agnostic
Auriga.CodeGeneratorat the vendored Sirius/GMF metamodels(
resources/ecore-sirius, from #51) to emit a separateAuriga.Siriusobject model andAuriga.Sirius.Xmireaders/writers.Auriga.Sirius— the Sirius viewpoint/diagram/sequence/table + GMF notation object model:454 interfaces, 357 classes, 39 enums.
Auriga.Sirius.Xmi— per-type readers + writers, a reader facade + namespace registry, and awriter facade.
Generator changes (metamodel-neutral; parameterized by a single thread-scoped
rootNamespaceknobvia the new
NamingContext):Auriga; a Sirius run passesAuriga.Sirius).that declares/inherits it (e.g. GMF
View.diagraminherited byDiagram) gets a trailing_;the XML name stays the raw Ecore name.
EDataTypes and the opaque Ecore system datatypes map tostring/object; a containment ofecore::EObjectis typed asIAurigaElement.///lines; multi-valued enumattributes read/write as whitespace-delimited lists (new
WriteEnumListAttribute).SiriusGeneratorTestFixturemirrors the Capella drift guard: determinism, classifier counts(454/39 from
docs/sirius-metamodel-inventory.md), and a comprehensive regenerate-and-compare guardover every committed file. Explicit
Regenerate_sirius_*tests rewrite the committed code.2. Read real
.airdfilesSiriusXmiReaderBuilder.Create().Build().Read(path)reads an.airdinto the typedAuriga.Siriusgraph. Making that work drove three genuine, metamodel-neutral fixes to the reader, uncovered by the
first
.airdreading test:xmi:XMImulti-root — an.airdwraps ~7 parallel top-level roots (1viewpoint:DAnalysis+N
diagram:DSemanticDiagram/sequence:SequenceDDiagram).XmiReadernow reads every child of thexmi:XMIwrapper into one shared graph and returns the DAnalysis asRoot.xmi:typeas well asxsi:type— Capella serializesxsi:type, Sirius serializesxmi:type(EMF treats them as interchangeable). The facade's
ResolveTypeKeynow reads either.id/xmi:id/uid— Capella uses a bareid, GMF usesxmi:id, the Siriusrepresentation model uses
uid. The reader now takes the first present, so every element is cachedand its cross-references resolve.
coffee-machine-demo.airdreads into 591 typed representation elements (DNodes, DEdges, styles,filters), rooted at a
DAnalysis, with intra-.airdreferences resolving.Known follow-ups (documented in the tests as
Assert.Ignore, not silently dropped):notation:Node/Edge/Bounds) is not read yet: the vendorednotation.ecorelacks the ExtendedMetaData annotations that rename
persistedChildren→childrenetc., so thoseelements are skipped. Needs re-vendoring + generator ExtendedMetaData support (rendering, [Add] B1 — Parameterize fragment loading + add the .aird model loader #53+).
ecore:EStringToStringMapEntrymaps (in 2 of 4 samples) have no reader yet.hrefinto the.capellastays unresolved standalone (that's [Add] B2 — Cross-metamodel semantic-link resolution (.aird to .capella) #54).3.
Auriga.Core— shared object-model base typesExtracts
IAurigaElement,AurigaElement,IContainerList<T>,ContainerList<T>into a newAuriga.Coreassembly (namespaceAurigapreserved).Auriga.Siriusnow referencesAuriga.Coreinstead of
Auriga, so it no longer drags in the entire Capella object model.4.
Auriga.Xmi.Core— shared XMI runtimeExtracts the metamodel-agnostic runtime — the two-pass
XmiReader, element cache, namespaceresolver, reference resolver, href parsing, and the
XmiElementReader<T>/XmiElementWriterbaseclasses — into
Auriga.Xmi.Core(namespacesAuriga.Xmi.*preserved).Auriga.Xmikeeps only theCapella-specific
CapellaModelLoader/CapellaProject/XmiReaderBuilder/XmiWriterBuilder+ theCapella
AutoGen*.Auriga.Sirius.Xminow referencesAuriga.Xmi.Core.Result —
Auriga.XmiandAuriga.Sirius.Xmiare independent siblings; verified thatAuriga.Sirius.Xmi's build output contains noAuriga.dllorAuriga.Xmi.dll(Capella):Both extractions are zero-regeneration: the types kept their original namespaces and only moved
assembly, so every generated file that references
Auriga.AurigaElement/Auriga.Xmi.Readers.XmiElementReader<T>compiles unchanged.Impact on Capella
Capella output is no longer byte-for-byte identical (the two reader/facade template fixes in §2
regenerated 276 Capella reader files, the facade, and 7 Expected golden files). It is, however,
behavior-preserving: Capella uses
xsi:type+id, so the newxmi:type/uidfallbacks arenever exercised there. Confirmed by the unchanged Capella golden/drift + round-trip suites staying
green.
Verification
dotnet build Auriga.sln— 0 errors..airdfollow-ups above + the 2pre-existing add-on-viewpoint round-trip skips).
Packaging
Adds
Auriga.CoreandAuriga.Xmi.Coreas two further packages, and each model/xmi package takes apackage dependency on its core. If you'd rather not publish the new assemblies until the reader work
matures, say so and I'll set
IsPackable=falseon the additions.