140 likes | 277 Views
Domain Independent Generative Modeling. B. Kusy, A. Ledeczi, M. Maroti, P. Volgyesi. Modeling of complex software. Complex software systems that are tightly coupled with a physical environment are difficult to maintain if they need to change frequently
E N D
Domain Independent Generative Modeling B. Kusy, A. Ledeczi, M. Maroti, P. Volgyesi
Modeling of complex software • Complex software systems that are tightly coupled with a physical environment are difficult to maintain if they need to change frequently • Solution: generate the code of the final system from a centralized set of models – enable evolution • Approaches to modeling: • Utilize a single modeling language, designed for software modeling (UML) • Tailor the single language to the needs of a specific domain, introduce domain-specific modeling language (MIC)
A need for extensibility • Usability of both approaches greatly depends on the available tools: visual model builder, model database manager, model analyzer, verifier, interpreter transforming abstract models into executables and run-time support libraries • UML approach has an ‘advantage’ – a single toolset is sufficient • MIC approach needs to provide such a toolset for each domain-specific language • GME –Generic Modeling Environment: • configurable environment to create domain-specific environments • configurable visual model editor and database manager
Extensibility through metamodeling The cascading design • Metamodeling tools are used to design a domain specific modeling environment. • This customized environment is then used to develop the models of the system. Metamodel • Formal model of DSML. • Describes the syntax, semantics and presentation information of a modeling language using UML, OCL and aspects.
GME captures declarative models Declarative model fully describes the relationship between the modeling entities at a design time. This approach is inflexible in certain domains: • Large models with repetitive structure • Adaptive systems Hierarchical signal flow metamodel (SFMeta) Signal flow example: for parallel computing number of convolutions vs number of available processors
Modeling in a generative manner Specify the components of architecture and provide an algorithmic description how to generate the final architecture. What needs to be done? • The modeling language SFMeta needs to be extended with new objects • Implement an interpreter that transforms generative models into declarative models We need to avoid the problems that MIC faces: provide a configurable toolset that would support all domain-specific modeling languages Model transformation Generative model Declarative model
Outline of our solution for domain independence • Provide a template metamodel capturing the components and relations that are required by generative modeling • Use metamodel composition utilizing template metamodel • Provide code generator/model interpreter that executes generative scripts and creates the declarative model
Model GenerativeMETA template New objects New abstract objects
Outline of our solution • Provide a template metamodel capturing the components and relations that are required by generative modeling • Use metamodel composition utilizing template metamodel • Provide code generator/model interpreter that executes generative scripts and creates the declarative model
GenerativeSFMeta Configure GME Metamodel composition example GenerativeMeta lib SFMeta lib
Configure GME GenerativeSFMeta Metamodel composition example 4 GeneratorScript GenerativeMeta lib SFMeta lib We use inheritance as a technique to achieve metamodel composition. User needs to decide what objects participate in generative constructs and what models contain these constructs
Outline of our solution • Provide a template metamodel capturing the components and relations that are required by generative modeling • Use metamodel composition utilizing template metamodel • Provide code generator/model interpreter that executes generative scripts and creates the declarative model
Code generator/model interpreter invocation Our generator/interpreter works in 2 stages: • First it traverses a model in the composed metamodeling language and based on generator scripts it generates code for all generators • This generator code is then compiled and executed by the stage2 model interpreter The two stage process creates a new hierarchy containing only pure declarative models; these can be used with the toolkit (interpreters, visual model editors,…) of the original domain Generator Execution
Conclusions • We described an approach to generative modeling that employs scripts and architectural parameters to specify model structure • Our main concern was reusability that was accomplished by metamodel composition and two-stage domain-independent model interpretation • The Generative Modeling clearly supports and enhances the strengths of MIC and in particular the extensibility of GME http://www.isis.vanderbilt.edu/projects/gme/contrib/gme_generative.zip