140 likes | 279 Views
XWeave Models and Aspects in Concert Iris Groher Siemens AG, CT SE 2 Markus Voelter Independent Consultant. Contents. Model-Driven Software Development in a Nutshell Model Weaving XWeave Home Automation Example (Smart Home) Smart Home (Meta) Models Examples Evaluation
E N D
XWeave Models and Aspects in Concert Iris Groher Siemens AG, CT SE 2 Markus Voelter Independent Consultant
Contents • Model-Driven Software Development in a Nutshell • Model Weaving • XWeave • Home Automation Example (Smart Home) • Smart Home (Meta) Models • Examples • Evaluation • Conclusion and Future Work
Model-Driven Software Development (MDSD) • Systems are mostly described in terms of models • Models play the role of source code • Models do not only constitute documentation • Models are processed by tools • Models are instances of meta models • Meta models describe the abstract syntax of models • Meta models are instances of meta meta models • MOF, Ecore • Infrastructure • Editors • Model transformations • Used for processing and refining models • Generators
Model Weaving • Model Evolution • Changes are localized in aspects • Simplifies traceability and change management • Product Line Engineering • Variable (optional) parts are captured in aspect models • Woven to minimal core common to all products • Architectural Viewpoints • Combination of different viewpoints to form a consistent whole
XWeave • Model weaver based on EMF’s Ecore meta meta model • Weaving of both meta models and models • Takes a base model and one or more aspect models as input • Weaves content of aspect model into base model (asymmetric AO) • Base model defines core abstractions • Aspect model defines delta to core abstractions and pointcuts • All properties of the aspect element including its child elements are woven into the base model
Pointcut Definition • Name matching • If a model element in the aspect model has a corresponding element in the base model the element if woven. • Name and type have to be equal • Expressions • Defined external to both models • Uses oAW expression language, based on OCL • %expressionName • Path expressions • Working with collections • Selection/filtering
Home Automation Example (Smart Home) • Electrical and electronic devices (e.g. lights, blinds,...) • Sensors measure physical values • Controllers activate devices • State can be monitored and changed from common UI
Smart Home (Meta) Models Smart Home Meta Model Smart Home Model
Examples – Model Weaving Base Model Aspect Model Resulting Model
Examples – Meta Model Weaving Aspect Model Resulting Model Base Model
Evaluation • Weaving of both EMF meta models and models • Pointcut definition based on name matching and expressions • Limited advice • No changing, removing, or overriding of base model elements • Only additive weaving is supported
Conclusion and Future Work • Model weaving is a possible way of integrating AOSD and MDSD • XWeave simplifies • Model evolution • Variability on model level • Combination of architectural views • We are currently implementing a demonstrator of a product line that uses XWeave to implement variability on model level. • Future Work • Combine XWeave with a variant management tool • Removing, changing, and overriding of base model elements • Symmetric weaving