Model Driven Generative ProgrammingMotivationsModel-Driven ProgrammingWhat should be modeled?Unified Modelling Language (UML)Modeling Data ObjectsModeling BehaviourModeling ActionsModel CheckingModel CompilersDesign PatternsTranslation RulesExisting ToolsConclusionsModel Driven Generative ProgrammingReza AzimiFebruary 6, 2003ECE1770: Trends in Middleware SystemsMotivationsMachine Code• Too hard to program and debug• Too machine- specificHigh Level Language ProgramCompiler• Still hard to program• Still platform-specific• Hard to reuseModel CompilerModel• Easy to use• Platform independentRaising Level of AbstractionModel-Driven ProgrammingGoalTo create an abstract (platform-independent), complete, precise, and executable model of the system.AdvantagesReduced required development effortEarly system debugging ChallengesIs there such a model?How do we verify a model?How do we translate a model to code?What should be modeled?Data objectscontents, relations, constraintsObjects lifetime states, and transitionsObjects interactionsmessage exchange, callsObjects actionscomputable algorithmsConcurrency and synchronizationtiming constraints (e.g. Real-time systems)Unified Modelling Language (UML) AbstractPlatform independentReadable by non-technical peopleComplete (?)Formal action semantics Precise model for concurrency and synchronizationUsed widelyCapable enough for modeling large systemsModeling Data ObjectsClass DiagramModeling Behaviour State Charts Collaboration DiagramsModeling ActionsAction SemanticsObject and attribute actionsSelection expressionsLink actionsControl structures (loops and if-then-else)Model CheckingAutomatic VerificationCompletenessConsistencyDebuggingGenerating test casesExecuting the modelModel CompilersDesign PatternsTranslation Rules Pre-built LibrariesDesign PatternsAn abstract template for solving a well-known problemCreational PatternsAbstract Factory, Builder, etc.Structural PatternsAdapter, Bridge, Proxy, etc.Behavioural PatternsInterpreter, Iterator, Mediator, etc.Translation Rules.for each object in O_OBJpublic class ${obj.name} extends SateMachine {private SateMachineSate currentState.select many attributes related by object->O_ATTR[R105].for each attribute in attributesprivate ${attribute.implType} ${attribute.name}.end for.. .select many signals related by object->SM_EVT[R303].for each signal in signalsprotected void ${signal.name}() throws ooaException;.end for}.emit to file {obj.name}.java.end for Highlights of a translation rule that creates a Java ClassExisting ToolsBridgePointBy Project Technologies http://www.projtech.comKabirahttp://www.kabira.comConclusionsPotentialsFaster software developmentEarly defect removalFaster technology adoptionLimitationsModel
View Full Document