1 / 14

Model Driven Generative Programming

ECE1770: Trends in Middleware Systems. Model Driven Generative Programming. Reza Azimi February 6, 2003. High Level Language Program. Model. Machine Code. Compiler. Model Compiler. Raising Level of Abstraction. Motivations. Easy to use Platform independent.

awen
Download Presentation

Model Driven Generative Programming

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ECE1770: Trends in Middleware Systems Model Driven Generative Programming Reza Azimi February 6, 2003

  2. High Level Language Program Model Machine Code Compiler Model Compiler Raising Level of Abstraction Motivations • Easy to use • Platform independent • Too hard to program and debug • Too machine- specific • Still hard to program • Still platform-specific • Hard to reuse

  3. Model-Driven Programming • Goal • To create an abstract (platform-independent), complete, precise, and executable model of the system. • Advantages • Reduced required development effort • Early system debugging • Challenges • Is there such a model? • How do we verify a model? • How do we translate a model to code?

  4. What should be modeled? • Data objects • contents, relations, constraints • Objects lifetime • states, and transitions • Objects interactions • message exchange, calls • Objects actions • computable algorithms • Concurrency and synchronization • timing constraints (e.g. Real-time systems)

  5. Unified Modelling Language (UML) • Abstract • Platform independent • Readable by non-technical people • Complete (?) • Formal action semantics • Precise model for concurrency and synchronization • Used widely • Capable enough for modeling large systems

  6. Modeling Data Objects • Class Diagram

  7. Modeling Behaviour State Charts Collaboration Diagrams

  8. Modeling Actions • Action Semantics • Object and attribute actions • Selection expressions • Link actions • Control structures (loops and if-then-else)

  9. Model Checking • Automatic Verification • Completeness • Consistency • Debugging • Generating test cases • Executing the model

  10. Model Compilers • Design Patterns • Translation Rules • Pre-built Libraries

  11. Design Patterns • An abstract template for solving a well-known problem • Creational Patterns • Abstract Factory, Builder, etc. • Structural Patterns • Adapter, Bridge, Proxy, etc. • Behavioural Patterns • Interpreter, Iterator, Mediator, etc.

  12. Translation Rules .for each object in O_OBJ public class ${obj.name} extends SateMachine { private SateMachineSate currentState .select many attributes related by object->O_ATTR[R105] .for each attribute in attributes private ${attribute.implType} ${attribute.name} .end for . . .select many signals related by object->SM_EVT[R303] .for each signal in signals protected void ${signal.name}() throws ooaException; .end for } .emit to file {obj.name}.java .end for Highlights of a translation rule that creates a Java Class

  13. Existing Tools • BridgePoint • By Project Technologies • http://www.projtech.com • Kabira • http://www.kabira.com

  14. Conclusions • Potentials • Faster software development • Early defect removal • Faster technology adoption • Limitations • Model compilers • Effectiveness • Complexity

More Related