Automating Software Evolution through Model-Driven Engineering Troy University 8 th Annual Computer Science Colloquium on Information Technology April 3, 2007 – Rosa Parks Auditorium Previous support by DARPA/IXO PCES. Current funding from NSF-CSR and NSF CAREER. D epartm entofCom puterand Inform ation Sciences U niversity ofA labam a atB irm ingham S o ftC o m Jeff Gray UAB – CIS Department
37
Embed
Automating Software Evolution through Model-Driven Engineering Troy University 8 th Annual Computer Science Colloquium on Information Technology April.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Automating Software Evolution through Model-
Driven Engineering Troy University8th Annual Computer Science Colloquium on Information TechnologyApril 3, 2007 – Rosa Parks Auditorium
Previous support by DARPA/IXO PCES. Current funding from NSF-CSR and NSF CAREER.
Department of Computer and Information SciencesUniversity of Alabama at Birmingham
S o f t C o m Jeff GrayUAB – CIS Department
Overview of Presentation
Motivation
Background
Domain-SpecificModeling
Video Demos
Research Focus
Model-Driven Software Evolution
Overview of SoftCom
Example Case Studies
Model Transformation Toolsuite• Model Transformation Engine• Transformation Testing Framework• Model Transformation Debugger• Model Version Control• Model-Driven Program Transformation
• Week-long summer camp in computer graphics• Students use C++ and OpenGL to create projects focused on geometric modeling, algorithm visualization, and motion design
High School Programming Contest
• Seven-week internship• Students taught Java through series of robotics projects
• May 12, 2007• 2006: 46 students
from 12 schools (Huntsville to Mobile)
• 6 problems in 3 hours• Prizes: Laptop, Xbox,
software, books, gift certificates
• Alice Film Festival!
High School Outreach at UAB CISField Trips to the CIS Department Lectures for Technology Clubs
•3-hour tour of the CIS department:• Several topical lectures• Over 150 students in Fall 2006• Free Pizza lunch!
http://www.cis.uab.edu/field-trips
Alabama K-12 Workshop
http://www.cis.uab.edu/programs/hsws/
• July 31, 2006; 16 state-wide participants
• Purpose: To discuss critical issues needed to raise awareness of computing in Alabama schools.
Dual/Concurrent Enrollment
CIS faculty are available to give topical lectures to classes; if interested, faculty can help bootstrap a club
• Opportunity to earn college credit in the summer by taking the CIS 201 course (Intro to Java)
• 3-4 students each summer• Potential tuition waiver in some cases• Greatly speed up mentoring experience• Prepare students for programming
contest next May• “Concurrent/Dual” enrollment http://www.cis.uab.edu/cs201
The Generic Modeling Environment (GME) adopts the DSM approach and provides a plug-in mechanism for extension.
Example DSMLs (not UML)
Model-Driven Software EvolutionModel-Driven Program Transformation with C-SAW
With Jane Lin and Jing Zhang
Supported previously by DARPA PCESand a current NSF CSR and NSF CAREER grant.
The “Twisted Plot” MetaphorThe Problem of Keeping Track of Things in Your Head
• The interactions among characters and overlapping events makes a good novel (“thickness” of plot as a complexity metric)
• The author must take care in preserving, throughout the entire novel, internal consistency within plot
• e.g., a change in the conclusion of the plot may necessitate global changes in all chapters
• Keeping track of all the twists can be difficult because the various concerns of the plot are distributed across multiple chapters
• but…Software development is MANY orders of magnitude more difficult!
Logically Consistent?
…
Chapter 2
Conclusion
Chapter 1
…
Core Focus: Ability to evolve models The size of system models will continue to grow
Models containing several hundreds or even thousands of modeling elements
Others have reported similarly (Johann/Egyed – ASE 2004) A key benefit of modeling
Ability to explore various design alternatives (i.e., “knobs”) E.g., understanding tradeoff between battery consumption
and memory size of an embedded device E.g., scaling a model to 800 nodes to examine performance
implications; reduce to 500 nodes with same analysis… Reducing complexities of the modeling activity
Limit the amount of mouse clicking and typing required within a modeling tool to describe a change Improves productivity and reduces potential manual errors
A general metric for determining the effectiveness of a modeling toolsuite comprises the degree of effort required to make a correct change to a set of models.
Key Challenges: Crosscutting Concerns in Domain-Specific Models
Challenge 1: Crosscutting Models Base models become constrained to capture a
particular design Concerns that are related to some global property are
dispersed across the model Solution: Model Weaving
C-SAW is an aspect-oriented weaver at the modeling level
Changeability???
Multiple Levels
of HierarchyReplicatedStructures
ContextSensitive
A
B
c d eB
c d e
F
B
c d e
Crosscutting Constraints
Challenge 2: Fidelity Between Models and Code Changes to models must have a causal connection to underlying source Parsing large legacy systems and performing required adaptations is too difficult for each
new system to be encountered Solution: Model-Driven Program Transformation
A model interpreter generates DMS transformation rules from properties described in models
Challenge 1: Solved with Aspect-Oriented ModelingCrosscutting Constraints in Real-Time/Embedded Models
Implemented as a GME plug-in to assist in the rapid adaptation and evolution of models by weaving crosscutting changes into models.
C-SAW: Model Transformation Engine
ECL Interpreter
ECL Parser
Defines
MetaModel
Source Model
Mo
de
ling
AP
Is
Defines
ECL Transformation Specifications
Defines CopyAtom strategy CopyAtom
Mo
de
ling
AP
IsAspect
Weaving
Target Model
Key Challenge 2: Evolution of legacy models and code
∆MM: The changes made to the meta-models∆M: The changes reflected in the domain models∆I: The changes reflected in the legacy source
Legacy Source1
Model1
Metamodel1
Define
Interpret
Legacy Sourcen
Modeln
Metamodeln
Define
Interpret
Legacy Source0
Model0
Metamodel0
Define
Interpret
∆M 1
∆MM 1
∆I 1
∆M 2
∆MM 2
∆I 2
∆M n
∆MM n
∆I n……
……
……
Based
on
What about other artifacts of the modeling process during metamodel evolution?Interpreters, constraints, model transformations…
1. Model weaving to explore design alternatives more rapidly
• Design decisions crosscut model hierarchy
• Difficult to change models to new configuration
• Design decisions captured as higher level policy strategies and weaved into models
2. Model driven program transformation• Ensures causal connection between
model changes and represented source code of legacy system
• Assists in legacy evolution from new properties specified in models
• Model interpreters generate transformation rules to modify source
• Apply original Bold Stroke C++ source code and generated transformation rules to DMS; result is a transformed version of Bold Stroke that is consistent with the model specification
//show("Data fields exist. Add two concurrency atoms.");//add the first concurrency atomconcurrencyAtom1 := addAtom("Concurrency", "InternalLock");concurrencyAtom1.setAttribute("Enable", "1");// "1" is true, "0" is falseconcurrencyAtom1.setAttribute("LockType", "Thread Mutex");concurrencyAtom1.setAttribute("LockStrategy", "Internal Locking");//add the second concurrency atomconcurrencyAtom2 := addAtom("Concurrency", "ExternalLock");concurrencyAtom2.setAttribute("Enable", "1");// "1" is true, "0" is falseconcurrencyAtom2.setAttribute("LockType", "Thread Mutex");concurrencyAtom2.setAttribute("LockStrategy", "External Locking");
Case Study:Bold Stroke Product Line
Background Context Mission-control software for Boeing military aircraft
under development since 1995 (F-15/F-18) CORBA event-based systems Thousands of components implemented in over 4 million
lines of C++ code Key Challenges
Difficult to evolve the underlying source representation to address new requirements; impossible to determine, a priori, all of the future adaptation requests
Difficult to migrate the source representation to newer component models
Conclusion and Ongoing Work Benefits of Model-Driven Engineering
Captures domain abstractions that are appropriate for an end-user; enables analysis at higher levels of abstraction
Model transformations assist in evolution tasks that would be too tedious and error prone to do manually
Ongoing Work Framework for testing the correctness of model
transformations Model differentiation algorithms “Model Transformation by Example” Version control of models at proper abstraction level Evolution of other modeling artifacts in an automated manner
Related Web Pages
http://www.cis.uab.edu/Research/C-SAW/Contains papers, downloads, video demos
C-SAW
SoftCom Research Lab
http://www.cis.uab.edu/softcom
K-12 Outreach Activities
http://www.cis.uab.edu/gray/OutreachContains papers, posters, and video demos
Department of Computer and Information SciencesUniversity of Alabama at Birmingham
S o f t C o m
Development Forces100+ DevelopersLengthy product lifecyclesComponent orientedMillions of SLOC1,000s of component instances