KerML 1.0b3 FTF Avatar
  1. OMG Issue

KERML_ — Root namespaces restricted to one single file

  • Key: KERML_-43
  • Status: open  
  • Source: Robert Bosch GmbH ( Florian Beer)
  • Summary:

    Usecase: large corporation is working on a project, where also other suppliers deliver parts of the product architecture.

    To avoid naming collisions in such constellations, it makes sense to use hierarchical package structures. If everyone just uses plain structures, we have potential conflicts with a duplicate declaration of namespaces.
    As within large corporations hundreds of engineers can be working of one product class, which might be organized as namespaces, it makes sense to split the definition of multiple namespaces within the same parent namespace in different files to avoid merge conflicts

    Example

    package Vehicle{
       part engine : MyCorp::Automotive::Engine::SmallEngine;
       part gearFront : MyCorp::Automotive::Transmission::AT8Gear;
       part rearGear : SomeSupplier::Transmission::FancyGear;
    }
    

    Possible resolutions:
    1) allow duplicate definitions of namespaces and implicitly merges the resulting trees, dangerous as it could happen unintended
    2) allow to merge sub-trees of duplicate namespaces with a keyword
    2a) all except one namespace declaration require an addendum keyword, injection of elements possible which might expose private information
    2b) all namespaces must declare, that extension is possible

    example

    partial package CommonParent //declaration can be skipped, if nothing except namespace is declared
    package CommonParent::GroupA{
      //some declarations
    }
    package CommonParent::GroupB{
      //some more declarations
    }
    package CommonParent::IntegrationLayer{} //should work as no explicitly declared namespace is duplicated
    package CommonParent::GroupA::Backdoor {} //should generate an error as the explicitly declared namespace GroupA is duplicated
    
  • Reported: KerML 1.0b1 — Mon, 11 Sep 2023 17:55 GMT
  • Updated: Tue, 10 Dec 2024 22:03 GMT
  • Attachments: