SeelabFhdo / lemma

Home of the Language Ecosystem for Modeling Microservice Architecture (LEMMA)
MIT License
33 stars 8 forks source link

Enable technology-specific types to target more than one kind of built-in type #7

Open frademacher opened 4 years ago

frademacher commented 4 years ago

Technology-specific types in LEMMA technology models can currently only target one built-in type kind at once. For example, a hypothetical technology-specific for Spring's type Response Entity may be captured in a LEMMA technology model as follows:

technology spring {
    types {
        ...
        structure type ResponseEntity;
    }
}

However, a ResponseEntity may cluster several values of different Java types, e.g., regular classes, enumeration classes, and instances of lists. These types map LEMMA data structures, enumerations, and list types. However, the technology-specific ResponseEntity may only be defined as applicable to exactly one of these types. LEMMA should therefore support the modeling of technology-specific types that can be mapped to more than one kind of a built-in type. A possible solution to this lack in expressivity could be to allow for modeling eponymous types for different type kinds, e.g.,

technology spring {
    types {
        ...
        structure type ResponseEntity;
        list type ResponseEntity;
        enum type ResponseEntity;
    }
}

(The modeling of technology-specific enumeration types, as shown above, is currently not possible; their integration is addressed by issue #8.)