190 likes | 353 Views
The Directive-Based Transformation Language (DBTL). Devon M. Simmonds Computer Science Department University of North Carolina, Wilmington simmondsd@uncw.edu August 19, 2008. Software Development. Simple Tools. International Space Station. Power Tools.
E N D
The Directive-Based Transformation Language (DBTL) Devon M. Simmonds Computer Science Department University of North Carolina, Wilmington simmondsd@uncw.edu August 19, 2008
Software Development Simple Tools International Space Station Power Tools International Airport Baggage Handling System Blueprints
Models in Engineering • Benefits of models • Help us understand and manage complex systems • Communicate understanding • Drive implementation • Save resources Need to improve the use of models in software development!
Model A A B2 A1 A M C A2 C K B D B1 P Model Transformation ModelB Transformation Model C
CreateModel Model of the Program A C B Binary instructions Code-centric Development Model-Driven Engineering (MDE) CompileModel Manually Create Code • Realizing the dream – MDD challenges • Model Specification • Model Transformation • Model to model • Model to code • Managing technologies • Model Analysis Code CompileCode
Project #4 M A C K B P Transformation Languages Model B • Needed to support MDE!
Project #5 :Department :Student takeCourse() takeCourse() graduate() Generating code from aspect-oriented design models class Department { private: char name[40]; Student csc[100]; public: void manageStudents(){ csc[i]->register(); csc[i]->grade(); csc[i]->graduate(); }}
Model-to-model Transformation Conceptual Model Source Pattern Target Pattern Transformation Schema Interpreter
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.
AccountManager source.|TransactionManager MoneyTransferService source.|Participant handlesParticipant handlesParticipant transID:String serviceID:String new |transState:String redefine |clientID:String{name=Integer} deposit(a:Account, amt:float) withdraw(a:Account, amt:float) new commit() new abort() * * 0..1 0..1 new |getState():Boolean new commit() new abort() moneyTransfer(a:Account , b:Account, amt:float) • Source Model |TransactionManager |clientID:String |serviceID:String |manageUser * * |transOperation(|param1:||Type1, |param2:Type2) • Source Pattern |Participant |participantOp(|a:|Ptype-1, |b:|Ptype-2) • Transformation Schema
Transformation Directives • The sourcedirective • Copy model elements • The namedirective • Supply platform-specific name • The redefinedirective • Modify copied elements • The newdirective • Create new model elements • The excludedirective • Eliminate model elements
Devon M. Simmonds, Computer Science Department, University of North Carolina Wilmington Q u e s t i o n s ? The End