Model-Driven Analysis Frameworks for Embedded Systems George Edwards USC Center for Systems and Software Engineering gedwards@usc.edu Presentation Outline • Embedded Systems – Modeling – Analysis • Model-Driven Engineering – Domain-specific languages – Model interpreters • Challenge: Performing Analysis on Domain-Specific Models • Promising Solution: Model Interpreter Frameworks • XTEAM – Modeling environment – Discrete event simulation framework • Conclusions Modeling Embedded Systems • Diversity and heterogeneity – Different operating platforms – Wide varieties of scale – Result: no “one-size-fits-all” modeling language • Close and continual interaction with the physical environment and electrical, mechanical, and biological systems – Result: models need to incorporate elements of these systems • Strict operating requirements – Result: models need to be analyzable, executable Analysis of Embedded Systems • Quality attributes are system properties that describe how services are performed – Also called non-functional or quality-of-service properties • Evaluation of quality attributes is critical in meeting overall end-user operational goals – Modification of a system that does not meet quality attribute requirements is difficult and expensive • Overall goal: Quantitatively and objectively evaluate quality attributes during system design to arrive at a better overall system 4 Model-Driven Engineering • Model-driven engineering (MDE) combines domain-specific modeling languages with model analyzers, transformers, and generators – Metamodels define elements, relationships, views, and constraints – Model interpreters leverage domain-specific models for analysis, generation, and transformation 5 Challenge: Constructing Interpreters 1. Using the standard MDE process, a model interpreter must be constructed for each analysis that will be applied to a model – Significant investment of effort 2. Constructing and maintaining DSMLs and interpreters is difficult and expensive – Little guidance exists on how to construct DSMLs and interpreters – Requires particular type of expertise – Common topic of research papers in the modeling community Model Interpreter Implementation Tasks 1. Find a computational theory that derives the relevant properties 2. Determine the syntax and semantics of the analysis modeling constructs 3. Discover the semantic relationships between the constructs present in the architectural models and those present in the analysis models 4. Determine the compatibility between the assumptions and constraints of the architectural models and the analysis models, and resolve conflicts 5. Implement a model interpreter that executes a sequence of operations to transform an architectural model into an analysis model 6. Verify the correctness of the transformation 6 Solution: Model Interpreter Frameworks • Use a model interpreter framework to implement domain-specific analysis – An infrastructure for automated construction of analysis models from domain-specific architectures – Leverages the commonality among domain-specific architectural modeling languages – Provides extension mechanisms to accommodate domainspecific analysis and platform-specific synthesis – Enables a family of analytic techniques to be applied to an architectural model Role of MIFs • Abstracts the details of domain-independent interpretation • Allows engineers to implement domain-specific interpretation • Produces an artifact useful in a wide variety of contexts MIF Extensibility • Language Extensions – Permit the definition of new domain-specific constructs – Design approach: define a new class that implements the semantics of each new type – Example: middleware component models, reference architecture types • Module Extensions – Permit the replacement of core simulation algorithms and functions – Design approach: modularize each algorithm and abstract algorithms behind standard interfaces – Examples: Real-time scheduling, publish-subscribe services • Plug-in Extensions – Permits implementation of domain-specific analysis techniques – Design approach: create hooks where call-backs occur – Examples: resource utilization monitor, stochastic workload generator The eXtensible Toolchain for Evaluation of Architectural Models • A modeling environment and accompanying set of model interpreter frameworks for software architectures • Consists of: – A specialized metamodeling language – A suite of model interpreter frameworks – Example extensions targeted towards resource-constrained and mobile computing environments • Provides the extensibility to easily accommodate both new modeling language features and new architectural analyses Modeling in XTEAM XDEVS Simulation Framework • Implements a mapping from architectural models to a discrete event simulation (DEVS) model Invoke the Apply Traverse architect- the Interpret domainmodel defined each object specific framework semantics based on at extension at each and type each extension context extension point point XDEVS Framework Extensions • Employs the Strategy pattern to implement domainspecific extensions – Each Concrete Strategy generates code to realize a particular analysis • Invoked at specific times during the interpretation process • Generated code calculates and records analysis results XDEVS Applications • Providing design rationale • Weighing architectural trade-offs • Discovering emergent behavior of component assemblies • Generating test cases and validating component implementations Conclusions • Lack of automated mechanisms for applying model transformations to and performing analysis on domain-specific models • Our methodology leverages extensible frameworks to simply the analysis of embedded systems For More Information Visit the XTEAM website: http://www-scf.usc.edu/~gedwards/xteam.html XTEAM Publications: George Edwards and Nenad Medvidovic, A Methodology and Framework for Creating Domain-Specific Development Infrastructures, Proceedings of the 23rd IEEE ACM International Conference on Automated Software Engineering (ASE), September 2008. George Edwards, Chiyoung Seo, and Nenad Medvidovic, Model Interpreter Frameworks: A Foundation for the Analysis of Domain-Specific Software Architectures, Journal of Universal Computer Science (JUCS), Special Issue on Software Components, Architectures and Reuse, 2008. George Edwards, Chiyoung Seo, and Nenad Medvidovic, Construction of Analytic Frameworks for Component-Based Architectures, Proceedings of the Brazilian Symposium on Software Components, Architectures and Reuse (SBCARS), August 2007. George Edwards, Sam Malek, and Nenad Medvidovic, Scenario-Driven Dynamic Analysis of Distributed Architectures, Proceedings of the 10th International Conference on Fundamental Approaches to Software Engineering (FASE), March 2007.