The DirectiveBased Transformation Language DBTL Devon M Simmonds
The Directive-Based Transformation Language (DBTL) Devon M. Simmonds Computer Science Department University of North Carolina, Wilmington simmondsd@uncw. edu August 19, 2008 Devon M. Simmonds Science Department, CSC 592 Computer 1
Software Development Simple Tools International Space Station Power International Airport Baggage Tools Handling System Devon M. Simmonds Science Department, CSC 592 Blueprints Computer 2
Models in Engineering • Benefits of models – Help us understand manage complex systems – Communicate understanding – – Drive implementation Save resources Need to improve the use of models in software development! Devon M. Simmonds Science Department, CSC 592 Computer 3
Model Transformation Model A Model C A B C Model B Transformation A P K Devon M. Simmonds Science Department, CSC 592 M 4 4 Computer
Model-Driven Engineering (MDE) Code-centric Development Model of the Program Create Model Manually Compile Model Create Code A B C Code • Realizing the dream – MDD challenges – Model Specification – Model Transformation • • Model to model Model to code – Managing technologies – Model Analysis Compile Code Binary instructions Devon M. Simmonds Science Department, CSC 592 Computer 5
Project #4 A P Transformation Languages Model B K B Devon M. Simmonds Science Department, CSC 592 • Needed to support MDE! M C 6 6 Computer
Project #5 Generating code from aspect-oriented design models : Department : Student take. Course() graduate() Devon M. Simmonds Science Department, CSC 592 class Department { private: char name[40]; Student csc[100]; public: void manage. Students(){ csc[i]->register(); csc[i]->grade(); csc[i]->graduate(); }} 7 7 Computer
Model-to-model Transformation Conceptual Model Source Pattern Target Pattern Transformation Schema Interpreter Devon M. Simmonds Science Department, CSC 592 8 8 Computer
The Directive-Based Transformation Language • Source pattern – Describes valid input models • Transformation schema – Describes transformation to change input model to output model – Transformations are specified using five directives. Devon M. Simmonds Science Department, CSC 592 Computer 9
Money. Transfer. Service Account. Manager trans. ID: String service. ID: String handles. Participant * 0. . 1 money. Transfer(a: Account , b: Account, amt: float) deposit(a: Account, amt: float) withdraw(a: Account, amt: float) • Source Model |Transaction. Manager |Participant |client. ID: String |service. ID: String |manage. User * |participant. Op(|a: |Ptype-1, |b: |Ptype-2) * |trans. Operation(|param 1: ||Type 1, |param 2: Type 2) • Source Pattern source. |Transaction. Manager source. |Participant new |trans. State: String redefine |client. ID: String{name=Integer} new |get. State(): Boolean new commit() new abort() handles. Participant * 0. . 1 new commit() new abort() • Transformation Schema Devon M. Simmonds Science Department, CSC 592 Computer 10
A Transformation Schema Devon M. Simmonds Science Department, CSC 592 Computer 11
Transformation Directives • The source directive – Copy model elements • The name directive – Supply platform-specific name • The redefine directive – Modify copied elements • The new directive – Create new model elements • The exclude directive – Eliminate model elements Devon M. Simmonds Science Department, CSC 592 Computer 12
The source Directive Devon M. Simmonds Science Department, CSC 592 Computer 13
The rename Directive Devon M. Simmonds Science Department, CSC 592 Computer 14
The exclude, new & edefine Directives Devon M. Simmonds Science Department, CSC 592 Computer 15
The source Directive Devon M. Simmonds Science Department, CSC 592 Computer 16
The source Directive Devon M. Simmonds Science Department, CSC 592 Computer 17
DBTL Model transformation Process Devon M. Simmonds Science Department, CSC 592 Computer 18
Devon M. Simmonds, Computer Science Department, University of North Carolina Wilmington Q u e s t i o n s ? Devon M. Simmonds Science Department, CSC 592 The End Computer 19
- Slides: 19